🧮
🧮 Math & statistics

Column Space Calculator (basis and dimension of Col A from pivot columns)

Results update as you type.

Your numbers

Understanding the column space calculator — concept and principle

This calculator finds a basis and the dimension of the column space of a matrix, using its pivot columns. It also shows the reduced row echelon form, the pivot positions, a basis of the row space and whether the columns span all of ℝᵐ. Use it for linear algebra homework on span, rank and the solvability of Ax = b.

Column spacePivot columns span Col(A)A120−1−2−345240−2RREF10−8−701430000pivots in columns 1, 2 → basis (1, −2, 2), (2, −3, 4)dim Col(A) = rank = 2
Take the basis from the original columns where RREF has pivots, not from RREF itself.

How it is calculated

  1. Row-reduce A to reduced row echelon form (RREF).
  2. Note the columns that contain a pivot (leading 1).
  3. The pivot columns of the original matrix A form a basis of Col(A).
  4. Dimension of Col(A) = number of pivots = rank of A.
  5. The non-zero rows of the RREF form a basis of Row(A), which has the same dimension.

The principle

The column space is the set of all combinations of the columns of A, which is exactly the set of vectors b for which Ax = b has a solution. Row operations change the columns, so the RREF's columns are not a basis of Col(A); but they keep the linear relations between columns. A non-pivot column in the RREF is a combination of earlier pivot columns, and the same combination holds in A. So the original pivot columns span everything and are independent. Row operations do not change the row space, which is why the RREF rows can be used for Row(A).

Worked example

Default input: A = [1 2 0 −1; −2 −3 4 5; 2 4 0 −2].

  1. RREF of A = [1 0 −8 −7; 0 1 4 3; 0 0 0 0].
  2. Pivot columns: 1, 2.
  3. Basis of Col(A): columns 1 and 2 of A, (1, −2, 2) and (2, −3, 4).
  4. Dimension of Col(A) = rank = 2.
  5. Basis of Row(A): (1, 0, −8, −7) and (0, 1, 4, 3). Col(A) does not fill ℝ³: no — it is a 2-dimensional subspace of ℝ³.

How to read the result

If the rank equals the number of rows m, every b in ℝᵐ is reachable. Here the rank is 2, so Col(A) is a plane through the origin in ℝ³, and Ax = b has solutions only for b in that plane. The RREF also shows the dependencies: column 3 = −8 × column 1 + 4 × column 2, which you can check in A.

Common mistakes

Keep in mind: With decimal data, near-zero values may be rounding noise. The tolerance helps, but very ill-conditioned matrices can still give a misleading rank.

Frequently asked questions

What is the column space of a matrix?

The set of all linear combinations of its columns, a subspace of ℝᵐ.

Why use the original columns, not the RREF columns?

Row operations change the columns but keep their linear relations, so only the original pivot columns lie in Col(A).

Is the dimension of the column space the rank?

Yes, and it equals the dimension of the row space.

Sources: D. Margalit & J. Rabinoff, Interactive Linear Algebra, §2.7 Basis and Dimension

Checked 9 Nov 2026. D. Margalit & J. Rabinoff, Interactive Linear Algebra, §2.7 Basis and Dimension — Theorem 1 (the pivot columns of A form a basis for Col(A)), Note 2 (pivot columns of the original matrix, not of its RREF), Corollary 1 (dim Col(A) = number of pivots), Example 6 (the default matrix). Row-space basis from the non-zero RREF rows: standard result (row operations preserve the row space).

🧮 All math & statistics tools →🌍 Calculators by country →