This document provides an outline and review for a midterm exam in Math 20. It covers topics like vectors, matrices, vector and matrix algebra, geometry of lines and planes, and determinants. There will be a midterm exam on October 18th from 7-8:30pm in Hall A. Old exams and solutions are available online, and there are review sessions being held on Wednesday.
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Review for Midterm I Math 20
1. Review for Midterm I
Math 20
October 16, 2007
Announcements
Midterm I 10/18, Hall A 7–8:30pm
ML Office Hours Wednesday 1–3 (SC 323)
SS review session Wednesday 8–9pm (location TBA)
Old exams and solutions on website
2. Outline
Determinants by sudoku
Vector and Matrix Algebra
patterns
Vectors
Determinants by Cofactors
Algebra of vectors
Systems of Linear Equations
Scalar Product
Matrices Inversion
Addition and scalar Determinants and the
multiplication of matrices inverse
Inverses of 2 × 2 matrices
Matrix Multiplication
The Transpose Computing inverses with the
Geometry adjoint matrix
Lines Computing inverses with row
Planes reduction
Determinants Properties of the inverse
3. Vector and Matrix Algebra
Learning Objectives
Add, scale, and compute linear combinations of vectors
Compute the scalar product of two vectors
Add and scale matrices
Multiply matrices
all of these with the caveat of “if possible.”
4. Vectors
Definition
An n-vector (or simply vector) is an ordered list of n numbers.
We can write them in a row or in a column.
1
b = (1, 0, −1)
2
a=
3
In linear algebra we mostly work with column vectors.
5. Algebra of vectors
Definition
Addition of vectors is defined componentwise, as is scalar
multiplication:
a1 b1 a1 + b 1
a2 b 2 a2 + b 2
. + . = .
. . .
. . .
an bn an + bn
a1 ta1
a2 ta2
t . = .
. .
. .
an tan
6. Dot product
Definition
Given two vectors of the same dimension (size), their scalar
product (or “dot product”) is the sum of the product of the
components of the vectors:
a1 b1
n
a2 b2
. · . = a1 b1 + a2 b2 + · · · + an bn = ai bi
. .
. . i=1
an bn
7. Matrices
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
8. Addition and scalar multiplication of matrices
Matrices can be added and scaled just like vectors:
Example
1 −1
12 21
+ =
34 02 36
Example
11 44
4 =
−1 2 −4 8
9. The matrix-vector product
Definition
v1
v
Let A = (aij ) be an m × n matrix and v = 2 a n-vector
. . .
vn
(column vector). The matrix-vector product of A and v is the
w1
w2
vector Av = , where
. . .
wm
n
wk = ak1 v1 + ak2 v2 + · · · + akn vn = akj vj ,
j=1
the dot product of kth row of A with v.
10. Example
Let
23
2
A = −1 4 and v=
−1
03
Find Av.
11. Example
Let
23
2
A = −1 4 and v=
−1
03
Find Av.
Solution
2 · 2 + 3 · (−1)
Av = (−1) · 2 + 4 · (−1)
0 · 2 + 3 · (−1)
12. Example
Let
23
2
A = −1 4 and v=
−1
03
Find Av.
Solution
2 · 2 + 3 · (−1) 4−1
Av = (−1) · 2 + 4 · (−1) = −2 − 4
0 · 2 + 3 · (−1) 0−3
13. Example
Let
23
2
A = −1 4 and v=
−1
03
Find Av.
Solution
2 · 2 + 3 · (−1) 4−1 1
(−1) · 2 + 4 · (−1) = −2 − 4 = −6 .
Av =
0 · 2 + 3 · (−1) 0−3 −3
14. Matrix product, defined
Definition
Let A be an m × n matrix and B a n × p matrix. Then the matrix
product of A and B is the m × p matrix whose jth column is Abj .
In other words, the (i, j)th entry of AB is the dot product of ith
row of A and the jth column of B. In symbols
n
(AB)ij = aik bkj .
k=1
Example
1.5 0.5 1 125 115 110 105
0 0.25 0 ‘70 60 50 40 5 7.5 7.5 7.5
1.5 0.25 0 20 30 30 30 = 100 97.5 82.5 67.5
2 2 3 10 10 20 30 210 210 220 230
3 2 2 270 260 250 240
15. The Transpose
There is another operation on matrices, which is just flipping rows
and columns.
Definition
Let A = (aij )m×n be a matrix. The transpose of A is the matrix
A = (aij )n×m whose (i, j)th entry is aji .
16. The Transpose
There is another operation on matrices, which is just flipping rows
and columns.
Definition
Let A = (aij )m×n be a matrix. The transpose of A is the matrix
A = (aij )n×m whose (i, j)th entry is aji .
Example
12
Let A = 3 4. Then
56
A=
17. The Transpose
There is another operation on matrices, which is just flipping rows
and columns.
Definition
Let A = (aij )m×n be a matrix. The transpose of A is the matrix
A = (aij )n×m whose (i, j)th entry is aji .
Example
12
Let A = 3 4. Then
56
135
A= .
246
18. The Transpose
There is another operation on matrices, which is just flipping rows
and columns.
Definition
Let A = (aij )m×n be a matrix. The transpose of A is the matrix
A = (aij )n×m whose (i, j)th entry is aji .
Example
12
Let A = 3 4. Then
56
135
A= .
246
Fact
Given matrices A and B, of suitable dimensions,
(AB) = B A
19. Outline
Determinants by sudoku
Vector and Matrix Algebra
patterns
Vectors
Determinants by Cofactors
Algebra of vectors
Systems of Linear Equations
Scalar Product
Matrices Inversion
Addition and scalar Determinants and the
multiplication of matrices inverse
Inverses of 2 × 2 matrices
Matrix Multiplication
The Transpose Computing inverses with the
Geometry adjoint matrix
Lines Computing inverses with row
Planes reduction
Determinants Properties of the inverse
20. Geometry
Learning Objectives
Given a point and a line, decide if the point is on the line
Given a point and a direction, or two points, find the equation
for the line
Given a point and a plane, decide of the point is on the plane
Given a point and a normal vector, find the equation for the
plane
21. Lines
Definition
The line L through (the head of) a parallel to v is the set of all x
such that
x = a + tv
for some real number t.
The line L through (the heads of) a and b is
x = a + t(b − a)
= (1 − t)a + tb
25. Example
Find an equation for the line through (−3, 2, −3) and (1, −1, 4)
Is (1, 2, 3) on this line?
26. Example
Find an equation for the line through (−3, 2, −3) and (1, −1, 4)
Is (1, 2, 3) on this line?
Answer.
No!
27. Planes
Definition
A hyperplane through (the head of) a that is orthogonal to a
vector p is the set of all (heads of) vectors x such that
p · (x − a) = 0
29. Example
Find an equation for the plane through (−3, 0, 7) perpendicular to
(5, 2, −1)
Solution
5x + 2y − z = 22
30. Example
Find an equation for the plane through (−3, 0, 7) perpendicular to
(5, 2, −1)
Solution
5x + 2y − z = 22
Question
Is (1, 2, 3) on this plane? Is there a point on the plane with z = 0?
31. Fact
If the equation for a plane is
Ax + By + Cz = D,
then p = (A, B, C ) is normal to the plane.
32. Outline
Determinants by sudoku
Vector and Matrix Algebra
patterns
Vectors
Determinants by Cofactors
Algebra of vectors
Systems of Linear Equations
Scalar Product
Matrices Inversion
Addition and scalar Determinants and the
multiplication of matrices inverse
Inverses of 2 × 2 matrices
Matrix Multiplication
The Transpose Computing inverses with the
Geometry adjoint matrix
Lines Computing inverses with row
Planes reduction
Determinants Properties of the inverse
41. Sarrus’s Rule
a11 a12 a13 a11 a12 a11 a22 a33 + a12 a23 a31
=
+a13 a21 a32 − a13 a22 a31
a21 a22 a23 a21 a22
−a11 a23 a32 − a12 a21 a33
a31 a32 a33 a31 a32
This trick does not work for any other determinants!
42. Determinants by sudoku patterns
Definition
Let A = (aij )n×n be a matrix. The determinant of A is a sum of
all products of n elements of the matrix, where each product takes
exactly one entry from each row and column.
43. Determinants by sudoku patterns
Definition
Let A = (aij )n×n be a matrix. The determinant of A is a sum of
all products of n elements of the matrix, where each product takes
exactly one entry from each row and column.
The sign of each product is given by (−1)σ , where σ is the number
of upwards lines used when all the entries in a pattern are
connected.
45. Determinants by Cofactors
Definition
Let A = (aij )n×n be a matrix. The (i, j)-minor of A is the matrix
obtained from A by deleting the ith row and j column. This matrix
has dimensions (n − 1) × (n − 1).
The (i, j) cofactor of A is the determinant of the (i, j) minor
times (−1)i+j .
46. The signs here seem complicated, but they’re not. The number
(−1)i+j is 1 if i and j are both even or both odd, and −1
otherwise. They make a checkerboard pattern:
+ − + ···
− + − · · ·
+ − + · · ·
. . . ..
... .
...
48. Fact
The determinant of A = (aij )n×n is the sum
a11 C11 + a12 C12 + · · · + a1n C1n
Fact
The determinant of A = (aij )n×n is the sum
a11 Ci1 + ai2 Ci2 + · · · + ain Cin
for any i.
49. Fact
The determinant of A = (aij )n×n is the sum
a11 C11 + a12 C12 + · · · + a1n C1n
Fact
The determinant of A = (aij )n×n is the sum
a11 Ci1 + ai2 Ci2 + · · · + ain Cin
for any i.
Fact
The determinant of A = (aij )n×n is the sum
a1j C1j + a2j C2j + · · · + anj Cnj
for any j.
50. Theorem (Rules for Determinants)
Let A be an n × n matrix.
1. If a row or column of A is full of zeros, then |A| = 0.
2. |A | = |A|
3. If B is the matrix obtained by multiplying each entry of one
row or column of A by the same number α, then |B| = α |A|.
4. If two rows or columns of A are interchanged, then the
determinant changes its sign but keeps its absolute value.
5. If a row or column of A is duplicated, then |A| = 0.
51. Theorem (Rules for Determinants, continued)
Let A be an n × n matrix.
5. If a row or column of A is proportional to another, then
|A| = 0.
6. If a scalar multiple of one row (or column) of A is added to
another row (or column), then the determinant does not
change.
7. The determinant of the product of two matrices is the product
of the determinants of those matrices:
|AB| = |A| |B|
8. if α is any real number, then |αA| = αn |A|.
52. Outline
Determinants by sudoku
Vector and Matrix Algebra
patterns
Vectors
Determinants by Cofactors
Algebra of vectors
Systems of Linear Equations
Scalar Product
Matrices Inversion
Addition and scalar Determinants and the
multiplication of matrices inverse
Inverses of 2 × 2 matrices
Matrix Multiplication
The Transpose Computing inverses with the
Geometry adjoint matrix
Lines Computing inverses with row
Planes reduction
Determinants Properties of the inverse
53. Systems of Linear Equations
Learning Objectives
Solve a System of Linear Equations using Gaussian Elimination
Find the (R)REF of a matrix.
54. Row Operations
The operations on systems of linear equations are reflected in the
augmented matrix.
1. Transposing (switching) rows in an augmented matrix does
not change the solution.
2. Scaling any row in an augmented matrix does not change the
solution.
3. Adding to any row in an augmented matrix any multiple of
any other row in the matrix does not change the solution.
55. Gaussian Elimination
1. Locate the first nonzero column. This is pivot column, and
the top row in this column is called a pivot position.
Transpose rows to make sure this position has a nonzero entry.
If you like, scale the row to make this position equal to one.
2. Use row operations to make all entries below the pivot
position zero.
3. Repeat Steps 1 and 2 on the submatrix below the first row
and to the right of the first column. Finally, you will arrive at
a matrix in row echelon form. (up to here is called the
forward pass)
4. Scale the bottom row to make the leading entry one.
5. Use row operations to make all entries above this entry zero.
6. Repeat Steps 4 and 5 on the submatrix formed above and to
the left of this entry. (These steps are called the backward
pass)
57. Outline
Determinants by sudoku
Vector and Matrix Algebra
patterns
Vectors
Determinants by Cofactors
Algebra of vectors
Systems of Linear Equations
Scalar Product
Matrices Inversion
Addition and scalar Determinants and the
multiplication of matrices inverse
Inverses of 2 × 2 matrices
Matrix Multiplication
The Transpose Computing inverses with the
Geometry adjoint matrix
Lines Computing inverses with row
Planes reduction
Determinants Properties of the inverse
58. Inversion
Learning Objectives
Use the determinant to determine whether a matrix is
invertible
Find the inverse of a matrix
59. Determinants and the inverse
If A has an inverse A−1 , what is |A|−1 ?
Answer.
|A| A−1 = AA−1 = |I| = 1
Fact
A is invertible if and only if |A| = 0.
60. Inverses of 2 × 2 matrices
ab
Let A = . This is small enough that we can explicitly solve
cd
for A−1 .
Fact
If ad − bc = 0, then
−1
d −b
1
ab
= .
−c a
cd ad − bc
61. Cofactors
Remember how we computed determinants: Given A, Cij was
(−1)i+j times the determinant of Aij , which was A with the ith
row and j column deleted.
Let C+ = (Cij ). Then
A(C+ ) = |A| I
So
1
A−1 = (C+ )
|A|
We denote by adj A the matrix (C+ ) , the adjoint matrix of A.
62. Computing inverses with row reduction
To find the inverse of A, form the augmented matrix A I and
row reduce. If the RREF has the form I B then B = A−1 .
Otherwise, A is not invertible.
65. Properties of the inverse
Theorem (Properties of the Inverse)
Let A and B be invertible n × n matrices. Then
(a) (A−1 )−1 = A
(b) (AB)−1 = B−1 A−1
(c) (A )−1 = (A−1 )
(d) If c is any nonzero number, (cA)−1 = c −1 A−1 .