Skip to main content

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 v1,v2,,vk 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 x, Ax is a linear combination of the columns of A.
In particular, if we write A in terms of its columns as A=[v1v2vn] then
Ax=x1v1+x2v2++xnvn,
where x1,x2,,xn are the components of x.
Let’s confirm this for the matrix A=[2356720116436312] and vector x=[79314].
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 Ax:
Finally, compute the corresponding linear combination of the columns of A, and confirm that you get the same answer.
The question “Does the vector w belong to the span of v1,v2,,vk?” is equivalent to asking, “Can I write w as a linear combination of the vi?” This, in turn, is equivalent to asking:
Do there exist scalars x1,x2,,xk such that
w=x1v1+x2v2++xkvk?
If the above vectors are vectors in Rn, then we just saw that the right-hand side of the above equation is Ax, where v1,v2,,vk are the columns of A. So the question of whether w is in the span of the vi is equivalent to determining whether the equation Ax=w has a solution.

1.

Determine whether or not the vector w=3,1,4,2 in R4 belongs to the span of the vectors
2,1,4,3,0,2,1,4,1,1,0,2.
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 Rn, 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)=46x11x2 belongs to the span of the polynomials
p1(x)=x3x2,p2(x)=2x,p3(x)=1+4x+x2.

3.

Determine whether or not the matrix B=[417562] belongs to the span of the matrices
A1=[120324],A2=[327013],A3=[013204],A4=[113201].
The above problems all answer the same basic question: given a particular vector w, is it in the span of given vectors v1,v2,,vk?
A more interesting problem is the following: iven the vectors v1,v2,,vk, 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 w be an arbitrary vector in V, and write it in terms of its (unknown) coefficients. For example, in question 1 above, we might let w=a,b,c,d.

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.