1. Change of Basis
x = P_B [x]_B | [x]_B = P_B^{-1} x
P_B = [b1 | b2 | ... | bn] converts B-coordinates to standard. The columns of P_B are the basis vectors.
Similar matrices: B = P^{-1}AP. They share eigenvalues, det, trace, rank, and characteristic polynomial. Diagonalization IS change of basis to the eigenvector basis.
2. Singular Value Decomposition
A = U Sigma V^T (exists for EVERY matrix)
U: m x m orthogonal (left singular vectors). Sigma: m x n diagonal (singular values). V: n x n orthogonal (right singular vectors).
Singular values = sqrt(eigenvalues of A^T A). rank(A) = # nonzero singular values. Best rank-k approximation: keep top k singular values.
3. PCA
Procedure: (1) Center data. (2) Compute covariance matrix S. (3) Find eigenvalues/vectors. (4) Project onto top k eigenvectors.
Eigenvalue = variance along that PC. Proportion explained = lambda_k / sum(all lambda). Choose k for desired cumulative variance (90-95%).
S = (1/(n-1)) X_c^T X_c | Y = X_c W (W = top k eigenvectors)
4. Computer Graphics
| Transform | 2x2 Matrix |
| Rotation by theta | [cos(theta) -sin(theta); sin(theta) cos(theta)] |
| Scale (sx, sy) | [sx 0; 0 sy] |
| Reflect over x-axis | [1 0; 0 -1] |
| Shear (horizontal by k) | [1 k; 0 1] |
Homogeneous coords: (x,y) becomes (x,y,1). Translation: [1 0 tx; 0 1 ty; 0 0 1]. Compose: M = T_last * ... * T_1 (rightmost first).
Perspective: (x, y, z) projects to (x/z, y/z). Farther objects appear smaller.