CipherMatrix

Null Space, Column Space and Basis Calculator

Enter a matrix to find bases and dimensions of its four fundamental subspaces, test whether its columns are linearly independent, and see every row operation behind the answer.

The four fundamental subspaces

Every m×n matrix A carries four subspaces. The column space Col(A) is the span of the columns, a subspace of ℝm, and it is the set of all vectors b for which Ax = b has a solution. The row space Row(A) is the span of the rows, a subspace of ℝn. The null space Null(A) is the set of solutions of Ax = 0, also called the kernel. The left null space is the null space of Aᵀ.

The first two have the same dimension, the rank r of A. The null space has dimension n − r and the left null space has dimension m − r. The rank–nullity theorem, rank + nullity = n, ties them together, and this calculator verifies it exactly on every run.

How each basis is found

Everything starts from the reduced row echelon form (RREF), which the calculator shows row operation by row operation.

  • Column space: take the columns of the original matrix A that contain pivots in the RREF. Row operations change the columns, so the pivot columns of the RREF itself are not a basis of Col(A).
  • Row space: take the non-zero rows of the RREF. Row operations never change the row space.
  • Null space: each free variable (a column without a pivot) gives one basis vector: set that variable to 1, the other free variables to 0 and solve for the pivot variables.
  • Left null space: repeat the null space procedure for the transpose Aᵀ.

Linear independence and dimension

A set of vectors is linearly independent when the only combination that equals the zero vector is the trivial one. Put the vectors in the columns of a matrix: they are independent exactly when the null space contains only the zero vector, that is, when the rank equals the number of vectors. If they are dependent, the null space vector gives an explicit dependence relation, which the calculator prints. The dimension of a subspace is the number of vectors in any basis of it.

Using the calculator for vectors and subspaces

To find a basis for the span of some vectors, enter them as the columns of a matrix. The basis the calculator gives for Col(A) is a subset of your vectors, so you also learn which ones are redundant. To describe the solution set of a homogeneous system, read the null space basis. Exact fractions are used throughout, so a pivot is never lost to rounding.

Worked examples

These examples are computed by the same engine as the calculator above, so you can compare each step with your own working.

A 3×4 matrix with a repeated direction

  • Matrix A: [[1, 2, 1, 3], [2, 4, 0, 2], [3, 6, 1, 5]]
rank(A) = dim Col(A)
2
dim Row(A) = 2
nullity = dim Null(A)
2
dim Null(Aᵀ) = 1
Basis of Col(A)
(1, 2, 3)ᵀ, (1, 0, 1)ᵀ
Basis of Row(A)
(1, 2, 0, 1), (0, 0, 1, 2)
Basis of Null(A)
(−2, 1, 0, 0)ᵀ, (−1, 0, −2, 1)ᵀ
Bases are not unique. Another correct basis spans the same space; the dimensions are always the same.

Step-by-step solution

