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.

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.

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.

The Step-by-Step Procedure

  1. Write down the matrix A.
  2. Row-reduce A to RREF (or at least to row echelon form).
  3. Identify the pivot columns by their positions (column indices with leading 1s).
  4. Return to the original matrix A.
  5. Extract the columns at those pivot positions.
  6. 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.

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. 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.

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.

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:

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.

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.