Read this lesson as text

Matrix Rank

Linear Algebra for Machine Learning · Axiom Academy

Dimension of Column Space & Row Reduction The rank of a matrix is the dimension of its column space (or row space). It tells us how many linearly independent rows or columns the matrix has. The rank of a matrix A is the number of pivot columns (or pivot rows) after row reduction to row echelon form. Quick Primer: Row Echelon Form Before we compute rank, we need a quick word on row echelon form (REF) . A matrix is in REF when it forms a "staircase" pattern: each row's first non-zero entry (called a leading entry or pivot ) sits strictly to the right of the leading entry in the row above it, and any all-zero rows are stacked at the bottom. We get there by row operations — swapping rows, scaling a row, or adding a multiple of one row to another — using the leading entries to zero out everything below them. Once the matrix is in REF, the rank is just the number of non-zero rows (equivalently, the number of pivots), making rank trivial to read off. Three leading entries (the 2, the 3, and the 4), each shifted right of the one above — classic staircase. Step 1: Reduce the matrix to row echelon form Step 2: Count the number of non-zero rows Step 3: That count is the rank Property 1: rank(A) ≤ min(m, n) For an m×n matrix, the rank is at most the smaller of m and n. Property 2: rank(A) = rank(Aᵀ) Property 3: rank(AB) ≤ min(rank(A), rank(B)) The rank of a product is at most the minimum of the two ranks.

This is the written version of the interactive lesson above. See the full Linear Algebra for Machine Learning course.