1. Lesson 2
Vectors and Matrices
Math 20
September 21, 2007
Announcements
Please fill out section questionnaire.
Problem Set 1 is on the course web site. Due September 26.
Office Hours: Mondays 1–2pm, Tuesdays 3–4pm, Wednesdays
1–3pm (SC 323)
Course material on website, Facebook
2. Vectors
There are some objects which are easily referred to collectively.
3. Vectors
There are some objects which are easily referred to collectively.
Example
The position of me on this floor can be described by two numbers.
4. Vectors
There are some objects which are easily referred to collectively.
Example
The position of me on this floor can be described by two numbers.
It might be
12
v= ,
3
where each unit is one foot, measured from two perpendicular
walls.
5. Example
Suppose I eat two eggs, three slices of bacon, and two slices of
toast for breakfast.
6. Example
Suppose I eat two eggs, three slices of bacon, and two slices of
toast for breakfast. Then my breakfast can be summarized by the
object
2
3 .
b=
2
7. Example
Suppose eggs cost $1.39 per dozen, bacon costs $2.49 per pound,
and bread costs $1.99 per loaf. Assume a pound of bacon has 16
slices, as does a loaf of bread.
8. Example
Suppose eggs cost $1.39 per dozen, bacon costs $2.49 per pound,
and bread costs $1.99 per loaf. Assume a pound of bacon has 16
slices, as does a loaf of bread. Then the price per “unit” of
breakfast is
1.39/12 0.12
p = 2.49/16 = 0.16
1.99/16 0.12
9. There is no end to the quantities that can be expressed collectively
like this:
stock portfolios
(and prices)
weather conditions
Physical state (position, velocity)
etc.
10. Matrices
In other cases numbers naturally line up into arrays. This is often
the case when you have two finite sets of objects and there is a
number corresponding to each pair of objects, one from each set.
11. Example
Pancakes, crˆpes, and blintzes are three types of flat breakfast
e
concoctions, but they have different ingredients. The ingredients
can be arranged like this:
Ingredient Pancakes Crˆpes
e Blintzes
1 1
Flour (cups) 12 1
2
1
Water (cups) 0 0
4
1 1
Milk (cups) 12 1
2
Eggs 2 2 3
Oil (Tbsp) 3 2 2
12. Example
Pancakes, crˆpes, and blintzes are three types of flat breakfast
e
concoctions, but they have different ingredients. The ingredients
can be arranged like this:
Ingredient Pancakes Crˆpes
e Blintzes
1 1
Flour (cups) 12 1
2
1
Water (cups) 0 0
4
1 1
Milk (cups) 12 1
2
Eggs 2 2 3
Oil (Tbsp) 3 2 2
The important information about this table is simply the numbers:
1.5 0.5 1
0 0.25 0
A = 1.5 0.5 1
2 2 3
3 2 2
14. The plan can be expressed as a graph with vertices for rooms and
edges for doorways or passages between the rooms.
Laundry
Kitchen
MBR Hall Bath
LR Office BR2
SR
15. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
010000000 SR
MBR H Bat
LR
MBR
LR O BR2
H
SR
A= Bat
Kit
L
O
BR2
16. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
010000000 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
MBR
LR O BR2
H
SR
A= Bat
Kit
L
O
BR2
17. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
010000000 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
H
SR
A= Bat
Kit
L
O
BR2
18. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A= Bat
Kit
L
O
BR2
19. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A = 0 0 0 1 0 0 0 0 0 Bat
Kit
L
O
BR2
20. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A = 0 0 0 1 0 0 0 0 0 Bat
0 0 0 1 0 0 0 0 0 Kit
L
O
BR2
21. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A = 0 0 0 1 0 0 0 0 0 Bat
0 0 0 1 0 0 0 0 0 Kit
0 0 0 0 0 1 0 0 0 L
O
BR2
22. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A = 0 0 0 1 0 0 0 0 0 Bat
0 0 0 1 0 0 0 0 0 Kit
0 0 0 0 0 1 0 0 0 L
0 1 0 0 0 0 0 0 1 O
BR2
23. Then you can make form a table of incidences:
Laundry
2nd BR
L
Office
MBR
Bath
Hall
Kit
SR
LR
K
0 1 0 0 0 0 0 0 0 SR
MBR H Bat 1 0 0 1 0 0 0 1 0 LR
0 0 0 1 0 0 0 0 0 MBR
LR O BR2
0 1 1 0 1 1 0 0 0 H
SR
A = 0 0 0 1 0 0 0 0 0 Bat
0 0 0 1 0 0 0 0 0 Kit
0 0 0 0 0 1 0 0 0 L
0 1 0 0 0 0 0 0 1 O
0 0 0 0 0 0 0 1 0 BR2
24. Definition
We need some names for the things we’re working with:
25. Definition
We need some names for the things we’re working with:
Definition
An m × n matrix is a rectangular array of mn numbers arranged in
m horizontal rows and n vertical columns.
a11 a12 · · · a1j · · · a1n
a21 a22 · · · a2j · · · a2n
. . . .
.. ..
. . . .
. .
. . . .
A= ai1 ai2 · · · aij · · · ain
. . . .
.. ..
. . . .
. .
. . . .
am1 am2 · · · amj · · · amn
26. Rows and Columns
Definition
The ith row of A is
ai1 ai2 · · · ···
aij ain .
27. Rows and Columns
Definition
The ith row of A is
ai1 ai2 · · · ···
aij ain .
The jth column of A is
a1j
a2j
.
.
.
aij
.
..
amj
28. Rows and Columns
Definition
The ith row of A is
ai1 ai2 · · · ···
aij ain .
The jth column of A is
a1j
a2j
.
.
.
aij
.
..
amj
Sometimes, just be succinct, we’ll write
A = (aij )m×n .
29. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
30. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
Example
The matrix in the pancakes-crˆpes-blintzes example is
e
31. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
Example
The matrix in the pancakes-crˆpes-blintzes example is 5 × 3.
e
32. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
Example
The matrix in the pancakes-crˆpes-blintzes example is 5 × 3.
e
Example
The incidence matrix of my apartment is
33. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
Example
The matrix in the pancakes-crˆpes-blintzes example is 5 × 3.
e
Example
The incidence matrix of my apartment is 9 × 9.
34. Dimensions
Definition
The dimension of a matrix A is the number of rows × (read “by”)
the number of columns.
Example
The matrix in the pancakes-crˆpes-blintzes example is 5 × 3.
e
Example
The incidence matrix of my apartment is 9 × 9.
Note: Order is important!
35. Vector
Definition
An n-vector (or simply vector) is an n × 1 or 1 × n matrix.
36. Vector
Definition
An n-vector (or simply vector) is an n × 1 or 1 × n matrix.
Example
We’ve seen many already. For each n there are also two zero
vectors
0
.
0 = . or 0 · · · 0 .
.
0
37. Vector
Definition
An n-vector (or simply vector) is an n × 1 or 1 × n matrix.
Example
We’ve seen many already. For each n there are also two zero
vectors
0
.
0 = . or 0 · · · 0 .
.
0
In linear algebra we mostly work with column vectors.
38. Algebra of vectors
Example
My wife doesn’t like eggs, so her breakfast may take the form
0
2 .
b=
2
How can you express my wife’s and my breakfast for one day?
39. Algebra of vectors
Example
My wife doesn’t like eggs, so her breakfast may take the form
0
2 .
b=
2
How can you express my wife’s and my breakfast for one day?
Answer.
We just add the components each by each:
2+0 2
3 + 2 = 5 .
2+2 4
40. Algebra of vectors: Adding
Definition
The sum of two n-vectors is the vector whose ith component is
the sum of the ith component of the first vector and ith
component of the second vector.
41. Algebra of vectors: Adding
Definition
The sum of two n-vectors is the vector whose ith component is
the sum of the ith component of the first vector and ith
component of the second vector.
Looking above, we see my wife’s and my breakfast is measured by
the vector b + b .
42. Algebra of vectors
Example
Suppose I eat the same breakfast every day. What vector
represents my consumption over a week?
43. Algebra of vectors
Example
Suppose I eat the same breakfast every day. What vector
represents my consumption over a week?
Answer.
This vector is
7·2 14
7 · 3 = 21 .
7·2 14
44. Algebra of vectors
Example
Suppose I eat the same breakfast every day. What vector
represents my consumption over a week?
Answer.
This vector is
7·2 14
7 · 3 = 21 .
7·2 14
Definition
The scalar multiple of a vector v by number a (called a scalar) is
the vector whose ith component is a times the ith component of v.
45. Algebra of vectors
Example
Suppose I eat the same breakfast every day. What vector
represents my consumption over a week?
Answer.
This vector is
7·2 14
7 · 3 = 21 .
7·2 14
Definition
The scalar multiple of a vector v by number a (called a scalar) is
the vector whose ith component is a times the ith component of v.
So my weekly breakfast vector is 7b.
46. Linear algebra of matrices
Matrices can be added and scaled the same way.
47. Linear algebra of matrices
Matrices can be added and scaled the same way.
Example
1 −1
12
+ =
34 02
48. Linear algebra of matrices
Matrices can be added and scaled the same way.
Example
1 −1
12 21
+ =
34 02 36
49. Linear algebra of matrices
Matrices can be added and scaled the same way.
Example
1 −1
12 21
+ =
34 02 36
Example
11
4 =
−1 2
50. Linear algebra of matrices
Matrices can be added and scaled the same way.
Example
1 −1
12 21
+ =
34 02 36
Example
11 44
4 =
−1 2 −4 8
51. The plane
a
Given a vector , we can consider not only the point (a, b) in
b
the plane, but the arrow that joins the origin to (a, b).
52. The plane
a
Given a vector , we can consider not only the point (a, b) in
b
the plane, but the arrow that joins the origin to (a, b).
One reason for this arrow concept is that the addition of vectors
corresponds to a head-to-tail concatenation of vectors, or
tail-to-tail by the parallelogram law.
53. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
54. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
x
55. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
v
x
56. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
v
x
w
57. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
v
w
x
w
58. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
v
w
v+w
x
w
59. Example
1 2
Let v = and w = . Plot v, w, and v + w.
−1
2
Solution
y
v
w
v+w
v
x
w
60. In three dimensions we have to add a third “direction” to the
Cartesian plane. It’s typical to pretend it points out the paper or
board, but draw it foreshortened.
61. In three dimensions we have to add a third “direction” to the
Cartesian plane. It’s typical to pretend it points out the paper or
board, but draw it foreshortened.
Example
−1
Draw the vector 2 .
1
62. In three dimensions we have to add a third “direction” to the
Cartesian plane. It’s typical to pretend it points out the paper or
board, but draw it foreshortened.
Example
−1
Draw the vector 2 .
1
Solution
z
y
x
63. In three dimensions we have to add a third “direction” to the
Cartesian plane. It’s typical to pretend it points out the paper or
board, but draw it foreshortened.
Example
−1
Draw the vector 2 .
1
Solution
z
y
x
64. In three dimensions we have to add a third “direction” to the
Cartesian plane. It’s typical to pretend it points out the paper or
board, but draw it foreshortened.
Example
−1
Draw the vector 2 .
1
Solution
z
v
y
x