Formula used
Col(A) = span of the columns; Row(A) = span of the rows; Null(A) = {x : Ax = 0}
rank(A) + nullity(A) = n (number of columns)
Basis of Col(A): pivot columns of A; basis of Row(A): non-zero rows of RREF; basis of Null(A): one vector per free variable
  1. NoteThe matrix
    A is 3×4. Its columns are vectors in ℝ³ and its rows are vectors in ℝ⁴.
    A =121324023615
  2. StartReduce A to RREF
    A is 3×4. Work column by column from left to right. The current pivot row is called r (starting at row 1).
    Allowed row operations (they never change the rank): swap two rows, multiply a row by a nonzero number, add a multiple of one row to another.
    121324023615
  3. PivotPivot selection (column 1)
    pivot = a₁₁ = 1
    Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 1 (row 1). It already sits in the pivot position (1, 1).
    121324023615
  4. Row additionElimination below the pivot (column 1)
    R₂ ← R₂ - 2·R₁
    Goal: turn a₂₁ = 2 into 0 using the pivot row R₁. (R₂ ← R₂ - (2)·R₁)
    new R₂ = [2, 4, 0, 2] - (2)·[1, 2, 1, 3] = [0, 0, -2, -4]
    121300−2−43615
  5. Row additionElimination below the pivot (column 1)
    R₃ ← R₃ - 3·R₁
    Goal: turn a₃₁ = 3 into 0 using the pivot row R₁. (R₃ ← R₃ - (3)·R₁)
    new R₃ = [3, 6, 1, 5] - (3)·[1, 2, 1, 3] = [0, 0, -2, -4]
    121300−2−400−2−4
  6. No pivotColumn 2: no pivot
    Every entry of column 2 from row 2 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₂).
    121300−2−400−2−4
  7. PivotPivot selection (column 3)
    pivot = a₂₃ = -2
    Scan column 3 from row 2 downward: the first nonzero entry is a₂₃ = -2 (row 2). It already sits in the pivot position (2, 3).
    121300−2−400−2−4
  8. Row multiplyRow multiplication
    R₂ ← (-1/2)·R₂
    Divide row 2 by the pivot -2 (multiply by 1/(-2) = -1/2) so the pivot becomes 1.
    new R₂ = [0, 0, -2, -4] · (-1/2) = [0, 0, 1, 2]
    1213001200−2−4
  9. Row additionElimination below the pivot (column 3)
    R₃ ← R₃ + 2·R₂
    Goal: turn a₃₃ = -2 into 0 using the pivot row R₂. (R₃ ← R₃ - (-2)·R₂)
    new R₃ = [0, 0, -2, -4] - (-2)·[0, 0, 1, 2] = [0, 0, 0, 0]
    121300120000
  10. No pivotColumn 4: no pivot
    Every entry of column 4 from row 3 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₃).
    121300120000
  11. ResultRow echelon form (REF) reached
    Each pivot is 1, each pivot lies to the right of the pivot above it, and everything below a pivot is 0.
    Number of pivots = 2; the last 1 row(s) are all zeros.
    121300120000
  12. Row additionEliminate above the pivot (column 3)
    R₁ ← R₁ - R₂
    Goal: turn a₁₃ = 1 into 0 using the pivot row R₂. (R₁ ← R₁ - (1)·R₂)
    new R₁ = [1, 2, 1, 3] - (1)·[0, 0, 1, 2] = [1, 2, 0, 1]
    120100120000
  13. ResultReduced row echelon form (RREF) reached
    Every pivot is 1 and is the only nonzero entry in its column. The RREF of a matrix is unique.
    120100120000
  14. NotePivots and rank
    Pivot columns: 1, 3
    rank(A) = 2 (number of pivots)
    Free variables: x2, x4
  15. CalculateColumn space Col(A): basis from the pivot columns of A
    use the original columns that hold pivots in the RREF
    column 1 = (1, 2, 3)ᵀ
    column 3 = (1, 0, 1)ᵀ
  16. CalculateRow space Row(A): basis from the non-zero rows of the RREF
    row 1 = (1, 2, 0, 1)
    row 2 = (0, 0, 1, 2)
  17. CalculateNull space Null(A): solve A x = 0
    each free variable gives one basis vector
    x2 = 1, other free variables 0: (−2, 1, 0, 0)ᵀ
    x4 = 1, other free variables 0: (−1, 0, −2, 1)ᵀ
  18. CalculateLeft null space Null(Aᵀ): solve Aᵀ y = 0
    (−1, −1, 1)ᵀ
  19. CheckVerification
    rank + nullity = 2 + 2 = 4 = number of columns ✓
    A·v = 0 for every null space basis vector (exact) ✓
    Pivot columns are independent and have rank 2 ✓
    Row-space basis spans the same space as the rows of A (rank of the stack is still 2) ✓
    dim Col = dim Row = 2; dim Null(Aᵀ) = 1 = m − r ✓
  20. ResultAre the columns linearly independent?
    No: nullity 2 > 0. A dependence relation from the first null space vector: (−2)·col1 + (1)·col2 = 0.

