Matrix transpose: $A^T: Interchange rows and columns.
Trace of a matrix: tr(A)=∑i=1naii
Determinant of a 3x3 matrix: det(A):
det(adgbehcfi)=a(e∗i−f∗h)−b(d∗i−f∗g)+c(d∗h−e∗g)
Minor of a matrix Mi,j: The minor of matrix is for each element of matrix and is equal to the determinant of part of the matrix remaining after excluding the row and the column containing that particular element.
Cofactor of a minor Ci,j=(−1)i+jMi,j
Adjoint of a matrix Adj(A)=[Ci,j]T where Ci,j is cofactor of Ai,j
Inverse of a matrix A−1=det(A)1Adj(A)
Inverse doesnt exist when det(A)=0⟹Rank of matrix is not full, One of the row/column is a linear of combination of the other row/column respectively.
Matrix-Vector
y=A⋅x: Multiplication of matrix A by vector x produces a linear combination of columns of A. This introduces the concept of Linear Transformation
TODO: Add properties of different types of matrices (diagonal, symmetric, etc)
TODO: Add notes on solving linear equations
Linear Transformation
Applying a matrix A to a vector x can be considered as a linear transformation of vector. A linear transformation is a mapping which preserves the following properties:
A(x+y)=Ax+Ay
A(αx)=αAx
TODO: Add notes about translation, rotation, scaling, reflection?
Eigenvalues and Eigenvectors
For a square matrix A, the eigenvalues λ and eigenvectors v of A are such that Av=λv. In other words, transforming v by A is equivalent to scaling v by λ - the eigenvalue, so the direction of v is preserved.
Sum of eigenvalues is the trace of the matrix tr(A).
Product of eigenvalues is the determinant of the matrix det(A).
If the matrix is invertible, the eigenvalues are the roots of the characteristic polynomial det(A−λI)=0.
Eigen values of A−1 are the inverse of eigenvalues of A, but eigen vectors are same.
Eigen values of AT are the same as eigenvalues of A.
If the matrix is singular, det(A)=0, atleast one eigenvalue is 0.
For a symmetric matrix A, the eigenvalues are real and the eigenvectors are orthogonal.
Diagonalization
A square matrix A is said to be diagonalizable if there exists a matrix P such that A=PDP−1 where D is a diagonal matrix.
Consider the a matrix P=[v1v2…], where v1,v2,… are linearly independent eigenvectors of A (If eigen values are unique, the corresponding eigenvectors are linearly independent).
Then by definition,
A⋅P=A⋅[v1v2…]=[λ1v1λ2v2…]=[v1v2…]⋅λ10⋮0λ2⋮……⋱=P⋅DTaking P−1 on both sides, A⋅P⋅P−1=P⋅D⋅P−1A=P⋅D⋅P−1
Therefore, A is diagonalizable using linearly independent eigenvectors and diagonal matrix of eigen values. If A is not diagonalizable, its called Defective Matrix. One reason is if eigen values are not unique the eigen vectors might not be linearly independent. (TODO: More information on this is confusing)
Inverse using eigen decomposition
If A can be eigen-decomposed, and none of eigen values are zero, the A is invertible and A−1=P⋅D−1⋅P−1
Singular Value Decomposition
A generalisation of eigen decomposition to an m×n matrix A.
SVD is factorization of a real or complex matrix into a rotation matrix, followed by scaling matrix and then another rotation matrix.
For a matrix M∈Rm×n, SVD is given by M=UΣVT where U∈Rm×m,Σ∈Rm×n,V∈Rn×n. Here U and V are complex unitary (complex version of orthogonal) matrices and Σ is a diagonal matrix of non-negative real numbers.
The entries of Σ are called singular values of M.
The columns of U are called left singular vectors of M.
The columns of V are called right singular vectors of M.
The singular values of M are (usually) sorted in non-decreasing order.
SVD is not unique.
Understanding SVD through Eigen decomposition
For a matrix A, we want to find U,V,Σ such that A=UΣVT.
Consider AAT, which is a symmetric and positive semi-definite matrix. We can write the eigen decomposition as ATA=VΛVT, where V is an orthogonal matrix and Λ is a diagonal matrix of eigen values of ATA. And the eigen values λi are non-negative (or positive?).
And thus, for any (unit) eigen vector vi, we have ATAvi=λivi.
Lets consider σi=λi to be the diagonal elements of Σ. These are called singular values of A. Next lets define ui=σiAvi, because Avi transforms unit orthogonal vectors to another set of orthogonal vectors. But these have to be normalised.