Linear Algebra
Scalar, Vectors, Matrix and Tensor
- A scalar is a single number . It can be regarded as a vector with the unit length or dimension.
- A vector is an array of numbers . The is called dimension or length. A vector can be regarded as a matrix.
- A matrix is a two-dimensional array . A matrix can be regarded as a special tensor.
- A tensor is an -dimensional array . Tensor is the most generic way to denote data.
Operations
Products
We can define inner product, or known as dot product on vectors.
Determinant
- .
- .
Inversion
A matrix is called invertible if there is such that .
- is invertible if and only if rows of are linearly independent.
- is invertible if and only if .
- If is invertible, then has solution .
Properties of Matrix
- Symmetric Matrix: A matrix is called symmetric if .
- Diagonal Matrix: A matrix is called diagonal if .
- Identity Matrix: The identity matrix is the diagonal matrix where .
- Unitary Matrix: A complex matrix is called unitary if where is the conjugate transpose of .
More concepts
A set of vectors is said to be linearly independent if . In another word, such that .
The span of for a vector space is the set of all vectors that can be expressed as a linear combination of them. Formally, we have .
Eigenvalues and Eigenvectors
Definition: is an eigenvector of with eigenvalue if .
If has eigenvalues , then the determinant of is .
Steps to compute the eigenvalues and eigenvectors
- Computer the determinant of . With subtracted along the diagonal, this determinant is a polynomial of degree , starts with .
- Find the roots of this polynomial. The roots are the eigenvalues of .
- For each eigenvalue solve the equation . The solution is the eigenvector corresponding to .
Definite Matrix
A symmetric matrix is:
- Positive semi-definite (PSD) if for all , there is .
- Positive definite (PD) if for all non-zero , there is .
We can induce this property by using the eigenvalues:
- If all eigenvalues are strictly positive, then matrix is PD. Furthermore, since the determinant is non-zero, the matrix is invertible.
- Similarly, if all eigenvalues are nonnegative, then the matrix is PSD.
We can similarly define negative semi-definite and negative definite.
Rayleigh Quotient
For PSD ,
- The max value of is the largest eigenvalue of .
- This is attained for being the corresponding eigenvector.
Singular Value Decomposition
We can decompose a matrix into where .
- is diagonal with singular values .
- is orthonormal matrix with right singular vectors.
- is orthonormal matrix with left singular vectors.