How do you extend a basis?

A simple approach is to take any basis $\{b_1, b_2, b_3\}$ for $\mathbb{R}^3$ and consider the set $\{(1,1,1), b_1, b_2, b_3\}$.

If $b_1$ is proportional to $(1,1,1)$, discard it. If not, keep it.

If $b_2$ is a linear combination of $\{(1,1,1), b_1\}$ then discard it. Otherwise keep it.

If $b_3$ is a linear combination of $\{(1,1,1), b_1, b_2\}$ then discard it. Otherwise keep it.

You will arrive at a three-element set containing $(1,1,1)$ which is a basis for $\mathbb{R}^3$. This is because the resulting set is linearly independent by construction, and discarding linearly dependent elements in each step does not reduce the span.

To illustrate, take the canonical basis and consider $\{(1,1,1), (1,0,0), (0,1,0), (0,0,1)\}$.

We see that the only element we need to discard is $(0,0,1)$ so the resulting basis is $\{(1,1,1), (1,0,0), (0,1,0)\}$.


"Find a couple vectors" is very dependable. Nearly any choice of vectors you make will work. You almost have to actively try to fail with this method; the only real obstacle is if you restrict your choices to very special forms, and some of those forms happen to be in the span of the previous vectors.

However, there is a very simple way forward that is guaranteed. A basis for $\mathbb{R}^n$ is the same thing as an $n \times n$ matrix whose rows are linearly independent; you can take the rows for a basis.

(Aside: while it's usually more natural to treat vectors of $\mathbb{R}^n$ as columns, switching to rows here doesn't real;y change anything. I only do so because doing row operations as a matrix is a more familiar procedure than doing column operations)

There is a family of matrices that are extremely easy to identify as having linearly independent rows: those in row echelon form.

$$\left( \begin{matrix} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} \right) \\ {}_{\text{These rows are clearly independent}}$$

If you are given several vectors as a starting point that cannot be immediately filled into a row echelon matrix, that is easy to repair: do row operations to put your given vectors in row echelon form, and then fill in the rest of the matrix.


In $\mathbb{R}^3$ it is easy. The second independent vector may be obtained e.g. by replacing non-zero coordinate by zero. Next you can take the vector product, which is even orthogonal to the first two vectors.