Math 4A-second-class
Math 4A-second-class
1/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Examples:
1 4 5 1 −1
2 + 5 = 7 ; −1 · 2 = −2
3 6 9 3 −3
1 0 1
3 · 2 − 7 · 2 + 2 · −1 =
3 4 0
3·1−7·0+2·1 5
3 · 2 − 7 · 2 + 2 · (−1) = −10
3·3−7·4+2·0 −19
3/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
1 0 1 5
7 · 2 − 3 · 2 − 2 · −1 = 10
3 4 0 9
4/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
0 a b
-3a 0 a b
-3a 0 a b-3a b
x1
7/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
x1
8/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
x1
9/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
x1
10/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Argument:
x
2
d
x1
11/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Argument:
x
2
p+d
p
d
x1
12/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Argument:
x
2
p-d
d
x1
13/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Argument:
x
2
p + td
p
d
x1
14/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
Pictured are points u, v ∈ R2 .
Which point represents u~ − 3~v ?
x
2
x1
v
15/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
Pictured are points u, v ∈ R2 .
Which point represents u~ − 3~v ?
x
2 D
C
E
B
u
A
x1
v
16/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
Pictured are points u, v ∈ R2 .
Which point represents u~ − 3~v ?
x
2
x1
v
17/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
Pictured are points u, v ∈ R2 .
Which point represents u~ − 3~v ?
x
2
-3v
-v u
x1
v
18/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
19/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Definition
Suppose {t1 , t2 . . . tk } are all real numbers.
The vector
~y = t1 ~v1 + · · · + tk ~vk
is called a linear combination of the vectors {~v1 , ~v2 . . . ~vk }.
Sample problem:
Given vectors {~a1 , ~a2 . . . ~an , ~b} in Rm , find real numbers
{t1 , t2 . . . tn } so that
20/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
t1 ~a1 + · · · + tn ~an = ~b :
Let
b1 a1j
b2 a2j
~b =
b3 ;
~aj = a3j for 1 ≤ j ≤ n,
.. ..
. .
bm amj
notice j is second index. Then for any 1 ≤ i ≤ m, the i th row of
the equation becomes:
21/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
t1 ~a1 + · · · + tn ~an = ~b :
a11 t1 + . . . + a1n tn = b1
a21 t1 + . . . + a2n tn = b2
..
.
am1 t1 + . . . + amn tn = bm
22/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Solving
t1 ~a1 + · · · + tn ~an = ~b :
is the same as solving a system of m linear equations.
The system has augmented matrix (watch the rule for writing i
and j in aij )
a11 a12 . . . a1n b1
a21 a22 . . . a2n b2
.. .. .. .. ..
. . . . .
am1 am2 . . . amn bm
Since each ~aj is a column of i numbers, can just write
h i
~a1 ~a2 . . . ~an ~b
23/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Suppose
0 0 6 0
2 2 −1 6
4 ~a2 = 4 ~a3 = 1 ~a4 = 10
~a1 =
8 8 −1 26
24/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
25/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
3
c1 = − c2 , c2 free
2
c3 = 2
1
c4 = ,
2
or equivalently
3 1
c2 = anything , c1 = − c2 , c3 = 2, c4 =
2 2
26/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Definition
Given a collection {~v1 , ~v2 , . . . , ~vk } of vectors in Rm , the set of all
linear combinations of these vectors, that is all vectors that can be
written as
c1 ~v1 + · · · + ck ~vk
for some c1 , . . . , ck ∈ R is denoted
27/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
(3u+5v)/2
u
v
28/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
29/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
1 1 0 0 23
0 0 6 0 12
2 2 −1 6 4 0 0 1 0 2
4 4 1 10 13 →
0 0 0 1 12
8 8 −1 26 23 0 0 0 0 0
has general solution:
3 1
c2 = anything , c1 = − c2 , c3 = 2, c4 =
2 2
30/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
p + td
p
d
x1
31/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
3
0 23 − x2 − πx4
1 1 0 π x1 =
0 2
0 1 e 0 2
⇒ x3 = 2 − ex4
0 0 0 0 1 12
0 0 0 0 0 0 1
x5 =
2
which can be written:
3 3
x1 2 − x2 − πx4 2 −1 −π
x2 x2 0 1 0
x3 = 2 − ex4 = 2 + x2 0 + x4 −e =
x4 x4 0 0 1
1 1
x5 2 2 0 0
32/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
3
2
−1 −π
0 0
1
= 2 + Span 0 , −e ,
0
0 1
1
0 0
2
Intuition from physical space – span of two vectors is a plane
through ~0.
3/2
0
Thus all solutions are ”plane shifted by fixed p~ ”, p~ =
2 .
0
1/2
33/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
34/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Definition
The linear combination
x1 ~a1 + · · · + xk ~ak
is abbreviated
x1
x2
. . . ~ak x3 .
~a1 ~a2 ~a3
..
.
xk
Here ~a1 ~a2 ~a3 . . . ~ak is the matrix A with i th column ~ai .
35/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
36/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
b1
b2
a1 a2 . . . ak . = column×coord = a1 b1 +a2 b2 +. . . ak bk .
..
bk
ai ∈ R1 ) the column-times-coordinate is the same as
In this case (~
row-times-column (equals a number!).
7
3
Example: 1 −2 3 −4 1 =
= 1 · 7 + (−2) · 3 + 3 · 1 + (−4) · 2 = 7 − 6 + 3 − 8 = −4 ∈ R1 .
37/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
38/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
2
2 3 −1 2 3 −1
1 = clmn × crdt = 2 +1 +4
4 −2 5 4 −2 5
4
so
2
2 3 −1 2·2+3·1−1·4 3
1 = = ∈ R2 .
4 −2 5 4·2−2·1+5·4 26
4
39/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
2
2 3 −1 2·2+3·1−1·4 3
1 = = ∈ R2 .
4 −2 5 4·2−2·1+5·4 26
4
40/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Further abbreviation:
Use vector notation:
x1
x2
x3
= ~x
..
.
xk
then
x1
x2
. . . ~ak x3 = A~x
x1 ~a1 + · · · + xk ~ak = ~a1 ~a2 ~a3
..
.
xk
(u1 +v1 )~a1 +· · ·+(un +vn )~an = (u1 ~a1 +· · ·+un ~an )+(v1 ~a1 +· · ·+vn ~an ) =
A~
u + A~v
42/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
3
1 −2 3 −4
7 =?
−2 1 −4 3 2
1
The matrix is 2 × 4 and the vector is in R4 , so may multiply,
result is in R2 .
Either by column×coordinate rule (add 4 R2 -vectors)
1 −2 3 −4
3+ 7+ 2+ 1=
−2 1 −4 3
43/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
ai1 x1 + · · · + ain xn = bi , i = 1, . . . , m
A~x = ~b
where A = ~a1 ~a2 ~a3 . . . ~an .
44/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
45/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Now solve.
Solutions, if any, may be described either as a formula with
free variables, if any, or in the form
~x ∈ p~ + Span{~v1 , . . . ~vk }.
47/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Another phrasing:
~b ∈ Span{~a1 , ~a2 . . . ~an }
48/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Example:
6 2 3 −1
Is in Span{ }?
−5 4 −2 5
Translation: For
x1
2 3 −1
A= ; ~x = x2
4 −2 5
x3
6
is there a solution ~x to the matrix equation A~x = ?
−5
49/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Answer:
2 3 −1 6 2 3 −1 6
→
4 −2 5 −5 0 −8 7 −17
This is echelon form. Proceed to reduced echelon form:
2 0 21−8 48−51
2 3 −1 6 8 8
→ =
0 −8 7 −17 0 −8 7 −17
13 −3
2 0 8 8
0 −8 7 −17
There is one free variable x3 so there is a line of solutions.
(Note: this will be true for any ~b, so the 3 vectors span all of R2 .)
Let’s find a solution!
50/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
13 −3
2 0 8 8
0 −8 7 −17
If set free variable x3 = 0 get 2x1 = −3/8, −8x2 = −17.
−3/16
6
So ~x = 17/8 should be a solution to A~x =
.
−5
0
51/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
2x1 = −16/8
(first row) and −8x2 = −24 ⇒ x1 = −1, x2 = 3
−1
so ~x = 3 is another solution.
1
52/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
53/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
54/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
A~x = ~b
where
b1
a11 a12 . . . a1n b2
a21 a22 . . . a2n
A= .
.. .. .. ;
~b =
b3
.. . . . ..
.
am1 am2 . . . amn
bm
55/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
56/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
A~x = ~0.
58/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Theorem
A homogeneous system has nontrivial solutions if and only if there
is at least one free variable.
Reason:
If no free variables, then in reduced echelon form the augmented
matrix is:
1 0 ... 0 0
0 1 ... 0 0
.. .. . . .. ..
.
. . . .
0 0 ... 1 0
0 0 ... 0 0
.. .. . . .. ..
. . . . .
0 0 ... 0 0
Only solution is x1 = x2 = . . . = xn = 0.
59/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
On the other hand, if there are free variables, can set them to
anything and back-substitute a solution:
x1 + 0x2 + 0.35x3 = 0
0x1 + 1x2 + 0x3 = 0
Example:
For the system
1 −2 3
A~x = ~0 where A = 3 2 −2
4 0 1
we are told that the last row is the sum of the first two rows. Is
the solution set S trivial or not? Here ~x ∈ R3 .
62/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Answer: write the matrix as A = [~a1 ~a2 ~a3 ], then we are told that
~a3 = ~a1 + ~a2 .
This means
1
~a1 + ~a2 + (−1)~a3 = ~0 ⇒ A 1 = ~0.
−1
Hence S is nontrivial.
If S is nontrivial, then it is infinite. Why?
63/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
General fact:
If reduced echelon form has k free variables,
then there are k vectors in Rn which exactly span the set of solutions:
64/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
65/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
First observation:
If the last column of echelon form of augmented matrix is a pivot,
then there is no solution. We say the system of equations is
inconsistent.
$ ∗ ∗ ∗ ∗ ∗
0 $ ∗ ∗ ∗ ∗
0 0 0 $ ∗ ∗
0 0 0 0 0 $
0 0 0 0 0 0
$ = non-zero entry (so a pivot)
The last non-zero row says 0x1 + 0x2 + · · · + 0xn = $. Since $ 6= 0
this is impossible.
66/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
67/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
x1 + 0x2 + ∗0 + 0x4 + ∗0 = π
0x1 + x2 + ∗0 + 0x4 + ∗0 = e
√
0x1 + 0x2 + ∗0 + x4 + ∗0 = 2
√
Clearly x1 = π, x2 = e, x4 = 2 is a solution.
68/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
So far, we’ve found how to determine one solution s~0 . That is,
s0 = ~b
A~
69/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Ax = b
s0
Ax = 0
70/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Translation A~x = ~b
homogeneous system:
Translation A~x = ~0
71/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Replace L3 by −2L2 + L3 :
1 2 −3 2 −4 1
0 0 1 −3 2 1
0 0 0 0 0 0
1 2 −3 2 −4 1
0 0 1 −3 2 1
0 0 0 0 0 0
To find solution need reduced echelon. Replace L1 with L1 + 3L3
1 2 0 −7 2 4
0 0 1 −3 2 1
0 0 0 0 0 0
Free variables: x2 , x4 , x5 . Set them to 0 and get:
x1 = 4, x3 = 1. Hence one solution is
4
0
s~0 =
1 .
0
0
73/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
translates to
x1 −2x2 + 7x4 − 2x5 −2 7 −2
x2 x2 1 0 0
x3 =
3x4 − 2x5 = x2 0 + x4 3 + x5 −2
x4 x4 0 1 0
x5 x5 0 0 1
74/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Picture:
Span{u,v}
u
75/76
Vectors Picturing vectors Properties of vectors Linear combination Span Compact notation Matrix-vector multiplicatio
Picture:
s0+Span{u,v}
u
s0
v
76/76