# How exactly do you compute the span?

1. Jun 6, 2013

### Bipolarity

Let's say I have some finite subset of vectors in, lets say, $ℝ^{5}$. If my set has five linearly independent vectors, they necessarily form a basis for $ℝ^{5}$.

If I have more than 5 vectors, they are linearly dependent. If I have less than 5 vectors, they span only a subspace of $ℝ^{5}$ not equal to $ℝ^{5}$.

My question:
How can I actually compute the span of the vectors I am given? Obviously it is going to be some subspace of $ℝ^{5}$. But how can I find an explicit representation of that subspace? How can I compute the dimension of that subspace?

Thanks!

BiP

2. Jun 7, 2013

### Office_Shredder

Staff Emeritus

The dimension can be found by finding what the largest linearly independent subset of your vectors is. As for an explicit representation, or "compute the span", can you give an example of what this means?

3. Jun 7, 2013

### deluks917

You can get an explicit representation of your space by computing the row reduced echelon form of the matrix formed by your vectors.

4. Jun 7, 2013

### Bipolarity

How exactly would this be done though? And how do you know the result (I'm guessing the number of parameter of the solution is equivalent to the dimension of the subspace spanned by the vectors).

BiP

5. Jun 7, 2013

### HallsofIvy

We find the "span" of a set of vectors by using the definition of "span". The "span" of a set of vectors is the set of all linear combinations of those vectors, so start by looking at such linear combinations.

For example, suppose, since you started with $R^5$ suppose the set is {<1, 0, 0, 1, 1>, <1, 1, 0, 1, 0>, <2, 1,0,2,1>} in the span would be of the form a<1, 0, 0, 1, 1>+ b<1, 1, 0, 1, 0>+ c<2, 1, 0, 2, 1>= <a+ b+2c, b+ c, 0, a+ b+ 2c, a+ c>. Noticing that the first and third components are the same, lets let that be, say, "x". Then we have the second component b+ c= (a+ b+ 2c)- (a+ c) so if we call the fourth component, "y", we have <a+ b+ 2c, b+ c, 0, a+ b+ 2c, a+ c>= <x, x- y, 0, x, y>= x<1, 1, 0, 1, 0>+ y<0, -1, 0, 0, 1>, showing that the span is two dimensional.

(I intentionally made the third vector in the set, <2, 1, 0, 2, 1>, the sum of the first two so the set was NOT independent and could not span a three dimensional space.)

6. Jun 8, 2013

### Bipolarity

I see what you did there but the procedure seems to be far from algorithmic. Is there a precise algorithm in computing the span?

1) Say you have a set S of n vectors and wish to find their span (as well as the dimension of such span).
2) Take any one nonzero vector in S and form a set M. Clearly this set is linearly independent.
3) Keep adding vectors from S to M until M is a maximal linearly independent subset of S.
4) If S is linearly independent, S will be a basis for its own span and thus the span is simply the set of all its linear combinations and its dimension equal to the cardinality of S.
5) If S is linearly dependent, M will be some proper subset of S, and will be a basis for the vector space spanned by S. Since it is a basis, the cardinality of M will be the dimension of span(S). The dimension of span(S) will surely be less than the cardinality of S.

BiP

7. Jun 8, 2013

### Vorde

True, in fact there is a procedure in my linear algebra textbook precisely identical to this. But in practical usage, you're going to end up row reducing as described by HallsofIvy if you want to find a basis for a less-trivial set of vectors.