Column Space Calculator
Find a basis for the column space of a matrix using row reduction, pivot columns, rank, nullity, and RREF.
Column space from pivot columns
The column space of a matrix is the span of its column vectors. This calculator row-reduces the matrix, identifies pivot columns, and uses the matching original columns as a basis for the column space.
A column space calculator finds the span of a matrix's column vectors. It identifies pivot columns, reduces the matrix to row echelon form, and returns a basis for the column space. Use it to determine rank, linear independence, and whether a vector belongs to the column space.
You can enter integers, decimals, or simple fractions such as 3/4. The result includes the RREF matrix, pivot column numbers, rank, nullity, and a basis written as column vectors.
Important: the basis vectors come from the original matrix, not from the RREF. The RREF only tells you which original columns are pivot columns.
Column space result
--
Pivot columns
--
Column numbers in the original matrix
Rank
--
Dimension of the column space
Nullity
--
Number of free variables
Basis size
--
Number of independent columns
Target vector membership
--
Optional Ax = b consistency check
Column space basis
RREF of A
Dependency relations
Step-by-step summary
--
--
How to use the column space calculator
- Choose the matrix size: Set the number of rows and columns, or load one of the sample matrices.
- Enter matrix entries: Type integers, decimals, or fractions such as 1/2 into the grid.
- Calculate: The calculator row-reduces the matrix to RREF and records pivot columns.
- Read the basis: The column space basis uses the original matrix columns that match the pivot columns.
- Check rank and nullity: Rank is the number of pivot columns, and nullity is columns minus rank.
- Use the optional target vector: Enter b to test whether Ax = b is consistent, which tells you whether b is in the column space.
Extra checks this calculator gives you
A basic column-space tool can stop at rank and a basis. This calculator also helps answer the follow-up questions that usually appear in linear algebra homework: which columns are dependent, what vector combinations they represent, and whether a target vector is reachable as Ax.
Membership test
Enter a target vector b and the calculator checks whether Ax = b is consistent.
Dependency formulas
Each non-pivot column is written as a linear combination of pivot columns when possible.
Original-column basis
The output reminds you to use original matrix columns, not RREF columns, for the basis.
Pivot-column reference: Georgia Tech Interactive Linear Algebra - Basis and Dimension.
Column space formula and meaning
For an m x n matrix A, the column space Col(A) is the set of all linear combinations of the columns of A. It is a subspace of R^m because each column has m entries.
Col(A) = span{a1, a2, ..., an}
Basis for Col(A) = original pivot columns of A
dim Col(A) = rank(A)
Row operations can change the actual column vectors, so the RREF tells you where the pivots are, but the basis must be taken from the original matrix.
Column space reference: MIT OpenCourseWare - Column Space and Nullspace.
Worked examples
| Matrix type | Pivot columns | Rank | Column space basis |
|---|---|---|---|
| Identity 3x3 | 1, 2, 3 | 3 | All three standard basis columns |
| Dependent 3x3 | Usually fewer than 3 | Less than number of columns | Only the independent original columns |
| Zero matrix | None | 0 | Empty basis for the zero subspace |
| Wide matrix | At most number of rows | Cannot exceed row count | Pivot columns from the original matrix |
How to test whether a vector is in the column space
A vector b is in Col(A) exactly when the equation Ax = b has at least one solution. In practice, you attach b as an extra column to form the augmented matrix [A | b], row-reduce it, and check whether the system is consistent.
b is in Col(A) if Ax = b is consistent
Row-reduce [A | b]
No contradiction row means b belongs to the column space
A contradiction row looks like [0 0 0 | nonzero]. If that appears after row reduction, b cannot be made from a linear combination of the columns of A.
Column space as the output of a transformation
If A is an m x n matrix, multiplying A by an input vector x creates an output vector Ax in R^m. The column space is the full set of outputs that the transformation can produce.
Every output
Each Ax is a linear combination of the columns of A, so every output lands inside Col(A).
Reachable vectors
If a vector is not in Col(A), no input x can produce it. The equation Ax = b has no solution.
Onto check
A maps onto all of R^m only when every row has a pivot, so rank(A) equals m.
Rank, nullity, and dependency reference
| RREF clue | What it means | Column space result | Null space result |
|---|---|---|---|
| Pivot in every column | Columns are independent | Basis uses every original column | Nullity is 0 |
| Some columns are free | Some columns are dependent | Basis uses only original pivot columns | Nullity is greater than 0 |
| Pivot in every row | Ax = b is consistent for every b in R^m | Column space is all of R^m | May still have free variables if columns exceed rows |
| No pivots | Zero matrix | Column space is {0} | Every variable is free |
Rank plus nullity equals the number of columns. This is a fast way to check whether your pivot count and free-variable count agree.
Rank and nullity reference: TU Delft Interactive Linear Algebra - Basis and Dimension.
What to check before copying the answer
Column space problems are easy to mix up because row-reduction changes the matrix. The safest method is to use RREF only to identify pivot positions, then return to the original matrix for the actual basis vectors.
Original columns
Do not use the RREF columns as the basis for Col(A). Use the original columns in the pivot positions.
Rank check
The number of basis vectors must equal the rank. If it does not, something was copied incorrectly.
Subspace size
For an m x n matrix, Col(A) lives in R^m, not R^n. The row count controls the vector length.
Interesting fact
A matrix can have many columns but a much smaller column space dimension. For example, a 3 x 6 matrix has six column vectors, but its rank can never exceed 3 because each column lives in R^3. This is why wide matrices often have dependent columns.
Frequently Asked Questions
What is the column space of a matrix in linear algebra?
The column space of a matrix is the span of all its column vectors. It contains every vector that can be made by taking a linear combination of the matrix columns, so it describes all possible outputs of the linear transformation x -> Ax. If A has m rows, then the column space is a subspace of R^m, and each solution to the equation Ax = b depends on whether b belongs to that space.
How do I find a basis for the column space with row reduction?
Use row reduction to put the matrix into RREF, identify each pivot column, then select those same column numbers from the original matrix. Those original pivot columns form a basis for the column space because they are linearly independent and span every other column. This is exactly what the calculator reports: pivot positions, basis vectors, rank, and the final answer.
Why not use the pivot columns from the RREF as the answer?
Row operations preserve dependency and independence relationships among columns, but they can change the actual vector entries. The RREF is a tool for locating pivot positions, not usually the source of the final column space basis. After the calculator finds the pivots, it returns the matching original columns of A so the basis still lives in the correct subspace.
Is column space the same as row space or null space?
No. Column space is made from column vectors and lives in R^m for an m x n matrix. Row space is made from row vectors and lives in R^n, while the null space contains input vectors x that solve Ax = 0. Row space and column space have the same dimension, called the rank, but they are usually different subspaces with different vector lengths.
What does rank tell me about column space dimension?
The rank is the dimension of the column space. It tells you how many independent column directions the matrix has and how many vectors appear in a basis. If the rank equals the number of columns, the columns are independent. If the rank is smaller, at least one column has a dependency and can be written as a linear combination of pivot columns.
How do I check whether b is in the column space?
Enter b in the optional target vector area. The calculator row-reduces the augmented matrix [A | b] and checks whether Ax = b has a solution. If the system is consistent, b is in the column space; if it has a contradiction row, b is outside Col(A).
What are dependency relations between columns?
A dependency relation shows how a non-pivot column can be built from pivot columns. For example, C3 = C1 + C2 means the third column is not adding a new direction to the span. These relations explain why the basis can leave out dependent columns without changing the column space.
Other useful calculators
Disclaimer: This column space calculator is for general educational and informational use only. It uses numeric row reduction with rounded display output, so exact symbolic results may differ in courses that require exact rational arithmetic. Always verify notation, rounding, row-reduction steps, and required answer format with your textbook, instructor, or assignment directions.
Last updated: May 20, 2026