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 \(\vv_1, \vv_2,\ldots, \vv_k\) in a vector space \(V\) is the set of all linear combinations that can be generated from those vectors.
Recall the following fact: given a matrix \(A\) and vector \(\xx\text{,}\)\(A\xx\) is a linear combination of the columns of \(A\text{.}\)
In particular, if we write \(A\) in terms of its columns as \(A = \bbm \vv_1 \amp \vv_2 \amp \cdots \amp \vv_n\ebm\) then
where \(x_1,x_2,\ldots, x_n\) are the components of \(\xx\text{.}\)
Let’s confirm this for the matrix \(A = \bbm 2\amp 3\amp -5\amp 6\\-7\amp 20\amp -11\amp 6\\43 \amp -6\amp 31\amp 2\ebm\) and vector \(\xx = \bbm 7\\-9\\3\\14\ebm\text{.}\)
Input the matrix and vector in the cell below.
See Section B.3 for details on how to enter your matrix and vector, and how to compute the following.
Next, compute \(A\xx\text{:}\)
Finally, compute the corresponding linear combination of the columns of \(A\text{,}\) and confirm that you get the same answer.
The question “Does the vector \(\ww\) belong to the span of \(\vv_1, \vv_2,\ldots, \vv_k\text{?}\)” is equivalent to asking, “Can I write \(\ww\) as a linear combination of the \(\vv_i\text{?}\)” This, in turn, is equivalent to asking:
Do there exist scalars \(x_1,x_2,\ldots, x_k\) such that
If the above vectors are vectors in \(\R^n\text{,}\) then we just saw that the right-hand side of the above equation is \(A\xx\text{,}\) where \(\vv_1,\vv_2,\ldots, \vv_k\) are the columns of \(A\text{.}\) So the question of whether \(\ww\) is in the span of the \(\vv_i\) is equivalent to determining whether the equation \(A\xx=\ww\) has a solution.
1.
Determine whether or not the vector \(\ww=\langle 3,-1, 4, 2\rangle\) in \(\R^4\) 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?)
If our vector space is not \(\R^n\text{,}\) 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 \(q(x) = 4-6x-11x^2\) belongs to the span of the polynomials
The above problems all answer the same basic question: given a particular vector \(\ww\text{,}\) is it in the span of given vectors \(\vv_1,\vv_2,\ldots,\vv_k\text{?}\)
A more interesting problem is the following: iven the vectors \(\vv_1,\vv_2,\ldots, \vv_k\text{,}\) 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 \(\ww\) be an arbitrary vector in \(V\text{,}\) and write it in terms of its (unknown) coefficients. For example, in question 1 above, we might let \(\ww = \langle a, b, c, d\rangle\text{.}\)
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.