Module 5: Vector Spaces
Rank is a single number that summarizes how much "independent information" a matrix contains. It's the dimension of the column space.
A 2×2 matrix transforms the plane. Rank 2 means the transformation is full — it maps the plane to the whole plane. Rank 1 means every input gets squashed to a single line. Rank 0 means everything goes to zero.
Rank is determined by linear independence of the columns (or rows — they always give the same number). Whenever one column is a multiple of another, the rank drops.
A 2×2 matrix is invertible if and only if it has rank 2. Equivalently: det(A) ≠ 0 ↔ rank = 2.
Any rank deficiency is catastrophic for solving linear systems: if Ax=band rank(A) < 2, then either there are infinitely many solutions or none at all — never exactly one.
Row-reduce to echelon form. Count the non-zero rows. That's the rank. Numerically, use SVD and count singular values above a threshold.
Use the presets at the top to switch between rank 2, 1, and 0. Or drag the column vectors to explore. Notice that rank 1 shows the column space as a dashed line — the full plane has collapsed to a line.
import numpy as np
A = np.array([[1, 2], [2, 4]])
print(np.linalg.matrix_rank(A)) # 1 — columns are parallel
B = np.array([[1, 0], [0, 1]])
print(np.linalg.matrix_rank(B)) # 2 — full rankdet(A) = 4 · · col₁=[2,0] col₂=[1,2]
Drag the column vectors or try the presets above.