Worksheet 1.5 Worksheet: working with span
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.
Input the matrix and vector in the cell below.
xxxxxxxxxx
from sympy import Matrix, init_printing
init_printing()
See Section B.3 for details on how to enter your matrix and vector, and how to compute the following.
Next, compute
xxxxxxxxxx
Finally, compute the corresponding linear combination of the columns of and confirm that you get the same answer.
xxxxxxxxxx
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:
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.
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
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.
xxxxxxxxxx
3.
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 entera, 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.