Null space of a 3×4 matrix

  • Matrix A: [[1, 2, 3, 4], [2, 4, 7, 9], [1, 2, 4, 5]]
rank(A) = dim Col(A)
2
dim Row(A) = 2
nullity = dim Null(A)
2
dim Null(Aᵀ) = 1
Basis of Col(A)
(1, 2, 1)ᵀ, (3, 7, 4)ᵀ
Basis of Row(A)
(1, 2, 0, 1), (0, 0, 1, 1)
Basis of Null(A)
(−2, 1, 0, 0)ᵀ, (−1, 0, −1, 1)ᵀ
Bases are not unique. Another correct basis spans the same space; the dimensions are always the same.

Step-by-step solution

Formula used
Col(A) = span of the columns; Row(A) = span of the rows; Null(A) = {x : Ax = 0}
rank(A) + nullity(A) = n (number of columns)
Basis of Col(A): pivot columns of A; basis of Row(A): non-zero rows of RREF; basis of Null(A): one vector per free variable
  1. NoteThe matrix
    A is 3×4. Its columns are vectors in ℝ³ and its rows are vectors in ℝ⁴.
    A =123424791245
  2. StartReduce A to RREF
    A is 3×4. Work column by column from left to right. The current pivot row is called r (starting at row 1).
    Allowed row operations (they never change the rank): swap two rows, multiply a row by a nonzero number, add a multiple of one row to another.
    123424791245
  3. PivotPivot selection (column 1)
    pivot = a₁₁ = 1
    Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 1 (row 1). It already sits in the pivot position (1, 1).
    123424791245
  4. Row additionElimination below the pivot (column 1)
    R₂ ← R₂ - 2·R₁
    Goal: turn a₂₁ = 2 into 0 using the pivot row R₁. (R₂ ← R₂ - (2)·R₁)
    new R₂ = [2, 4, 7, 9] - (2)·[1, 2, 3, 4] = [0, 0, 1, 1]
    123400111245
  5. Row additionElimination below the pivot (column 1)
    R₃ ← R₃ - R₁
    Goal: turn a₃₁ = 1 into 0 using the pivot row R₁. (R₃ ← R₃ - (1)·R₁)
    new R₃ = [1, 2, 4, 5] - (1)·[1, 2, 3, 4] = [0, 0, 1, 1]
    123400110011
  6. No pivotColumn 2: no pivot
    Every entry of column 2 from row 2 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₂).
    123400110011
  7. PivotPivot selection (column 3)
    pivot = a₂₃ = 1
    Scan column 3 from row 2 downward: the first nonzero entry is a₂₃ = 1 (row 2). It already sits in the pivot position (2, 3).
    123400110011
  8. Row additionElimination below the pivot (column 3)
    R₃ ← R₃ - R₂
    Goal: turn a₃₃ = 1 into 0 using the pivot row R₂. (R₃ ← R₃ - (1)·R₂)
    new R₃ = [0, 0, 1, 1] - (1)·[0, 0, 1, 1] = [0, 0, 0, 0]
    123400110000
  9. No pivotColumn 4: no pivot
    Every entry of column 4 from row 3 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₃).
    123400110000
  10. ResultRow echelon form (REF) reached
    Each pivot is 1, each pivot lies to the right of the pivot above it, and everything below a pivot is 0.
    Number of pivots = 2; the last 1 row(s) are all zeros.
    123400110000
  11. Row additionEliminate above the pivot (column 3)
    R₁ ← R₁ - 3·R₂
    Goal: turn a₁₃ = 3 into 0 using the pivot row R₂. (R₁ ← R₁ - (3)·R₂)
    new R₁ = [1, 2, 3, 4] - (3)·[0, 0, 1, 1] = [1, 2, 0, 1]
    120100110000
  12. ResultReduced row echelon form (RREF) reached
    Every pivot is 1 and is the only nonzero entry in its column. The RREF of a matrix is unique.
    120100110000
  13. NotePivots and rank
    Pivot columns: 1, 3
    rank(A) = 2 (number of pivots)
    Free variables: x2, x4
  14. CalculateColumn space Col(A): basis from the pivot columns of A
    use the original columns that hold pivots in the RREF
    column 1 = (1, 2, 1)ᵀ
    column 3 = (3, 7, 4)ᵀ
  15. CalculateRow space Row(A): basis from the non-zero rows of the RREF
    row 1 = (1, 2, 0, 1)
    row 2 = (0, 0, 1, 1)
  16. CalculateNull space Null(A): solve A x = 0
    each free variable gives one basis vector
    x2 = 1, other free variables 0: (−2, 1, 0, 0)ᵀ
    x4 = 1, other free variables 0: (−1, 0, −1, 1)ᵀ
  17. CalculateLeft null space Null(Aᵀ): solve Aᵀ y = 0
    (1, −1, 1)ᵀ
  18. CheckVerification
    rank + nullity = 2 + 2 = 4 = number of columns ✓
    A·v = 0 for every null space basis vector (exact) ✓
    Pivot columns are independent and have rank 2 ✓
    Row-space basis spans the same space as the rows of A (rank of the stack is still 2) ✓
    dim Col = dim Row = 2; dim Null(Aᵀ) = 1 = m − r ✓
  19. ResultAre the columns linearly independent?
    No: nullity 2 > 0. A dependence relation from the first null space vector: (−2)·col1 + (1)·col2 = 0.

