Matrix Operations Cheat Sheet
Quick reference for every matrix operation — formulas, rules, and worked examples.
📖 6 min read · Updated May 2026 · Reviewed by our math editorial team
Matrix Addition & Subtraction
Rule
Add/subtract entry-by-entry. Matrices must be the same size (m×n).
(A + B)[i][j] = A[i][j] + B[i][j]
[1 2] + [5 6] = [6 8] [3 4] [7 8] [10 12]
Scalar Multiplication
(kA)[i][j] = k · A[i][j] — multiply every entry by k.
Properties: (k+l)A = kA + lA, k(A+B) = kA + kB
3 · [1 2] = [3 6]
[3 4] [9 12]Matrix Multiplication → Calculator
C = AB: C[i][j] = Σₖ A[i][k]·B[k][j] (dot product of row i of A with column j of B)
Requires: cols(A) = rows(B). Result: (rows(A)) × (cols(B)).
⚠ Not commutative: AB ≠ BA in general
Associative: A(BC) = (AB)C | (AB)ᵀ = BᵀAᵀ | (AB)⁻¹ = B⁻¹A⁻¹
[1 2] · [5 6] = [1·5+2·7 1·6+2·8]
[3 4] [7 8] [3·5+4·7 3·6+4·8]
= [19 22]
[43 50]Transpose → Calculator
Aᵀ[i][j] = A[j][i] — swap rows and columns. m×n becomes n×m.
Properties: (Aᵀ)ᵀ = A | (AB)ᵀ = BᵀAᵀ | (A+B)ᵀ = Aᵀ+Bᵀ | det(Aᵀ)=det(A)
Symmetric: A = Aᵀ | Skew-symmetric: Aᵀ = −A | Orthogonal: Aᵀ = A⁻¹
A = [1 2 3] Aᵀ = [1 4]
[4 5 6] [2 5]
[3 6]Determinant → Calculator
2×2: det([[a,b],[c,d]]) = ad − bc
3×3: Cofactor expansion along row 1: a(ei−fh) − b(di−fg) + c(dh−eg)
Row ops: swap rows → ×(−1) | scale row → ×c | add multiple → no change
det(AB) = det(A)·det(B) | det(A⁻¹) = 1/det(A) | det(kA) = kⁿ·det(A)
det([3 -2]) = 3·4−(−2)·1 = 12+2 = 14
[1 4]
Triangular matrix: det = product of diagonalMatrix Inverse → Calculator
A · A⁻¹ = A⁻¹ · A = I. Exists iff det(A) ≠ 0.
2×2 formula: A⁻¹ = (1/det) · [[d,−b],[−c,a]]
General: Gauss-Jordan on [A|I] → [I|A⁻¹]
Properties: (AB)⁻¹=B⁻¹A⁻¹ | (Aᵀ)⁻¹=(A⁻¹)ᵀ | (A⁻¹)⁻¹=A
A = [4 7] det = 4·6−7·2 = 10
[2 6]
A⁻¹ = (1/10)[6 -7] = [3/5 -7/10]
[-2 4] [-1/5 2/5 ]RREF and Row Operations → Calculator
Elementary row operations: (1) swap rows R_i ↔ R_j, (2) scale row R_i → c·R_i (c≠0), (3) replace R_i → R_i + c·R_j
RREF conditions: (1) zero rows at bottom, (2) leading entries = 1 (pivots), (3) staircase pattern, (4) zeros above AND below each pivot
Rank: number of pivots in RREF. Rank(A) = rank(Aᵀ). For m×n: rank ≤ min(m,n).
Null space / Nullity: nullity = n − rank (rank-nullity theorem). Free variables correspond to null space dimensions.
Eigenvalues & Eigenvectors
Definition: Av = λv, v ≠ 0. λ is the eigenvalue; v is the eigenvector.
Finding eigenvalues: Solve characteristic equation det(A − λI) = 0. This is a degree-n polynomial in λ.
Finding eigenvectors: For each eigenvalue λ, solve (A − λI)v = 0 (null space of A − λI).
Trace = sum of eigenvalues. Det = product of eigenvalues.
Diagonalizable: A = PDP⁻¹ where D = diagonal matrix of eigenvalues, P = matrix of eigenvectors (columns).
Dot & Cross Products
Special Matrices
Identity I
Diagonal entries = 1, all others 0. AI = IA = A.
Zero matrix 0
All entries = 0. A + 0 = A, A·0 = 0.
Diagonal
Non-zero entries only on main diagonal. Easy to invert: d⁻¹ on diagonal.
Symmetric
A = Aᵀ. Real eigenvalues, orthogonal eigenvectors (spectral theorem).
Orthogonal Q
Qᵀ = Q⁻¹, Qᵀ Q = I. Preserves lengths and angles (rotations, reflections).
Upper/Lower triangular
All entries below/above main diagonal = 0. det = product of diagonal.
Non-Commutativity: A Worked Counter-Example
AB ≠ BA in general. Here is a concrete pair of matrices where both products exist but are different:
AB:
A = [1 2] B = [0 1]
[3 4] [1 0]
AB = [1·0+2·1 1·1+2·0] = [2 1]
[3·0+4·1 3·1+4·0] [4 3]BA:
BA = [0·1+1·3 0·2+1·4] = [3 4]
[1·1+0·3 1·2+0·4] [1 2]AB ≠ BA — the products have different entries. This is the general rule: matrix multiplication is non-commutative unless A and B have special structure (e.g., both are diagonal, or one is a scalar multiple of I). When solving Ax = b, never "divide by A" from the right — always left-multiply by A⁻¹.
Key Properties Summary Table
| Property | Holds? | Exception / Note |
|---|---|---|
| A + B = B + A | ✓ Always | Addition is commutative |
| AB = BA | ✗ Usually not | Only if both diagonal, or special cases |
| A(BC) = (AB)C | ✓ Always | Multiplication is associative |
| (AB)ᵀ = BᵀAᵀ | ✓ Always | Order reverses on transpose |
| (AB)⁻¹ = B⁻¹A⁻¹ | ✓ If both invertible | Order reverses on inverse |
| det(AB) = det(A)det(B) | ✓ Always | Multiplicativity of determinant |
| det(A + B) = det(A) + det(B) | ✗ False | Det is not additive |
| rank(AB) ≤ min(rank A, rank B) | ✓ Always | Rank can only decrease under multiplication |
| (Aᵀ)⁻¹ = (A⁻¹)ᵀ | ✓ If A invertible | Inverse and transpose commute |
Connection to RREF → Calculator
RREF ties together all major matrix operations. Here is how each operation connects to row reduction:
- Solving Ax = b: Form augmented matrix [A|b] and compute RREF. Read solution from last column.
- Finding A⁻¹: Augment [A|I] and compute RREF. If left half becomes I, right half is A⁻¹.
- Computing det(A): Row reduce to upper triangular form, tracking determinant changes: swaps multiply det by −1, scalings multiply det by c.
- Finding rank: Compute RREF and count pivot columns. This is the most reliable method.
- Finding null space: Compute RREF of A, identify free variables, express basic variables in terms of free variables.
- Finding column space basis: Compute RREF, identify pivot columns, return the corresponding original columns of A (not RREF columns).
- Testing linear independence: Form matrix with vectors as columns, compute RREF. Linearly independent ↔ every column is a pivot column.
Row reduction is the universal algorithm. Every operation above reduces to RREF with the right setup. See the linear algebra basics guide for the conceptual foundations.