Linear Algebra (showing if a vector spans a vector space)

In summary, to determine if a set S spans V, you can either calculate the determinant of the matrix formed by the vectors in S (if the determinant is non-zero, the set spans V), or you can row reduce the matrix formed by the vectors and count the number of 1's on the main diagonal (this is the rank of the matrix, which is also equal to the number of linearly independent vectors in the set). Alternatively, you can use a software program to determine the rank of the matrix.
  • #1
JameB
25
0

Homework Statement



I was wondering if someone could explain the easiest way to determine if a set S spans V?

some example questions would be: show that S = {v1, v2, v3, v4} spans R4 where
v1 = [1 0 +1 0]
v2 = [0 1 -1 2]
v3 = [0 2 +2 1]
v4 = [1 0 0 1]

Homework Equations





The Attempt at a Solution



I know that you need to let x = [a, b, c, d] be any vector in R4 and form an eqn like
a1v1 + a2v2 + a3v3 + a4v4 = x

but now I'm lost... please help!
 
Physics news on Phys.org
  • #2
JameB said:

Homework Statement



I was wondering if someone could explain the easiest way to determine if a set S spans V?

some example questions would be: show that S = {v1, v2, v3, v4} spans R4 where
v1 = [1 0 +1 0]
v2 = [0 1 -1 2]
v3 = [0 2 +2 1]
v4 = [1 0 0 1]

Homework Equations





The Attempt at a Solution



I know that you need to let x = [a, b, c, d] be any vector in R4 and form an eqn like
a1v1 + a2v2 + a3v3 + a4v4 = x
This is a good start. You know v1, v2, v3, and v4, so you have essentially a system of four equations in four unknowns (a, b, c, and d). Write the system as an augmented matrix [A|x] and row reduce.
 
  • #3
Mark44 said:
This is a good start. You know v1, v2, v3, and v4, so you have essentially a system of four equations in four unknowns (a, b, c, and d). Write the system as an augmented matrix [A|x] and row reduce.

Then what do I do?
 
  • #5
I get
a1v1 + a2v2 + a3v3 + a4v4 = x

=>
a1 00 00 a4 = a
00 a2 2a3 00 = b
a1 -a2 2a3 00 = c
00 2a2 00 a4 = d

=>
1 0 0 1 | a
0 1 2 0 | b
1 -1 2 0 | c
0 2 0 1 | d

=> RRE form
1 0 0 ...


OOooohhh I see! Now when I turn it into RREF, I'll get something like a1 = a+b-c etc.. correct?!

=> RREF
1 0 0 1 | a
0 1 2 0 | b
0 0 1 (-1/4) | d-2b/-4
0 0 0 0 | c-a+b+(d-2b)

Does that look like I'm on the right track?
 
  • #6
JameB said:

Homework Statement



I was wondering if someone could explain the easiest way to determine if a set S spans V?

some example questions would be: show that S = {v1, v2, v3, v4} spans R4 where
v1 = [1 0 +1 0]
v2 = [0 1 -1 2]
v3 = [0 2 +2 1]
v4 = [1 0 0 1]

The easiest way is to calculate the determinant of the 4x4 matrix formed by v1, v2, v3 and v4. If the determinant isn't zero, then the vectors span R4.
 
  • #7
The Electrician said:
The easiest way is to calculate the determinant of the 4x4 matrix formed by v1, v2, v3 and v4. If the determinant isn't zero, then the vectors span R4.

Right, but what happens if it's not a square matrix? I'm pretty sure my prof won't make it that easy on a test :(
 
  • #8
JameB said:
OOooohhh I see! Now when I turn it into RREF, I'll get something like a1 = a+b-c etc.. correct?!
Right.
=> RREF
1 0 0 1 | a
0 1 2 0 | b
0 0 1 (-1/4) | d-2b/-4
0 0 0 0 | c-a+b+(d-2b)

Does that look like I'm on the right track?
I think you made a mistake somewhere (or I did). I didn't get all 0s on the last row.
 
  • #9
vela said:
Right.

I think you made a mistake somewhere (or I did). I didn't get all 0s on the last row.

You didn't, I did it with Maple and I got all pivots except last column.

Now @OP, what does this mean? Having no non-pivot columns? How does this relate to Span?
 
  • #10
