๐Ÿ“‹ Matrix Formulas Cheat Sheet

Matrix Formulas Cheat Sheet

Every essential linear algebra formula in one place. Bookmark this page or print it for your exams and problem sets.

๐Ÿ“Œ Determinants

2ร—2 Determinant

$$\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc$$

3ร—3 Sarrus Rule

$$\det(A)=a(ei-fh)-b(di-fg)+c(dh-eg)$$

Cofactor Expansion (Row i)

$$\det(A)=\sum_{j=1}^n a_{ij}(-1)^{i+j}M_{ij}$$

$M_{ij}$ = minor (det of matrix with row i, col j removed)

Determinant Properties

$$\det(AB)=\det(A)\det(B)$$
$$\det(A^T)=\det(A)$$
$$\det(kA)=k^n\det(A)$$
$$\det(A^{-1})=\frac{1}{\det(A)}$$

๐Ÿ“Œ Matrix Inverse

2ร—2 Inverse

$$\begin{pmatrix}a&b\\c&d\end{pmatrix}^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}$$

General Inverse (Gauss-Jordan)

$$[A|I] \xrightarrow{\text{RREF}} [I|A^{-1}]$$

Aโปยน exists iff det(A) โ‰  0

Inverse Properties

$$AA^{-1}=A^{-1}A=I$$
$$(AB)^{-1}=B^{-1}A^{-1}$$
$$(A^T)^{-1}=(A^{-1})^T$$
$$(A^{-1})^{-1}=A$$

๐Ÿ“Œ Eigenvalues & Eigenvectors

Definition

$$A\mathbf{v}=\lambda\mathbf{v}, \quad \mathbf{v}\neq\mathbf{0}$$

Characteristic Equation

$$\det(A-\lambda I)=0$$

Roots ฮป are eigenvalues; solve (Aโˆ’ฮปI)v=0 for eigenvectors

Spectral Properties

$$\text{tr}(A)=\sum_i \lambda_i$$
$$\det(A)=\prod_i \lambda_i$$
$$\lambda(A^n)=\lambda^n$$
$$\lambda(A^{-1})=1/\lambda$$

๐Ÿ“Œ Matrix Decompositions

LU Decomposition

$$A=LU \quad (PA=LU \text{ with pivoting})$$

L: lower triangular (1s on diagonal), U: upper triangular

QR Decomposition

$$A=QR$$

Q: orthogonal ($Q^TQ=I$), R: upper triangular

SVD

$$A=U\Sigma V^T$$

U, V orthogonal; ฮฃ diagonal (singular values ฯƒโ‚ โ‰ฅ ฯƒโ‚‚ โ‰ฅ ... โ‰ฅ 0)

Gram-Schmidt

$$\mathbf{u}_k=\mathbf{v}_k-\sum_{j
$$\mathbf{e}_k=\frac{\mathbf{u}_k}{\|\mathbf{u}_k\|}$$

๐Ÿ“Œ Vector Operations

Dot Product

$$\mathbf{a}\cdot\mathbf{b}=\sum_i a_i b_i=|\mathbf{a}||\mathbf{b}|\cos\theta$$

Cross Product (3D)

$$\mathbf{a}\times\mathbf{b}=\begin{vmatrix}\mathbf{i}&\mathbf{j}&\mathbf{k}\\a_1&a_2&a_3\\b_1&b_2&b_3\end{vmatrix}$$
$$|\mathbf{a}\times\mathbf{b}|=|\mathbf{a}||\mathbf{b}|\sin\theta$$

Vector Norms

$$\|\mathbf{v}\|_2=\sqrt{\sum_i v_i^2} \quad \text{(Euclidean)}$$
$$\|\mathbf{v}\|_1=\sum_i |v_i| \quad \text{(Manhattan)}$$

๐Ÿ“Œ Special Matrix Types

Symmetric

$$A^T=A$$

Real eigenvalues. Orthogonally diagonalizable.

Orthogonal

$$Q^TQ=I \Rightarrow Q^T=Q^{-1}$$

det(Q) = ยฑ1. Preserves lengths and angles.

Positive Definite

$$\mathbf{x}^TA\mathbf{x}>0 \;\forall\;\mathbf{x}\neq 0$$

All eigenvalues positive. All leading minors positive.

Diagonal

$$D=\text{diag}(d_1,\ldots,d_n)$$

D^n = diag(dโ‚โฟ,...,dโ‚™โฟ). det(D) = โˆdแตข.

๐Ÿ“Œ Rank, Nullity & Linear Systems

Rank-Nullity Theorem

$$\text{rank}(A)+\text{nullity}(A)=n$$

n = number of columns of A

Solution Types for Ax = b

$$\text{Unique: rank}(A)=\text{rank}([A|b])=n$$
$$\text{Infinite: rank}(A)=\text{rank}([A|b])
$$\text{None: rank}(A)<\text{rank}([A|b])$$

Cramer's Rule (nร—n)

$$x_i=\frac{\det(A_i)}{\det(A)}$$

$A_i$ = A with column i replaced by b. Only for square non-singular systems.