The dimension is the number of vectors in any basis. You rarely need the basis itself: for a span the dimension is the rank of the matrix of vectors, and for the solution set of it is the number of unknowns minus the rank.
| Step | On | |
|---|---|---|
| 1 | Decide how W is given. A list of vectors (span) or a set of equations (solution set). | solution set of two equations in |
| 2 | Write the matrix. Spanning vectors go in the columns; equations go in the rows. | |
| 3 | Row reduce and count the pivots. The number of pivots is the rank. | : , rank |
| 4 | Apply the right count. Span: . Solution set: , the number of free variables. | (free , ) |
| 5 | Check against the bounds. A subspace of an -dimensional space has dimension between and (the subspace dimension inequality). | ✓; basis , |