Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find a Basis

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.

Recognize the task

A subspace given in one of two ways. As a span: "find a basis for Span⁡{(1,1,0),(2,2,0),(1,0,1),(3,2,1)}\operatorname{Span}\{(1, 1, 0), (2, 2, 0), (1, 0, 1), (3, 2, 1)\}". As equations: "find a basis for the plane x+y−z=0x + y - z = 0", "for {p∈P2:p(1)=0}\{p \in P_2 : p(1) = 0\}". Test: is the subspace a list of vectors or a set of conditions?
A basis is defined in the basis lesson; the extraction is in Finding a Basis for a Subspace.

Ways to do it

Pivot columnssubspace given as a span
basis of Span⁡{vi}={vi:column i has a pivot}\text{basis of } \operatorname{Span}\{\mathbf{v}_i\} = \{\mathbf{v}_i : \text{column } i \text{ has a pivot}\}
Row reduce the matrix of columns; keep the original vectors at the pivot positions.
Free variablessubspace given by equations
x=t1s1+⋯+tksk ⇒ {s1,…,sk}\mathbf{x} = t_1\mathbf{s}_1 + \cdots + t_k\mathbf{s}_k \ \Rightarrow\ \{\mathbf{s}_1, \ldots, \mathbf{s}_k\}
Solve the equations, write the general solution in parametric vector form, and keep one vector per free variable.
Nonzero echelon rowsvectors as rows
basis of Row⁡(A)=nonzero rows of an echelon form\text{basis of } \operatorname{Row}(A) = \text{nonzero rows of an echelon form}
Put the vectors in the rows instead; row operations keep the row space, so the nonzero rows that remain are a basis (but not the original vectors).

Steps

StepOn Span⁡{(1,1,0),(2,2,0),(1,0,1),(3,2,1)}\operatorname{Span}\{(1, 1, 0), (2, 2, 0), (1, 0, 1), (3, 2, 1)\}
1Put the vectors in the columns of a matrix. Keep the order; you will come back to these columns.A=(121312020011)A = \begin{pmatrix} 1 & 2 & 1 & 3 \\ 1 & 2 & 0 & 2 \\ 0 & 0 & 1 & 1 \end{pmatrix}
2Row reduce. Go to reduced row echelon form; an echelon form is enough to locate pivots.(120200110000)\begin{pmatrix} 1 & 2 & 0 & 2 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{pmatrix}
3Mark the pivot columns. The leading 11 of each nonzero row.pivots in columns 11 and 33
4Take the matching columns of the original matrix. Not the columns of the echelon form: those generally span a different space.{(1,1,0), (1,0,1)}\{(1, 1, 0),\ (1, 0, 1)\}
5Check 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.22 vectors; (2,2,0)=2(1,1,0)(2, 2, 0) = 2(1, 1, 0), (3,2,1)=2(1,1,0)+(1,0,1)(3, 2, 1) = 2(1, 1, 0) + (1, 0, 1) ✓

Worked examples

Example 1 · a plane given by an equation

free variables
x+y−z=0x + y - z = 0:  x=−y+z\ x = -y + z, free y,zy, z
solve for the pivot variable
(x,y,z)=y(−1,1,0)+z(1,0,1)(x, y, z) = y(-1, 1, 0) + z(1, 0, 1)
parametric vector form
basis {(−1,1,0), (1,0,1)}\{(-1, 1, 0),\ (1, 0, 1)\}
check: both satisfy the equation

Example 2 · a row space

echelon rows
A=(121243364)A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 4 & 3 \\ 3 & 6 & 4 \end{pmatrix}
vectors as rows
R2−2R1R_2 - 2R_1, R3−3R1R_3 - 3R_1, R3−R2R_3 - R_2: rows (1,2,1)(1, 2, 1), (0,0,1)(0, 0, 1), (0,0,0)(0, 0, 0)
echelon form
basis of the row space: {(1,2,1), (0,0,1)}\{(1, 2, 1),\ (0, 0, 1)\}
the nonzero rows

Example 3 · polynomials

abstract space
p=a+bx+cx2p = a + bx + cx^2 with p(1)=a+b+c=0p(1) = a + b + c = 0
the condition as an equation
a=−b−ca = -b - c:  p=b(x−1)+c(x2−1)\ p = b(x - 1) + c(x^2 - 1)
free b,cb, c
basis {x−1, x2−1}\{x - 1,\ x^2 - 1\}
two free variables, two vectors
Row reduce any matrix step by step in the Gaussian elimination tool.

See it happen

Row reduction never changes which columns depend on which: if column 44 equals twice column 11 plus column 33 in the echelon form, the same is true in the original matrix. The echelon form is just easier to read. That is why you read the pivot positions there but take the actual vectors from the original matrix.

Common mistakes

Taking the echelon columns as the basis

✗ basis {(1,0,0),(0,1,0)}\{(1, 0, 0), (0, 1, 0)\} from the RREF columns
✓ use the original columns: {(1,1,0),(1,0,1)}\{(1, 1, 0), (1, 0, 1)\}
For a row space it is the other way round: the echelon rows are the basis.

Keeping every given vector

✗ all four vectors are a basis because they span the subspace
✓ a basis must also be independent; drop the vectors in non-pivot columns

Including the zero vector

✗ {(0,0,0),(1,0,1)}\{(0, 0, 0), (1, 0, 1)\}
✓ a set containing 0\mathbf{0} is dependent, so it is never a basis