The following vectors are linearly independent -

$v1 = (1, 2, 0, 2)$

$v2 = (1,1,1,0)$

$v3 = (2,0,1,3)$

Find a fourth vector v4 so that the set { v1, v2, v3, v4 } is a basis fpr $\mathbb{R}^4$?

I asked this question before here - Show vectors are linearly independent and finding a basis - and someone suggested a way of doing it. However I am wondering if there is a simpler way. I put the vector

$\begin{bmatrix} 0 \\ 0 \\ 0 \\ x \end{bmatrix}$

as the fourth column in a matrix of these vectors, then row reduce.

$\begin{bmatrix} 1 & 1 & 2 & 0 & | & 0 \\ 2 & 1 & 0 & 0 & | & 0 \\ 0 & 1 & 1 & 0 & | & 0 \\ 2 & 0 & 3 & x & | & 0 \end{bmatrix}$

By doing this I will be left with the fourth column looking like, for example, $(0, 0, 0, x-2)$. Then as long as x is not equal to 2, there will be pivots in each column and the vectors will be linearly independent?

In the matrix above the fourth column ends up as $(0, 0, 0, x)$. So as long as x is not equal to 0 the vectors will be linearly independent?

Edit: David Mitra's answer here - Show vectors are linearly independent and finding a basis - is the best way to do this imo.

  • $\begingroup$ Yes, that's correct. But note you were lucky in that $(0,0,0,x)$ was not in the linear span of $\{v_1,v_2,v_2\}$ to begin with. That's why in your linked question I suggested you add the column $(a,b,c,d)$. This probably isn't the best approach, but it will always allow you to find the "last vector" needed to complete a basis. $\endgroup$ – David Mitra Apr 20 '12 at 16:43
  • $\begingroup$ The fifth zero column, by the way, in your matrix isn't needed. $\endgroup$ – David Mitra Apr 20 '12 at 16:43
  • $\begingroup$ Here, I computed a reduced form of your matrix (without the zero column) as $\left[ \matrix{1&1&2&0\cr0&1&4&0\cr0&0&1&0\cr0&0&0&x}\right]$. This has independent columns for $x\ne0$; so the first four columns of your matrix are independent for $x\ne0$, and thus give a basis for $x\ne0$. $\endgroup$ – David Mitra Apr 20 '12 at 16:47
  • 1
    $\begingroup$ To answer the question in the title, almost any random vector will do. $\endgroup$ – lhf Apr 20 '12 at 16:57

First off, your method does and does not work, depending on what you mean. What if the vector (0, 0, 0, 1) is already in the span of the 3 vectors you started with? Then row-reduction will lead to a 0 column. Essentially, what you did was guess that (0, 0, 0, 1) was not already in the span, and then you checked to see if you were right. This will work exactly in the cases when (0, 0, 0, 1) was not already in the span of the vectors you started with. As lhf points out in the comments to the question, this method will work a lot of the time. In fact, it would work for this problem if you had guessed any of (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), or (0, 0, 0, 1) (checked with Sage). But, it won't always work.

It is well known that the cross product of two vectors (in 3-dimensions) gives a new vector that is orthogonal to both of the starting two vectors. Therefore, if the first two vectors are linearly independent, and the new third one is orthogonal to both of them, then the set of 3 vectors is definitely linearly independent. By the way, if the first two are not linearly independent, then the cross product will be the 0 vector.

There is a generalization to the cross product that can be applied here. If in $n$-dimensions, use $n-1$ vectors, and the result will be a vector orthogonal to the $n-1$ vectors. So, to answer your question, one way would be to find the determinant:

$$\begin{vmatrix} i & j & k & l \\ 1 & 2 & 0 & 2 \\ 1 & 1 & 1 & 0 \\ 2 & 0 & 1 & 3\end{vmatrix}$$

Assuming your first three vectors are linearly independent, the result will be a 4 dimensional vector (in terms of coordinates i, j, k, l) that is orthogonal to the 3 starting vectors.

I got $8i - j - 7k - 5l$, assuming I didn't make any mistakes. And, I checked in Sage that the 4 vectors would be linearly independent.

Reference: I learned about this when I took a 4th semester of calculus in college, where we used Vector Calculus by Susan Jane Colley. It is introduced in the exercises for Section 1.6. One of the exercises is to prove that the new vector is orthogonal to the previous ones.


I think that an easy way of doing this is by putting the linearly independent vectors you start with as the rows of a matrix, in this case the matrix

$$A = \begin{bmatrix} 1 & 2 & 0 &2 \\ 1 & 1 & 1 &0 \\ 2 & 0 & 1 &3 \\ 0 & 0 & 0 &0 \\ \end{bmatrix} $$

Then you find the echelon form of the matrix, which in this case will be

$$ \begin{bmatrix} \color{red}{1} & 0 & 2 &-2 \\ 0 & \color{red}{1} & 2 &-5 \\ 0 & 0 & \color{red}{1} &-7/3 \\ 0 & 0 & 0 &\color{blue}{0} \\ \end{bmatrix} $$

Then you look at the columns where you have a "first $1$" and then you add to your set of vectors, the vectors $e_i$ from the standard basis corresponding to the columns where you do not have a "first $1$" and then that should give you a basis.

So in this case since you have a first $1$ in the the first three columns then you only have to add the vector $e_4 = (0, 0, 0, 1)$ (corresponding to the fourth column which does not have a first $1$) to the set and you'll have a basis.


Let $A \in \mathbf{R}^{3\times 4}$ be the matrix whose $i^{th}$ row is equal to $v_i$. Since the row space of a matrix is orthogonal to its nullspace, it suffices to find a basis for the nullspace of $A$. Let $w \in \text{nullspace}(A)$. Then you can easily verify that the matrix $$B = \begin{bmatrix} A \\ w \end{bmatrix}$$ has full rank, and hence its rows form a basis for $\mathbf{R}^4$.

  • $\begingroup$ This is a valid approach, and it might help future Readers to have an indication of the algorithm that would yield a basis for the nullspace (if not the detailed calculation for the data given in the Question). $\endgroup$ – hardmath Aug 11 '15 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.