Redundant column

  • Matrix A: [[1, 2, 0, 1], [2, 4, 1, 3], [3, 6, 1, 4]]
rank(A) = dim Col(A)
2
dim Row(A) = 2
nullity = dim Null(A)
2
dim Null(Aᵀ) = 1
Basis of Col(A)
(1, 2, 3)ᵀ, (0, 1, 1)ᵀ
Basis of Row(A)
(1, 2, 0, 1), (0, 0, 1, 1)
Basis of Null(A)
(−2, 1, 0, 0)ᵀ, (−1, 0, −1, 1)ᵀ
Bases are not unique. Another correct basis spans the same space; the dimensions are always the same.

Step-by-step solution

Formula used
Col(A) = span of the columns; Row(A) = span of the rows; Null(A) = {x : Ax = 0}
rank(A) + nullity(A) = n (number of columns)
Basis of Col(A): pivot columns of A; basis of Row(A): non-zero rows of RREF; basis of Null(A): one vector per free variable
  1. NoteThe matrix
    A is 3×4. Its columns are vectors in ℝ³ and its rows are vectors in ℝ⁴.
    A =120124133614
  2. StartReduce A to RREF
    A is 3×4. Work column by column from left to right. The current pivot row is called r (starting at row 1).
    Allowed row operations (they never change the rank): swap two rows, multiply a row by a nonzero number, add a multiple of one row to another.
    120124133614
  3. PivotPivot selection (column 1)
    pivot = a₁₁ = 1
    Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 1 (row 1). It already sits in the pivot position (1, 1).
    120124133614
  4. Row additionElimination below the pivot (column 1)
    R₂ ← R₂ - 2·R₁
    Goal: turn a₂₁ = 2 into 0 using the pivot row R₁. (R₂ ← R₂ - (2)·R₁)
    new R₂ = [2, 4, 1, 3] - (2)·[1, 2, 0, 1] = [0, 0, 1, 1]
    120100113614
  5. Row additionElimination below the pivot (column 1)
    R₃ ← R₃ - 3·R₁
    Goal: turn a₃₁ = 3 into 0 using the pivot row R₁. (R₃ ← R₃ - (3)·R₁)
    new R₃ = [3, 6, 1, 4] - (3)·[1, 2, 0, 1] = [0, 0, 1, 1]
    120100110011
  6. No pivotColumn 2: no pivot
    Every entry of column 2 from row 2 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₂).
    120100110011
  7. PivotPivot selection (column 3)
    pivot = a₂₃ = 1
    Scan column 3 from row 2 downward: the first nonzero entry is a₂₃ = 1 (row 2). It already sits in the pivot position (2, 3).
    120100110011
  8. Row additionElimination below the pivot (column 3)
    R₃ ← R₃ - R₂
    Goal: turn a₃₃ = 1 into 0 using the pivot row R₂. (R₃ ← R₃ - (1)·R₂)
    new R₃ = [0, 0, 1, 1] - (1)·[0, 0, 1, 1] = [0, 0, 0, 0]
    120100110000
  9. No pivotColumn 4: no pivot
    Every entry of column 4 from row 3 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₃).
    120100110000
  10. ResultRow echelon form (REF) reached
    Each pivot is 1, each pivot lies to the right of the pivot above it, and everything below a pivot is 0.
    Number of pivots = 2; the last 1 row(s) are all zeros.
    120100110000
  11. NoteColumn 3: already clear above the pivot
    All entries above the pivot at (2, 3) are already 0.
    120100110000
  12. ResultReduced row echelon form (RREF) reached
    Every pivot is 1 and is the only nonzero entry in its column. The RREF of a matrix is unique.
    120100110000
  13. NotePivots and rank
    Pivot columns: 1, 3
    rank(A) = 2 (number of pivots)
    Free variables: x2, x4
  14. CalculateColumn space Col(A): basis from the pivot columns of A
    use the original columns that hold pivots in the RREF
    column 1 = (1, 2, 3)ᵀ
    column 3 = (0, 1, 1)ᵀ
  15. CalculateRow space Row(A): basis from the non-zero rows of the RREF
    row 1 = (1, 2, 0, 1)
    row 2 = (0, 0, 1, 1)
  16. CalculateNull space Null(A): solve A x = 0
    each free variable gives one basis vector
    x2 = 1, other free variables 0: (−2, 1, 0, 0)ᵀ
    x4 = 1, other free variables 0: (−1, 0, −1, 1)ᵀ
  17. CalculateLeft null space Null(Aᵀ): solve Aᵀ y = 0
    (−1, −1, 1)ᵀ
  18. CheckVerification
    rank + nullity = 2 + 2 = 4 = number of columns ✓
    A·v = 0 for every null space basis vector (exact) ✓
    Pivot columns are independent and have rank 2 ✓
    Row-space basis spans the same space as the rows of A (rank of the stack is still 2) ✓
    dim Col = dim Row = 2; dim Null(Aᵀ) = 1 = m − r ✓
  19. ResultAre the columns linearly independent?
    No: nullity 2 > 0. A dependence relation from the first null space vector: (−2)·col1 + (1)·col2 = 0.

