A basis is a set of independent vectors that spans the subspace. If the subspace is a span, row reduce and keep the vectors in the pivot columns. If it is given by equations, solve them and take one vector per free variable.
| Step | On | |
|---|---|---|
| 1 | Put the vectors in the columns of a matrix. Keep the order; you will come back to these columns. | |
| 2 | Row reduce. Go to reduced row echelon form; an echelon form is enough to locate pivots. | |
| 3 | Mark the pivot columns. The leading of each nonzero row. | pivots in columns and |
| 4 | Take the matching columns of the original matrix. Not the columns of the echelon form: those generally span a different space. | |
| 5 | Check the size and the redundant vectors. The basis has as many vectors as there are pivots. The RREF shows how each dropped vector is built from the kept ones. | vectors; , ✓ |