How to Find a Basis for the Column Space
The column space of a matrix A is the set of all vectors that can be written as a linear combination of A's columns. Finding a basis for it tells you exactly which directions those combinations can reach, and how many degrees of freedom you have. The process is straightforward once you know the key rule: row-reduce to locate the pivot columns, then go back to the original matrix to collect them.
At a Glance
- The column space of A is the span of A's columns, a subspace of R^m for an m×n matrix.
- A basis for it is a linearly independent set of columns that still spans the whole column space; its size equals the rank of A.
- Row-reduce A to find which column positions are pivots, then pull those exact columns from the original matrix A, never from the RREF.
- Row operations preserve linear dependence relationships among columns even though they change the columns' actual values.
- Row space works the opposite way: for a row space basis, the RREF rows themselves are the answer, no need to return to the original matrix.
- Ax = b has a solution exactly when b lies in col(A), which is what makes a column space basis practically useful, not just theoretical.
What the Column Space Actually Is

Given an m×n matrix A, the column space (also called the range of A) is the subspace of ℝᵐ spanned by the columns of A. Formally:
col(A) = { Ax : x ∈ ℝⁿ }
If A has columns a₁, a₂, …, aₙ, then col(A) = span(a₁, a₂, …, aₙ). The question is which of those columns are redundant. Some columns may be linear combinations of others, so including them in a basis would violate the independence requirement.
A basis for col(A) is a linearly independent set of vectors that spans the entire column space. Its size equals the rank of A, so a rank-2 matrix always has a 2-dimensional column space, regardless of how many columns it has. Wikipedia's row and column spaces article states this rank connection directly: rank(A) equals both dim(row space) and dim(column space).
Why You Use the Original Columns, Not the RREF Columns
This is the detail that trips people up most often. You row-reduce A to find which column positions contain pivots. But you return to the original matrix A to pick the actual basis vectors from those positions.
Row operations change the column space. The reduced matrix R and the original matrix A do not have the same column space (unless A is already in RREF). What row operations preserve is the linear dependence relationships among the columns. If column 3 of A is a linear combination of columns 1 and 2, the same relationship holds in R. So the pivot positions identified in R tell you which columns of A are linearly independent, but the vectors themselves must come from A.
See pivot positions and pivot columns for a deeper look at how pivots encode dependency structure.
| Step | Where you work | What you're looking for |
|---|---|---|
| 1. Row-reduce | On A (or a copy of it) | Getting to RREF or REF |
| 2. Identify pivots | In the reduced matrix | Which column indices have a leading entry |
| 3. Collect the basis | Back in the original A | The columns at those same indices |
| 4. State dimension | Either matrix | Number of pivots = rank = dim(col(A)) |
The Step-by-Step Procedure
- Write down the matrix A.
- Row-reduce A to RREF (or at least to row echelon form).
- Identify the pivot columns by their positions (column indices with leading 1s).
- Return to the original matrix A.
- Extract the columns at those pivot positions.
- Those columns form a basis for col(A).
The number of pivot columns equals the rank of A, which equals the dimension of col(A). For more on computing rank, see how to find the rank of a matrix.
Fully Worked Example
Let's find a basis for the column space of:
A = [ 1 2 3 2 ]
[ 2 4 7 5 ]
[ 3 6 9 6 ]
Step 1: Row-reduce A.
Start with the augmented form and apply elimination:
R2 ← R2 - 2·R1
R3 ← R3 - 3·R1
[ 1 2 3 2 ]
[ 0 0 1 1 ]
[ 0 0 0 0 ]
Now eliminate the entry above the second pivot:
R1 ← R1 - 3·R2
[ 1 2 0 -1 ]
[ 0 0 1 1 ]
[ 0 0 0 0 ]
Step 2: Identify pivot columns.
The pivots are in columns 1 and 3. Column 2 and column 4 are free columns (no leading 1 in those positions).
Step 3: Return to the original matrix A.
Column 1 of A: [1, 2, 3]ᵀ Column 3 of A: [3, 7, 9]ᵀ
Step 4: State the basis.
basis for col(A) = { [1, 2, 3]ᵀ, [3, 7, 9]ᵀ }
The column space is a 2-dimensional subspace of ℝ³. The rank of A is 2.
Sanity check: Column 2 of A is [2, 4, 6]ᵀ = 2·[1, 2, 3]ᵀ, which is clearly a multiple of column 1. Column 4 is [2, 5, 6]ᵀ. From the RREF we can read the dependency: column 4 = -1·(col 1) + 1·(col 3), or [2, 5, 6]ᵀ = -[1, 2, 3]ᵀ + [3, 7, 9]ᵀ = [2, 5, 6]ᵀ. That checks out. This is the general pattern: the RREF's free column entries (here, -1 and 1 in column 4's reduced form) tell you exactly how to write that column as a combination of the pivot columns, and it works with the original vectors, not just the reduced ones.
Dimension of the Column Space and Rank
The dimension of col(A) equals the number of pivot columns, which equals the rank of A. This connects the column space to several other fundamental quantities through the rank-nullity theorem:
rank(A) + nullity(A) = n (number of columns)
Where nullity(A) is the dimension of the null space, the set of solutions to Ax = 0 (see Wikipedia's kernel of a linear map for the formal definition). A matrix with rank r has an r-dimensional column space and an (n-r)-dimensional null space. These two subspaces together account for all n columns.
For the worked example above, n = 4 and rank = 2, so nullity = 2. That matches the two free columns (2 and 4) found during reduction: each free variable contributes one dimension to the null space.
This relationship is explored further in row space, column space, and null space, which covers how all three spaces fit together geometrically.
One practical consequence: if you have a system Ax = b, the system has a solution exactly when b lies in col(A). So knowing a basis for col(A) lets you test solvability and describe all achievable outputs of A. If b is not a combination of the basis vectors you found, no x exists that solves Ax = b, and you'll see that show up as a contradiction row when you row-reduce the augmented matrix [A | b].
Column Space vs. Row Space
The column space of A and the row space of A are different subspaces, generally in different ambient spaces. If A is m×n:
- col(A) ⊆ ℝᵐ (spanned by columns, lives in the domain of output vectors)
- row(A) ⊆ ℝⁿ (spanned by rows, lives in the domain of input vectors)
Both have dimension equal to rank(A), which is a non-obvious fact. To find a basis for the row space, you actually do take the nonzero rows from RREF directly. The rule flips: for rows, the RREF vectors themselves form the basis; for columns, you go back to the original.
This asymmetry catches a lot of students off guard. Keep the distinction sharp: RREF rows are used as-is for row space; RREF pivot positions are used as pointers back to original columns for column space. A useful way to remember which rule applies: row operations are built entirely out of combining rows, so they can never distort the row space, but they routinely change what a given column looks like, which is exactly why the column values themselves become unreliable after reduction.
Frequently Asked Questions
Can I use the pivot columns from RREF as the column space basis?
No. The RREF pivot columns span a space with the same dimension as col(A), but they are not the same vectors as the original columns, so they do not represent col(A) correctly. The RREF of a 3×4 matrix might have pivot columns [1,0,0]ᵀ and [0,1,0]ᵀ, which clearly aren't the same as the original columns of A. Always return to A after identifying pivot positions.
How does the column space basis relate to linear independence?
The pivot columns of A are linearly independent by construction. Any free column can be written as a linear combination of the pivot columns to its left, which the RREF makes explicit. So the pivot columns form the largest independent subset of A's column set that still spans the entire column space. This connection is covered in RREF and linear independence.
What if two different row reductions give different pivot positions?
They won't, assuming you're doing standard Gaussian elimination without column swaps. The pivot positions are invariants of the matrix. Different valid sequences of row operations will always produce the same pivot columns (in the same positions), because the rank and the dependency structure among columns don't change under row operations.
How is the column space basis related to the null space?
They describe complementary aspects of A. The column space tells you what Ax can produce; the null space tells you which x vectors produce zero. A full picture of a matrix requires both. For the null space analog of this procedure, see how to find a basis for the null space, which uses the free variable expressions from RREF directly.
Does a square, invertible matrix have a special column space?
Yes. If A is n×n and invertible, its rank is n, so its column space is all of ℝⁿ. Every column is a pivot column, and the basis is simply the full set of original columns. This matches the intuition that an invertible matrix can produce any output vector b, since Ax = b always has a (unique) solution.
What happens to the column space basis if I scale one column of A?
Scaling a single column by a nonzero constant does not change whether that column is a pivot column, since column operations of that kind don't interact with the row-reduction process the same way row operations do. But it does change the actual basis vector you report: if column 1 becomes 3 times its original values, the basis vector you extract from the (new) original matrix is scaled accordingly. The dimension of the column space stays the same either way.