Column Space Basis Calculator
Find a basis for the column space of a matrix, which consists of all possible linear combinations of its columns. The pivot columns of the original matrix provide a linearly independent basis for this subspace.
A
Learn About Column Space Basis
In linear algebra, the column space (also known as the range or image) of a matrix $\mathbf{A} \in \mathbb{R}^{m \times n}$ is the set of all possible linear combinations of its column vectors. It forms a vector subspace of the codomain $\mathbb{R}^m$:
The column space answers a fundamental linear algebra question: for which target vectors $\mathbf{b} \in \mathbb{R}^m$ is the linear system $\mathbf{A}\mathbf{x} = \mathbf{b}$ solvable? A solution exists if and only if $\mathbf{b}$ lies within $\operatorname{Col}(\mathbf{A})$.
Basis Extraction Algorithm via RREF
Because the column vectors of $\mathbf{A}$ may be linearly dependent, they do not generally form a minimal linearly independent basis. To extract a basis:
- Reduce to RREF: Compute the Reduced Row Echelon Form $\operatorname{RREF}(\mathbf{A})$ using elementary row operations.
- Locate Pivot Columns: Identify the column indices containing leading pivots ($1$s).
- Select Original Columns: Form the basis using the column vectors from the original matrix $\mathbf{A}$ located at those exact pivot indices.
The Critical RREF Distinction
[!IMPORTANT]
You must never use the columns of $\operatorname{RREF}(\mathbf{A})$ as the basis for $\operatorname{Col}(\mathbf{A})$. Elementary row operations change the column space ($\operatorname{Col}(\operatorname{RREF}(\mathbf{A})) \ne \operatorname{Col}(\mathbf{A})$). The RREF serves solely as an index map identifying which original columns are linearly independent.
Dimension and Rank
The dimension of the column space equals the number of pivot columns, which defines the rank of the matrix:
Worked Numerical Example
Find a basis and dimension for the column space of:
- Row Reduce to RREF:
- $R_2 \leftarrow R_2 - 2R_1 \implies [0, 0, 1]$
- $R_1 \leftarrow R_1 - 3R_2 \implies [1, 2, 0]$
- Identify Pivot Columns:
- Column $1$ has a leading pivot in Row 1.
- Column $2$ is non-pivot (free variable).
- Column $3$ has a leading pivot in Row 2.
- Pivot column indices: $\{1, 3\}$.
- Extract Basis from Original Matrix:
Notice that original column $2$ is redundant: $\begin{bmatrix} 2 \\ 4 \end{bmatrix} = 2\mathbf{c}_1$.
Why do row operations alter the column space but preserve the row space?
Elementary row operations replace rows with linear combinations of other rows. This leaves the span of the rows unchanged ($\operatorname{Row}(\mathbf{A}) = \operatorname{Row}(\operatorname{RREF}(\mathbf{A}))$). However, row operations recombine vertical column components across different equations, completely altering the geometric subspace spanned by the column vectors.
What is the relationship between the column space and the range of a linear transformation?
They are identical concepts under different terminology. If $T: \mathbb{R}^n \to \mathbb{R}^m$ is the linear transformation defined by $T(\mathbf{x}) = \mathbf{A}\mathbf{x}$, the range of $T$ is the set of all outputs $\{T(\mathbf{x}) \mid \mathbf{x} \in \mathbb{R}^n\}$, which equals $\operatorname{Col}(\mathbf{A})$.
When does the column space span all of $\mathbb{R}^m$?
The column space spans the entire codomain $\mathbb{R}^m$ if and only if $\operatorname{rank}(\mathbf{A}) = m$ (full row rank). In this case, $\mathbf{A}\mathbf{x} = \mathbf{b}$ has at least one solution for every possible vector $\mathbf{b} \in \mathbb{R}^m$, meaning the linear map is surjective (onto).
Can the column space have dimension zero?
Yes, but only for the zero matrix $\mathbf{A} = \mathbf{0}_{m \times n}$. In that case, $\operatorname{rank}(\mathbf{A}) = 0$, and the column space contains only the zero vector: $\operatorname{Col}(\mathbf{A}) = \{\mathbf{0}_m\}$, with dimension $0$ and basis $\emptyset$.
- Fundamental Theorem of Linear Algebra: In 1993, Gilbert Strang published his celebrated "Four Fundamental Subspaces" framework, highlighting that the column space $\operatorname{Col}(\mathbf{A})$ in $\mathbb{R}^m$ is the exact orthogonal complement of the left null space $\operatorname{Null}(\mathbf{A}^T)$:
- Equal Row and Column Ranks: Although the row vectors live in $\mathbb{R}^n$ and the column vectors live in $\mathbb{R}^m$, the dimension of the column space always equals the dimension of the row space ($\dim(\operatorname{Col}(\mathbf{A})) = \dim(\operatorname{Row}(\mathbf{A}))$), representing one of the deepest dualities in algebra.