In this worksheet, we will attempt to understand the concept of span. Recall from Section 1.4 that the span of a set of vectors in a vector space is the set of all linear combinations that can be generated from those vectors.
Recall the following fact: given a matrix and vector , is a linear combination of the columns of .
In particular, if we write in terms of its columns as then
,
where are the components of .
Let’s confirm this for the matrix and vector .
Input the matrix and vector in the cell below.
xxxxxxxxxx
1
fromsympyimportMatrix, init_printing
2
init_printing()
Messages
See Section B.3 for details on how to enter your matrix and vector, and how to compute the following.
Next, compute :
xxxxxxxxxx
1
Messages
Finally, compute the corresponding linear combination of the columns of , and confirm that you get the same answer.
xxxxxxxxxx
1
Messages
The question “Does the vector belong to the span of ?” is equivalent to asking, “Can I write as a linear combination of the ?” This, in turn, is equivalent to asking:
Do there exist scalars such that
?
If the above vectors are vectors in , then we just saw that the right-hand side of the above equation is , where are the columns of . So the question of whether is in the span of the is equivalent to determining whether the equation has a solution.
1.
Determine whether or not the vector in belongs to the span of the vectors
.
To assist with solving this problem, a code cell is provided below. Once you have determined the augmented matrix of your system of equations, enter the matrix, and then compute its reduced row-echelon form.
(Do you recall how to tell if a system has a solution from the RREF?)
xxxxxxxxxx
1
Messages
If our vector space is not , we can still apply the above technique, but we first have to turn our span equation into a system of linear equations.
2.
Determine whether or not the polynomial belongs to the span of the polynomials
.
xxxxxxxxxx
1
Messages
3.
Determine whether or not the matrix belongs to the span of the matrices
.
The above problems all answer the same basic question: given a particular vector , is it in the span of given vectors ?
A more interesting problem is the following: iven the vectors , what are all the vectors in their span? That is, how can we describe the span of a set of vectors more directly?
We can answer this question as follows: let be an arbitrary vector in , and write it in terms of its (unknown) coefficients. For example, in question 1 above, we might let .
4.
For each problem above, define symbolic variables using the symobols command. For example, you can enter
a, b, c = symbols('a b c')
to create three undetermined symbols.
Then replace the last column in each augmeted matrix from the previous problems with a column of symbols, and instead of using the rref() command, use the echelon_form() command to reduce the matrix.
By looking at the reduced form of hte matrix, determine a relationship (or relationships) between the variables that must hold for the system to be consistent. You can then use this to define the set of vectors in the span.
You have attempted 1 of 3 activities on this page.