2.2 Vector Equations and Spans¶
The span of a set of vectors¶
If the vector \(\vec b\) is in the span of the vectors \(\{\vec v_1, \vec v_2, \dots \vec v_n\}\), then there is some linear combination that makes the vector equation true.
As shown in Margalit and Robanoff, we can find the weights \(c_1, c_2, \dots , c_n\) by row-reducing an augmented matrix. Let’s rewrite the equation above slightly by calling the weights \(x_1, x_2, \dots , x_n\).
If the columns of the matrix \(A\) are comprised of the vectors \(\vec v_1, \vec v_2, \dots ,\vec v_n\), we would write
and then the above vector equations are equivalent to the matrix equations
We already know from Chapter 1 that the solution vector \(\vec x\) can be found by row-reducing the augmented matrix \([A | \vec b]\).
Example 1¶
Determine if the vector \(\vec b\) in the span of the vectors
where
v1 = [5 ; 3 ; -2]
v2 = [ 0; 2 ; 5 ]
v3 = [3 ; 4 ; 3]
b = [ 4 ; 0 ; 2]
v1 =
5
3
-2
v2 =
0
2
5
v3 =
3
4
3
b =
4
0
2
We create the matrix \(A\) using the vectors as its columns.
A = [v1, v2, v3]
A =
5 0 3
3 2 4
-2 5 3
We want to augment \(A\) with the vector \(\vec b\) and then row-reduce.
[A,b]
ans =
5 0 3 4
3 2 4 0
-2 5 3 2
rref([A,b])
ans =
1.0000 0 0 5.2308
0 1.0000 0 6.9231
0 0 1.0000 -7.3846
The components of the vector \(\vec x\) are the weights of the linear combination. Let’s use the rats
function to better understand what rational numbers we’re talking about.
rats(rref([A,b]))
ans =
3x56 char array
' 1 0 0 68/13 '
' 0 1 0 90/13 '
' 0 0 1 -96/13 '
Mathematicians often write vectors like this as scalar multiples because they look much better.
Example 2¶
Determine if the vector \(\vec b\) in the span of the vectors \(\vec v_1, \vec v_2\) where
We create the vectors first, then row-reduce the augemented matrix.
v1 = [0;4;0;4]
v2 = [-1;5;0;-1]
b = [5 ; -17 ; 0 ; 3]
v1 =
0
4
0
4
v2 =
-1
5
0
-1
b =
5
-17
0
3
M = [v1,v2]
M =
0 -1
4 5
0 0
4 -1
rref([M, b])
ans =
1 0 0
0 1 0
0 0 1
0 0 0
We see the third row is impossible since \((0)x_1 + (0)x_2 \neq 1\). Since the matrix equations are inconsistent, there is no linear cobination of the vectors \(\vec v_1,\vec v_2\) that is equal to \(\vec b\) and, thus,