How to Find the Null Space, Column Space and Row Space
Learn to read bases for all four fundamental subspaces from the RREF, avoid the classic column-space mistake and check rank-nullity, with a 3×4 example.

Questions about subspaces are where many linear algebra students start to feel lost. The definitions are abstract, yet the computations are mechanical once you know where to look in the reduced matrix. This guide explains how to get a basis for each of the four fundamental subspaces of a matrix and how to check the result with the free Null Space and Column Space Calculator.
The four spaces in one picture
Think of an m×n matrix A as a machine that takes a vector x with n entries and returns Ax with m entries. The column space is everything the machine can output. The null space is everything it sends to zero. The row space is spanned by the rows, and the left null space holds the vectors y with yᵀA = 0. The first and fourth live in ℝᵐ; the second and third live in ℝⁿ.
One number controls all four: the rank r. The column space and row space both have dimension r. The null space has dimension n − r and the left null space has dimension m − r. Moreover, the row space is perpendicular to the null space, and the column space is perpendicular to the left null space.
Start with the RREF
Every basis comes from row reduction, so reduce A first. The calculator records each operation. For the example used here, enter the rows 1 2 0 1, 2 4 1 4 and 3 6 1 5. Three operations give the reduced matrix with rows 1 2 0 1, 0 0 1 2 and a zero row. The pivots sit in columns 1 and 3, so the rank is 2.
Column space: go back to the original
This is the step most often done wrong. The pivot positions say which columns are independent, but the basis vectors must be taken from the original matrix, not from the reduced one. Row operations change the columns themselves while keeping the relations between them. Here the basis is column 1 and column 3 of A, which are (1, 2, 3) and (0, 1, 1).
Row space: read the reduced rows
Row operations replace rows with combinations of rows, so the row space never changes. The non-zero rows of the RREF, (1, 2, 0, 1) and (0, 0, 1, 2), are a basis, and they are usually the cleanest choice.
Null space: one vector per free column
Columns 2 and 4 have no pivot, so x2 and x4 are free. Set x2 = 1 and x4 = 0: the reduced rows give x1 = −2 and x3 = 0, so one basis vector is (−2, 1, 0, 0). Set x2 = 0 and x4 = 1: then x1 = −1 and x3 = −2, so the other is (−1, 0, −2, 1). The dimension is 4 − 2 = 2, as rank-nullity predicts. The calculator can scale these vectors to whole numbers, which matches most answer keys.
Left null space: reduce the transpose
The left null space is the null space of Aᵀ, so the tool reduces the transpose separately and reads it the same way. For this matrix it is spanned by (−1, −1, 1), dimension 3 − 2 = 1. You can see why: row 3 of A equals row 1 plus row 2, so minus row 1 minus row 2 plus row 3 gives zero.
Checks that catch mistakes
Multiply each row-space vector by each null-space vector; every dot product must be zero. Do the same for column-space and left-null-space vectors. The calculator runs both checks and shows a tick when they pass. It also prints the two rank-nullity sums, 2 + 2 = 4 columns and 2 + 1 = 3 rows.
Is a vector in the column space?
To test a vector b, try to solve Ax = b. The tool does this exactly. For b = (1, 3, 4) it finds a solution, and writes b as column 1 plus column 3. If no solution exists, it gives the projection of b onto the column space instead, using the projection matrix it also displays.
A note on different answers
Bases are not unique. Your textbook may list (2, −1, 0, 0) where the tool lists (−2, 1, 0, 0), or a combination of the two vectors. Both are correct as long as each vector of one basis can be written using the other. The dimension, however, must always match.
Everything is computed in your browser with exact fractions, saved locally with undo and redo, and can be copied or printed with the full row reduction for both A and its transpose.