And to continue with what vela and flyingpig said, think about what system of equations you're reduced augmented matrix represents. If <a, b, c, d> is any arbitrary vector in R4, is there a specific linear combination of the vi vectors that forms that vector <a, b, c, d>? If so, those vi vectors span R4.
 
  • #11
Umm I don't remember learning about pivots.

and I did the thing again and I still got 0 0 0 0 for the last row :O Here are my steps:

-r1 + r3 -> r3
r2 + r3 -> r3

r4-2r2 -> r4
1/4 r3 -> r3

r4 + 4r3 -> r4

this gave me a final matrix of

1 0 0 1 a
0 1 2 0 b
0 0 1 -1/4 [(c-a+b)/4]
0 0 0 0 d-2b+4c

Now what do I do? Or even better, could someone please explain to me the general steps of finding if a vector spans the v.s. so I can complete these problems?

Thank you!

EDIT: Mark I just saw your response, how would I know if there is a linear combination that forms <a, b, c, d>?
 
  • #12
It's not clear to me whether you want to demonstrate a knowledge of basic methods of determining whether a set of vectors spans a space, or whether you just want to know how to use functions available in modern mathematical software such as Maple, Mathematica or Matlab to make the determination.

If it's the latter, proceed as follows:

If you have a bunch of N element vectors, let's say you have M of them, such that M≥N, let the vectors form the rows of an MxN matrix.

Then you don't need to augment that matrix to determine if there are at least N linearly independent vectors in the set. Simply row reduce the MxN matrix. The number of 1's on the main diagonal of the result is the number of linearly independent vectors in the set. Only if that number is N does the set span the space R(N).

The number of linearly independent rows (your vectors) is also equal to the rank of the MxN matrix of vectors, and you can use the "rank" function to determine this.

You could also calculate the singular values of the MxN matrix; the rank is equal to the number of non-zero singular values (that's what the "rank" function does).

See the attached image.
 

Attachments

  • RANK.PNG
    RANK.PNG
    9.1 KB · Views: 1,182
  • #13
Sorry, I don't mean to be rude but I'm just kinda lost. This is my first course in linear algebra and that's why I'm pretty confused.

What I was trying to do was to find a basis. The theorem states that vectors are said to form basis for V if
a) if they span V
b) they are linearly independent

I know that to prove b) I need to put it in a matrix, reduce and if I get a matrix with trivial solution meaning everything equals to 0 then it's a trivial solution and it's linearly independant.

But I'm having trouble with checking if they span or not... that's the whole point of this post :)


The examples in my book don't show step by step solution so that's why I'm lost.

e.g. Show that S = {v1, v2, v3, v4} where v1 = [1 0 0 1], v2 = [0 1 -1 2], v3 = [0 2 2 1], v4 = [1 0 0 1] is a basis for R4. (R4 is written as R subscript 4 meaning it's referring to the row spaces?...)

to show that S is linearly independant, I formed the eqn a1v1 + a2v2 + a3v3 + a4v4 = 0

turned it into a augmented matrix and got its RREF. This means that it's linearly independent.


NOW, to show that S spans R4, I let x = [a, b, c, d] be a vector in R4


what should I do next? thanks!
 
  • #14
JameB said:
Sorry, I don't mean to be rude but I'm just kinda lost. This is my first course in linear algebra and that's why I'm pretty confused.

What I was trying to do was to find a basis.
I don't mean to be rude but this is your 6th post in this thread and that is the first mention of finding a basis!

The theorem states that vectors are said to form basis for V if
a) if they span V
b) they are linearly independent
That's not a theorem, that is the definition of "basis". You can add a "c" to this- the number of vectors in the set is the dimension of the space. And then there is a theorem that says any two implies the third.

I know that to prove b) I need to put it in a matrix, reduce and if I get a matrix with trivial solution meaning everything equals to 0 then it's a trivial solution and it's linearly independant.
Well, no, you don't need to do that- that's one method. What you need to do is think about the definition: a set of vectors spans a space if and only if, any vector, y, in the space can be written as a linear combination of the vectors in the set. If the set is [itex]\{v_1, v_2, \cdot\cdot\cdot, v_n\}[/itex] then there exist scalars, [itex]a_1, a_2, \cdot\cdot\cdot, a_n[/itex] such that [itex]y= a_1v_1+ a_2v_2+ \cdot\cdot\cdot+ a_nv_n[/itex].