Three vectors spanning a plane

  • Matrix A: [[1, 2, 1], [0, 1, 1], [1, 3, 2]]
rank(A) = dim Col(A)
2
dim Row(A) = 2
nullity = dim Null(A)
1
dim Null(Aᵀ) = 1
Basis of Col(A)
(1, 0, 1)ᵀ, (2, 1, 3)ᵀ
Basis of Row(A)
(1, 0, −1), (0, 1, 1)
Basis of Null(A)
(1, −1, 1)ᵀ
A is square with rank 2 < 3, so it is singular (determinant 0).
Bases are not unique. Another correct basis spans the same space; the dimensions are always the same.

Step-by-step solution

Formula used
Col(A) = span of the columns; Row(A) = span of the rows; Null(A) = {x : Ax = 0}
rank(A) + nullity(A) = n (number of columns)
Basis of Col(A): pivot columns of A; basis of Row(A): non-zero rows of RREF; basis of Null(A): one vector per free variable
  1. NoteThe matrix
    A is 3×3. Its columns are vectors in ℝ³ and its rows are vectors in ℝ³.
    A =121011132
  2. StartReduce A to RREF
    A is 3×3. Work column by column from left to right. The current pivot row is called r (starting at row 1).
    Allowed row operations (they never change the rank): swap two rows, multiply a row by a nonzero number, add a multiple of one row to another.
    121011132
  3. PivotPivot selection (column 1)
    pivot = a₁₁ = 1
    Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 1 (row 1). It already sits in the pivot position (1, 1).
    121011132
  4. Row additionElimination below the pivot (column 1)
    R₃ ← R₃ - R₁
    Goal: turn a₃₁ = 1 into 0 using the pivot row R₁. (R₃ ← R₃ - (1)·R₁)
    new R₃ = [1, 3, 2] - (1)·[1, 2, 1] = [0, 1, 1]
    121011011
  5. PivotPivot selection (column 2)
    pivot = a₂₂ = 1
    Scan column 2 from row 2 downward: the first nonzero entry is a₂₂ = 1 (row 2). It already sits in the pivot position (2, 2).
    121011011
  6. Row additionElimination below the pivot (column 2)
    R₃ ← R₃ - R₂
    Goal: turn a₃₂ = 1 into 0 using the pivot row R₂. (R₃ ← R₃ - (1)·R₂)
    new R₃ = [0, 1, 1] - (1)·[0, 1, 1] = [0, 0, 0]
    121011000
  7. No pivotColumn 3: no pivot
    Every entry of column 3 from row 3 downward is 0, so this column has no pivot. Move one column to the right (the pivot row stays at R₃).
    121011000
  8. ResultRow echelon form (REF) reached
    Each pivot is 1, each pivot lies to the right of the pivot above it, and everything below a pivot is 0.
    Number of pivots = 2; the last 1 row(s) are all zeros.
    121011000
  9. Row additionEliminate above the pivot (column 2)
    R₁ ← R₁ - 2·R₂
    Goal: turn a₁₂ = 2 into 0 using the pivot row R₂. (R₁ ← R₁ - (2)·R₂)
    new R₁ = [1, 2, 1] - (2)·[0, 1, 1] = [1, 0, -1]
    10−1011000
  10. ResultReduced row echelon form (RREF) reached
    Every pivot is 1 and is the only nonzero entry in its column. The RREF of a matrix is unique.
    10−1011000
  11. NotePivots and rank
    Pivot columns: 1, 2
    rank(A) = 2 (number of pivots)
    Free variables: x3
  12. CalculateColumn space Col(A): basis from the pivot columns of A
    use the original columns that hold pivots in the RREF
    column 1 = (1, 0, 1)ᵀ
    column 2 = (2, 1, 3)ᵀ
  13. CalculateRow space Row(A): basis from the non-zero rows of the RREF
    row 1 = (1, 0, −1)
    row 2 = (0, 1, 1)
  14. CalculateNull space Null(A): solve A x = 0
    each free variable gives one basis vector
    x3 = 1, other free variables 0: (1, −1, 1)ᵀ
  15. CalculateLeft null space Null(Aᵀ): solve Aᵀ y = 0
    (−1, −1, 1)ᵀ
  16. CheckVerification
    rank + nullity = 2 + 1 = 3 = number of columns ✓
    A·v = 0 for every null space basis vector (exact) ✓
    Pivot columns are independent and have rank 2 ✓
    Row-space basis spans the same space as the rows of A (rank of the stack is still 2) ✓
    dim Col = dim Row = 2; dim Null(Aᵀ) = 1 = m − r ✓
  17. ResultAre the columns linearly independent?
    No: nullity 1 > 0. A dependence relation from the first null space vector: (1)·col1 + (−1)·col2 + (1)·col3 = 0.

