20

This is a very elementary question but I can't find the answer in my book at the moment.

If I have, for example, two vectors $v_1$ and $v_2$ in $\mathbb R^5$ and knowing that they are linear independent , how can I extend this two vectors to a basis of $\mathbb R^5$. I know that I just have to add $v_i$ for $3\leq i \leq 5$ such that they are linear independent but how can I do that? Is there an easy algorithm?

sigmatau
  • 2,622

5 Answers5

23

An easy solution, if you are familiar with this, is the following:

Put the two vectors as rows in a $2 \times 5$ matrix $A$. Find a basis for the null space $\operatorname{Null}(A)$. Then, the three vectors in the basis complete your basis.

N. S.
  • 132,525
  • 4
    Geometrically, we're computing the orthogonal complement of $\operatorname{span}{v_1,v_2}$, aren't we? – Roland Feb 29 '16 at 17:58
  • 1
    @Roland Yes. $Row(A)^\perp = Null(A)$. – N. S. Feb 29 '16 at 18:05
  • 1
    The singular value decomposition of A provides an explicit representation of the null space of A: The 3rd to 5th right singular vectors complete your basis. – user1225999 Nov 21 '16 at 11:42
8

I usually do this in an ad hoc way depending on what vectors I already have. However, if you want an algorithm, you can exploit algorithms to reduce a spanning set to a basis (hopefully you know some of these).

In your example, expand your set of vectors to $v_1,v_2,e_1,e_2,e_3,e_4,e_5$, where $e_1,\dotsc,e_5$ are the standard basis vectors in $\mathbb{R}^5$. Then you can apply the sifting algorithm to this set to get a basis; because $v_1$ and $v_2$ are linearly independent and occur first in the list, they won't be removed in the sifting process, so you'll end up with some basis containing them. Essentially the same trick works for set of linearly independent vectors in a finite dimensional vector space.

mdp
  • 14,671
  • 1
  • 39
  • 63
  • 2
    could you give a short description of that algorithm or a reference (possibly with a practical example)? – sigmatau Aug 12 '13 at 15:00
  • 2
    See pages 8-9 of http://homepages.warwick.ac.uk/~masbal/LinAlg1011/lectures.pdf for a description and example. – mdp Aug 12 '13 at 15:11
  • a more brief version of the algorithm is described in Marc van Leeuwen's answer above. – mdave16 Sep 16 '17 at 21:40
5

Put your independent vectors in a list, which you then complete with a generating set for the whole space, as described in the answer by Matt Pressland (the standard basis is the most obvious choice for a generating set for $\Bbb R^n$). Now for each vector in the list in turn, see if the set of vectors in the list up to and including it is linearly dependent. If it is, keep the vector, if it isn't (then this vector must be a linear combination of the previous ones so) throw it out. In either case proceed to the next vector in the list. The test ensures that whenever one advances, the vectors retained so far are linearly independent. Also the vectors thrown out are ensured not to affect the span of the whole list, and since that span was the whole space at the beginning, it still is at the end. By linear dependence, one has found a basis. Since the vectors given initially were independent and at the beginning of the list, none of them can have been thrown out, so they survive in the basis.

3

A good general strategy for expanding a basis is to build a matrix $A$ out of the vectors you have and the standard basis vectors. Then, put $A$ into reduced row echelon form. If you toss out the dependent/free vectors, the remaining vectors are linearly independent and span. Therefore, they form a basis of your vector space.

san4d
  • 31
-1

Consider a finite dimensional vector space V. Let A be a finite subset of V that contains linearly independent vectors. If $span(A) \neq V$ then there exists a vector v $\in V$ so that all the elements in A and v are linearly independent. Since V is finite dimensional, you can repeat this process until you obtain a basis for the space V.