But I'm having trouble with checking if they span or not... that's the whole point of this post :)


The examples in my book don't show step by step solution so that's why I'm lost.

e.g. Show that S = {v1, v2, v3, v4} where v1 = [1 0 0 1], v2 = [0 1 -1 2], v3 = [0 2 2 1], v4 = [1 0 0 1] is a basis for R4. (R4 is written as R subscript 4 meaning it's referring to the row spaces?...)

to show that S is linearly independant, I formed the eqn a1v1 + a2v2 + a3v3 + a4v4 = 0

turned it into a augmented matrix and got its RREF. This means that it's linearly independent.
Then you have a problem- either you did the problem wrong or you gave the vectors incorrectly here. Those vector are NOT independent because [itex]v_1[/itex] and [itex]v_2[/itex] are the same: [itex](1)v_1+ (-1)v_2= 0[/itex].


NOW, to show that S spans R4, I let x = [a, b, c, d] be a vector in R4


what should I do next? thanks!
If those vectors were actually the ones you were given, you do nothing now. Since there are 4 vectors and the are NOT indpendent, they cannot span R4. If you gave the fouth vector incorrectly and the ones you were given were independent, you still would not have to do anything more- four independent vectors must span R4.

In either case, showing linear independence or spanning, you are, in effect, solving a system of equations. You are either trying to solve [itex]a_1v_1+ a_2v_2+ a_3v_3= 0[/itex] (for linear independence) or [itex]a_1v_1+ a_2v_2+ a_3v_3+ a_4v_4= y[/itex] for any y in the space (for spanning). You could do either by setting up the "augmented" matrix with the right side as the "fifth column". Of course, with all "0"s in the fifth column, no row operations will change those: [itex]a_1= a_2= a_3= a_4= 0[/itex] is an obvious solution. Showing that you can reduce the first four columns to the identity matrix is enough to show that is the only solution. Similarly, to show that the set spans the space you add the components of the vector y as the fifth column. You would row-reduce the matrix in exactly the same way, just doing the row operations on the fifth column on the y- components rather than "0"s. But the actual value of the coefficients is not important, only that you can find them. So the values you wind up with in the fifth column is not important, only that you can reduce the first four columns to the identity matrix- exactly what you did to show independence. They really are exactly the same thing.

When someone said you could look at the determinant of the matrix, earlier, you asked what to do if the matrix is not square. In that case, there is not work to do- such a set of vectors cannot be a basis (though it may still span the space or be independent). The number of columns of the matrix, the number of components in each vector, is the dimension of the vector space. The number of rows is the number of vectors in the set. And those must be equal in order to have a basis. If there are fewer vectors than the dimension- if there are more columns than row- they might be independent but cannot span the space. If there are more vectors than the dimension- if there are more rows than columns, they might span the space but cannot be independent.
 
  • #15
Thank you all for being patient and helping me, I do understand it now! I really appreciate your help guys! :)


and as a side note to anyone who comes across this, yes I did make a mistake in the vectors (late night mistakes...) v1 was actually [1 0 1 0]
 

1. What is a vector space?

A vector space is a collection of vectors that can be added together and multiplied by scalars (usually real numbers) to create new vectors. It is a fundamental concept in linear algebra and is used to represent physical quantities such as force and velocity.

2. How do you determine if a vector spans a vector space?

In order for a vector to span a vector space, it must be possible to create any vector within that space by taking linear combinations of the spanning vector. This means that the vector must be a linear combination of the other vectors in the space.

3. What is a linear combination?

A linear combination is the sum of scalar multiples of a set of vectors. For example, if we have two vectors v and w, a linear combination of v and w would be av + bw, where a and b are scalars.

4. How do you determine if a set of vectors is linearly independent?

A set of vectors is linearly independent if none of the vectors can be created by taking linear combinations of the others. In other words, none of the vectors in the set is redundant and they are all necessary to span the vector space.

5. Can a single vector span a vector space?

No, a single vector cannot span a vector space because it is not possible to create all the other vectors in the space through linear combinations of a single vector. A minimum of two linearly independent vectors is required to span a vector space.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
531
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
557
  • Calculus and Beyond Homework Help
Replies
7
Views
338
  • Calculus and Beyond Homework Help
Replies
0
Views
418
Back
Top