Invertible 3×3 (full rank)

  • Matrix A: [[2, 1, 1], [1, 3, 2], [1, 0, 0]]
rank(A) = dim Col(A)
3
dim Row(A) = 3
nullity = dim Null(A)
0
dim Null(Aᵀ) = 0
Basis of Col(A)
(2, 1, 1)ᵀ, (1, 3, 0)ᵀ, (1, 2, 0)ᵀ
Basis of Row(A)
(1, 0, 0), (0, 1, 0), (0, 0, 1)
Basis of Null(A)
{0}
A is square with full rank, so it is invertible and its determinant is non-zero.
Bases are not unique. Another correct basis spans the same space; the dimensions are always the same.

Step-by-step solution

Formula used
Col(A) = span of the columns; Row(A) = span of the rows; Null(A) = {x : Ax = 0}
rank(A) + nullity(A) = n (number of columns)
Basis of Col(A): pivot columns of A; basis of Row(A): non-zero rows of RREF; basis of Null(A): one vector per free variable
  1. NoteThe matrix
    A is 3×3. Its columns are vectors in ℝ³ and its rows are vectors in ℝ³.
    A =211132100
  2. StartReduce A to RREF
    A is 3×3. Work column by column from left to right. The current pivot row is called r (starting at row 1).
    Allowed row operations (they never change the rank): swap two rows, multiply a row by a nonzero number, add a multiple of one row to another.
    211132100
  3. PivotPivot selection (column 1)
    pivot = a₁₁ = 2
    Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 2 (row 1). It already sits in the pivot position (1, 1).
    211132100
  4. Row multiplyRow multiplication
    R₁ ← (1/2)·R₁
    Divide row 1 by the pivot 2 (multiply by 1/2 = 1/2) so the pivot becomes 1.
    new R₁ = [2, 1, 1] · (1/2) = [1, 1/2, 1/2]
    11212132100
  5. Row additionElimination below the pivot (column 1)
    R₂ ← R₂ - R₁
    Goal: turn a₂₁ = 1 into 0 using the pivot row R₁. (R₂ ← R₂ - (1)·R₁)
    new R₂ = [1, 3, 2] - (1)·[1, 1/2, 1/2] = [0, 5/2, 3/2]
    1121205232100
  6. Row additionElimination below the pivot (column 1)
    R₃ ← R₃ - R₁
    Goal: turn a₃₁ = 1 into 0 using the pivot row R₁. (R₃ ← R₃ - (1)·R₁)
    new R₃ = [1, 0, 0] - (1)·[1, 1/2, 1/2] = [0, -1/2, -1/2]
    11212052320−12−12
  7. PivotPivot selection (column 2)
    pivot = a₂₂ = 5/2
    Scan column 2 from row 2 downward: the first nonzero entry is a₂₂ = 5/2 (row 2). It already sits in the pivot position (2, 2).
    11212052320−12−12
  8. Row multiplyRow multiplication
    R₂ ← (2/5)·R₂
    Divide row 2 by the pivot 5/2 (multiply by 1/5/2 = 2/5) so the pivot becomes 1.
    new R₂ = [0, 5/2, 3/2] · (2/5) = [0, 1, 3/5]
    1121201350−12−12
  9. Row additionElimination below the pivot (column 2)
    R₃ ← R₃ + 1/2·R₂
    Goal: turn a₃₂ = -1/2 into 0 using the pivot row R₂. (R₃ ← R₃ - (-1/2)·R₂)
    new R₃ = [0, -1/2, -1/2] - (-1/2)·[0, 1, 3/5] = [0, 0, -1/5]
    11212013500−15
  10. PivotPivot selection (column 3)
    pivot = a₃₃ = -1/5
    Scan column 3 from row 3 downward: the first nonzero entry is a₃₃ = -1/5 (row 3). It already sits in the pivot position (3, 3).
    11212013500−15
  11. Row multiplyRow multiplication
    R₃ ← (-5)·R₃
    Divide row 3 by the pivot -1/5 (multiply by 1/(-1/5) = -5) so the pivot becomes 1.
    new R₃ = [0, 0, -1/5] · (-5) = [0, 0, 1]
    112120135001
  12. ResultRow echelon form (REF) reached
    Each pivot is 1, each pivot lies to the right of the pivot above it, and everything below a pivot is 0.
    Number of pivots = 3.
    112120135001
  13. Row additionEliminate above the pivot (column 3)
    R₁ ← R₁ - 1/2·R₃
    Goal: turn a₁₃ = 1/2 into 0 using the pivot row R₃. (R₁ ← R₁ - (1/2)·R₃)
    new R₁ = [1, 1/2, 1/2] - (1/2)·[0, 0, 1] = [1, 1/2, 0]
    11200135001
  14. Row additionEliminate above the pivot (column 3)
    R₂ ← R₂ - 3/5·R₃
    Goal: turn a₂₃ = 3/5 into 0 using the pivot row R₃. (R₂ ← R₂ - (3/5)·R₃)
    new R₂ = [0, 1, 3/5] - (3/5)·[0, 0, 1] = [0, 1, 0]
    1120010001
  15. Row additionEliminate above the pivot (column 2)
    R₁ ← R₁ - 1/2·R₂
    Goal: turn a₁₂ = 1/2 into 0 using the pivot row R₂. (R₁ ← R₁ - (1/2)·R₂)
    new R₁ = [1, 1/2, 0] - (1/2)·[0, 1, 0] = [1, 0, 0]
    100010001
  16. ResultReduced row echelon form (RREF) reached
    Every pivot is 1 and is the only nonzero entry in its column. The RREF of a matrix is unique.
    100010001
  17. NotePivots and rank
    Pivot columns: 1, 2, 3
    rank(A) = 3 (number of pivots)
    Free variables: none
  18. CalculateColumn space Col(A): basis from the pivot columns of A
    use the original columns that hold pivots in the RREF
    column 1 = (2, 1, 1)ᵀ
    column 2 = (1, 3, 0)ᵀ
    column 3 = (1, 2, 0)ᵀ
  19. CalculateRow space Row(A): basis from the non-zero rows of the RREF
    row 1 = (1, 0, 0)
    row 2 = (0, 1, 0)
    row 3 = (0, 0, 1)
  20. CalculateNull space Null(A): solve A x = 0
    each free variable gives one basis vector
    Only x = 0 solves A x = 0, so Null(A) = {0}.
  21. CalculateLeft null space Null(Aᵀ): solve Aᵀ y = 0
    Only y = 0, so Null(Aᵀ) = {0}.
  22. CheckVerification
    rank + nullity = 3 + 0 = 3 = number of columns ✓
    A·v = 0 for every null space basis vector (exact) ✓
    Pivot columns are independent and have rank 3 ✓
    Row-space basis spans the same space as the rows of A (rank of the stack is still 3) ✓
    dim Col = dim Row = 3; dim Null(Aᵀ) = 0 = m − r ✓
  23. ResultAre the columns linearly independent?
    Yes: rank = 3 = number of columns, and Null(A) = {0}, so the only combination of the columns that gives 0 is the trivial one.

Frequently asked questions

Why must the column space basis come from the original matrix?

Row operations preserve the row space but change the column space. The RREF only tells you which positions of A hold the pivots; the matching columns of A itself form the basis of Col(A).

What is the dimension of the null space?

It is the number of free variables, n − rank(A). If the rank equals the number of columns, the null space is just the zero vector and has dimension 0.

How do I test if vectors form a basis of ℝⁿ?

You need exactly n vectors and the matrix with those vectors as columns must have rank n (non-zero determinant). Equivalently its null space is trivial.

Is the answer basis unique?

No. Any other set of independent vectors with the same span is also a basis. The number of vectors, the dimension, is always the same.

Related calculators