ii
CONTENTS
iii
Contents
1
Introduction
Linear inequalities
Conics
4.1 Transforming conics .
4.1.1 Translation .
4.1.2 Rotation . . .
4.2 The Theory . . . . .
4.3 Geometrical definition
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
4
6
7
7
8
9
10
13
. . . . . .
. . . . . .
. . . . . .
. . . . . .
of conics
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
18
18
19
20
22
.
.
.
.
.
.
37
37
38
41
41
41
41
Inverses
7.1 Relation to linear equations . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Finding inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.3 Finding inverses in general . . . . . . . . . . . . . . . . . . . . . . . .
43
43
44
45
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iv
CONTENTS
Determinants
47
8.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.2 Effects of row operations on determinant . . . . . . . . . . . . . . . . 49
8.3 n n determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
. . . . . . .
eigenvalues
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
53
53
54
55
56
60
.
.
.
.
.
63
65
67
67
70
70
Chapter 1
Introduction
Some Greek highlights
Chapter 2
Position vector OP
2.1
Vector operations
Definition 2.2.
1) Addition
define the sum of two vectors by
(x1 , x2 ) + (y1 , y2 ) = (x1 + y1 , x2 + y2 )
2) Scalar multiplication
A scalar is a real number. If x = (x1 , x2 ) is a vector and R is a scalar
x = (x1 , x2 ) = (x1 , x2 )
Subtraction
x y = x + (y ) = (x1 y1 , x2 y2 )
2.2. LINES
Note. If , R and x , y R2
i) (x + y ) = x + y
ii) ( + )x = x + x
Proof.
(i)
(x + y ) = (x1 + y1 , x2 + y2 )
= ((x1 + y1 ), (x2 + y2 ))
= (x1 + y1 , x2 + y2 )
= (x1 , y1 ) + (y1 , y2 )
= x + y
(ii) excercise
2.2
Lines
In Euclid, points and lines are undefined. But we need to define points and lines. We
have already defined points.
Definition 2.3. Let a, u be vectors in R2 with u 6= O. The set of vectors {a + u |
R} is called a line.
Definition 2.4. Two lines {a + u | R} and {b + v | R} are parallel iff
v = u for some R.
Next we will prove the three famous propositions from Euclid.
Proposition 2.1. If L, L are parallel lines which have a point in common, then L = L .
Proposition 2.2. Through any two points, there is exactly one line.
Proposition 2.3. Two non parallel lines meet in exactly one point.
Proof. Proposition 2.1.
Let
L = {a + u | R}
L = {b + v | R}
As L, L are parallel, v = u for some scale R, so
L = {b + u | , R} = {b + u | R}
2.2. LINES
= a + 1 u = b + 2 u
b = a + 1 u 2 u
1 , 2 R
= a + (1 2 )u
b = a + 3 u
(3 = (1 2 ) 3 R)
Finally, we get
L = {b + u | R}
= {a + 3 u + u | R}
= {a + (3 + )u | R}
= {a + u | R}
= L
L = {a + w | R}
u = a + 1 w
v
= a + 2 w
v u = (2 1 )w
Therefore, lines L and L are parallel. As they also have a common point, they are (by
proposition 1) identical.
L2 = {(4, 0) + (2, 1) | R}
= (0, 1) + 1 (1, 1)
= (4, 0) + 2 (2, 1)
1 = 4 + 2(5)
1 = 6
2.3. TRIANGLES
Therefore
x
2.3
Triangles
1
c
3
1
c
3
1
b
3
2
a=
3
2
b=
3
2
c=
3
1
(a + b + c)
3
1
(a + b + c)
3
1
(a + b + c)
3
Therefore, all the medians contain the point (sometimes called centroid) 13 (a + b + c).
2.4. DISTANCES
2.4
Distances
x12 + x22
2.5
(x1 y1 )2 + (x2 y2 )2
Dot product
Definition 2.7. For x , y R2 , dot product (scalar product) of x and y is a real number
x .y = x1 y1 + x2 y2
Example 2.2. x = (1, 2), y = (1, 0)
kx k =
dist(x , y ) =
x .y
Proposition 2.5.
12 + 22 =
22 + 22 = 2 2
= 1 + 0 = 1
(i) kx k2 + ky k2 kx y k2 = 2x .y
= 2x .y
(ii) From cosine rule
kx k2 + ky k2 ky x k2
= cos
2kx kky k
Using part (i), we get
2x .y
x .y
= kx kky k cos
2.6
Equation of a line
y2 u1 = y1 u2
y2
u2 (u1 , u2 )
if u2 6= 0.
= u = x a
= a + u L
Definition 2.8. For a line L = {a + u | R}, the vector n = (u2 , u1 ) (or any
scalar multiple of it) is called a normal to L.
The equation x .n = a.n is called the equation of L.
Proposition 2.7. The linear equation px1 + qx2 + r = 0 (1) is an equation of a line
with normal (p, q) and with direction (q, p).
Proof.
Suppose q 6= 0. Then the solution of (1)
r
p
x1 + x2 + = 0
q
q
Let x1 = , x2 =
r
q
p
q ,
so
p
r
(x1 , x2 ) =
,
q
q
p
r
+ 1,
=
0,
q
q
1
which is a line with direction vector 1, p
= q
(q, p). Normal is clearly
q
(p, q).
Then
(i) L1 , L2 are parallel iff (p1 , q1 ) = (p2 , q2 ) for some scalar
(ii) L1 , L2 are perpendicular iff (p1 , q1 ) (p2 , q2 ) = 0
Proof.
(i) By Proposition 2.7
L1 = {a + (q1 , p1 ) | R}
L2 = {b + (q2 , p2 ) | R}
These are parallel iff R such that (q2 , p2 ) = (q1 , p1 ), i.e. (p1 , q1 ) =
(p2 , q2 ).
(ii) excercise
2.7
Perpendicular distance
w
kw k
is a unit
10
Proof.
dist(p, L) = |kp ak cos |
kp akknk cos
=
knk
(p a).n
=
knk
2.8
(x1 y1 + x2 y2 )
x12 y12
+ 2x1 y1 x2 y2 +
x22 y22
0
2
(x1 y2 x2 y1 )
kx kky k
11
Proof.
kx + y k2 = (x + y )(x + y ) = x .x + y .y + 2x .y
= kx k2 + ky k2 + 2x .y
kx k2 + ky k2 + 2kx kky k
by Cauchy - Schwartz
(kx k + ky k)
Therefore kx + y k kx k + ky k.
12
13
Chapter 3
Linear inequalities
14
15
Chapter 4
Conics
In R2 , a linear equation px1 + qx2 + r = 0 defines a line. Now we define a curve in R2
by quadratic equation.
Example 4.1. Circle of center c, radius r . It contains all the points x such that
kx ck = r
kx ck2 = r 2
(x1 c1 )2 + (x2 c2 )2 = r 2
(2)
x12 x22
2 =1
a2
b
is a hyperbola
(4.1)
16
(3)
x2 = ax12 + b
(a 6= 0) is a parabola.
(4)
x12 x22
2 =0
a2
b
is a pair of lines.
(5)
x12
=1
a2
is a pair of lines.
17
(6)
x12
=0
a2
is a double line
(7)
x12 x22
+ 2 =0
a2
b
is a point
(8)
x12 x22
+ 2 = 1
a2
b
is the empty set (empty conic)
We call the conics (6), (7) and (8) degenerate conics. Well see how to reduce an
arbitrary conic to one of these basic examples.
18
4.1
Transforming conics
Aim start with an arbitrary conic in the form (4.1), do some geometrical chages to
coordinates so that the equation becomes one of our standard equations (1) (8).
Two kinds of changes are allowed.
4.1.1
Translation
y2 = x2 + 1
Now, we can easily see that the our conic is an ellipse.
Remark If (4.1) has no x1 x2 term (c = 0), then we can find a translation which
reduces the equation to one of the standard ones (examples (1) (6)).
4.1.2
19
Rotation
x2
b
y2
r
y1
x1
Now
y1 = r cos
y2 = r sin
and
x1 = r cos( + )
x2 = r sin( + )
Hence
x1 = r cos cos r sin sin
= y1 cos y2 sin
and
x2 = r sin cos + cos sin
= y2 cos + y1 sin
Summarizing change of coordinates when we do a rotation through angle is
x1 = y1 cos y2 sin
x2 = y1 sin + y2 cos
20
4.
x1 =
x2 =
1
(y1 y2 )
2
1
(y1 + y2 )
2
Example 4.4. What is the following conic (find the rotation and translation to change
coordinates and get standard equation)
x12 + x22 + 4x1 x2 = 1
(From the hat method) Lets rotate through
equation becomes
4.
1
1
1
(y1 y2 )2 + (y1 + y2 )2 + 4 (y1 y2 )(y1 + y2 ) = 1 3y12 y22 = 1
2
2
2
This is a hyperbola.
4.2
The Theory
(b a) sin 2 + c cos 2
21
c
ab
=
4
when a = b or
c
tan 2 =
ab
when a 6= b.
Step 2 Translation. After Step 1, equation becomes
a y12 + b y22 + d y1 + e y2 + f = 0
Now we complete the square to find a translation which changes equation to one
of the standard ones.
Weve proved:
Theorem 4.1. Every conic in the form (4.1) can be changed by rotation and translation
of the axes to one of the standard equations (1) (8). Thus every conic is either an
ellipse, hyperbola, parabola, or one of the degenerate conics.
Example 4.5. Reduce conic
tan 2 = 3
Therefore 2 = 3 , so =
6.
x1 = y1 cos y2 sin
1
3
=
y1 y2
2
2
x2 = y1 sin + y2 cos
1
3
y1 +
y2
=
2
2
So, the equation becomes
2
3y1 y2 + 2 3 14
3y1 y2 (y1 + 3y2 )
2 41
22
1
x1 x2 coordinates 2 ( 3 + 1), 21 (1 + 3)
c
ab
2 tan
1 tan2
4.3
C = x R2 | kx pk = e dist(p, L)
23
i.e
kx k = e |x1 s|
i.e
kx k2 = e 2 (x1 s)2
i.e
i.e
i.e
se 2
1e 2
y22
s 2e 2
=
1 e2
(1 e 2 )2
If e < 1, this is an ellipse. If e > 1, this is hyperbola.
y12 +
(4.2)
Definition 4.3. The conic has focus p, directric L, excentricity e from the previous
proof.
Example 4.7. Find e, p and L for the ellipse
x12
+ x22 = 1
2
This is the standard equation. We compare it with (4.2)
s 2e 2
y22
=
(4.3)
1 e2
(1 e 2 )2
2
se 2
se
From the y coordinate picture, the focus is 1e
2 , 0 , directrix is x1 = s + 1e 2 .
Compare equations
y12 +
y22
s 2e 2
=
1 e2
(1 e 2 )2
2
2
x1 + 2x2 = 2
y12 +
So,
So e =
1 ,
2
1
1 e2
s 2e 2
(1 e 2 )2
s = 1. So the excentricity is
1 ,
2
= 2
= 2
focus (1, 0) and the directrix is x1 = 2.
24
25
Chapter 5
26
1)
3x1 + 4x2 = 5
8x1 x2 = 2
is a system of 2 linear equations in x1 , x2 .
2)
x1 + x2 + x3 + x4 = 0
2x1 x2 + 5x4 = 2
x1 + x2 x4 = 3
is a system of 3 equations in x1 , x2 , x3 , x4 .
Definition 5.6. General system
a11 x1 + a12 x2 + + a1n xn
b1
b2
bm
where x1 , . . . , xn are unknowns and aij , bbi are constants. A solution to this system is
a vector (k1 , . . . , kn ) which satisfies all the equations.
Aim is to find the method to find all solutions of any system of the form from previous
definition.
Example 5.3. System
x1 + x1 = 1
2x1 + 3x2 = 5
Eliminate x1 take twice first, add to second
5x2 = 7
One solution (x1 , x2 ) =
7
( 2
5 , 5 ).
Example 5.4.
2x1 + x2 = 2
6x1 3x2 = 1
These are just two parallel (nonidentical) lines the system has no solution.
Example 5.5. System
x1 + x2 = 0
x2 x3 = 0
x1 x2 + 2x3 = 0
Notice (cleverly), that third equation is equal to first minus two times second. So any
solution of system of first and second equation will automatically satisfy third.
So general solution is
(x1 , x2 , x3 ) = (a, a, a)
for any a R. This system has infinitely many solutions. Soon we will see that every
system has either no solution, one solution, or unlimited number of solution.
5.1
27
5x2 11x2 = 23
(2) 4(1)
(3) 3(1)
This system has the same solutions as the original one as new equations are combinations of orignal ones, and vice versa.
Step 2 Eliminate x2 from the third equation using only second equation.
x1 + 2x2 + 3x3 = 9
3x2 6x3 = 12
x3 = 3
5
(3) (2)
3
Step 3 Solve!
By third, x3 = 3. By the second, 3x2 = 12 18, so x2 = 2. By the first, x1 = 4. So
the system has one solution (4, 2, 3).
For bigger systems, we need better notation. This is provided by matrices.
Definition 5.7. A matrix is a rectangular array of numbers. Eg
1 2 3
4 5 6
This is 2 3 matrix.
1
5
This is 3 1 matrix.
Call matrix m n if it has m rows, n collumns. We use matrices to encapsulate systems
of linear equations. System from previous example has the coefficients matrix
1 2
3
4 5
6
3 1 2
and augmented matrix
1 2
3 9
4 5
6 24
3 1 2 4
28
coeff matrix =
augmented matrix =
a11
am1
a11
am1
a12 . . .
...
am2 . . .
a12 . . .
...
am2 . . .
a1n
amn
a1n
b1
amn bm
1 2
3 9
1
2
4 5
6 24 0 3
3 1 2 4
0 5
1
2
0 3
0
0
3
9
6 12
11 23
3
9
6 12
1 3
Definition 5.8. Elementary row operations are the following operations on the rows
of an (augmented) matrix
1) Add a scalar multiple of one row to another
r1 ri + rj , R
2) Swap two rows
ri rj
3) Multiply any row by a nonzero scalar
ri ri , 6= 0
Doing these elementary row operations to an augmented matrix does not change the
solution of the system.
Idea of Gaussian elimination
We start with a hard system. Then we do a couple of row operations and get an
easy system. What makes it easy are zeros under the main diagonal.
Definition 5.9. An m n matrix is in echelon form if
(i) The first non-zero number in each row occurs to the right of the first non-zero
number in any higher row
(ii) All rows (0, 0, . . . , 0) appear at the bottom.
29
1
2
3
9
0 3 6 12
0
0 3 9
0 0 1
0 0 0
0 1 3
1 0 0
0 0 0
The point If a system has its augmented matrix in echelon form, the system is easy
to solve.
Example 5.8. Solve the system of equations with augmentated matrix
2 1 3 0
0
1 1 1
0
0 0 0
This system is
2x1 x2 + 3x3 = 0
x2 + x3 = 1
Solve from bottom up. Equation 3 tells us nothing. Let x3 = a (any a R. Then eq
2 implies that x2 is 1 a.
Equation 1 implies 2x1 = x2 3x2 , therefore x1 = 14a
2 .
1
(1
4a),
1 a, a). E.g when a = 0, we
Therefore the solutions
are
(x
,
x
,
x
)
=
(
1
2
3
2
get solution 21 , 1, 0 .
2 1 3 0
0
1 1 0
0
0 0 2
System thus is
2x1 x2 + 3x3 = 0
x2 + x3 = 1
0 = 2
Third equation instantly implies no solution at all.
30
Example 5.10.
1 1 1 3
2 4 0
0 0 0 2 2 0 3
0 0 0 0
1 1 0
The system is
1
2a
b c, c, b, 12 (3 a), a, a)
for any a, b, c R.
In general, if augmentated matrix is in echelon form, solve the system by solving the
last equation, then the next last, and so on.
This method is called back substitution.
The variables we can put free equal to a, d, c etc are free variables. E.g. in previous
example, the free variables are x6 , x3 , x2 .
Theorem 5.1. (Gausian elimination theorem)
Any matrix can be reduced by elementary row operations to a matrix which is in echelon
form.
Method 5.1. (Gausian elimination method)
System of linear equations (augmented matrix). We put the augmented to echelon
form using elementary row operations. Solve the new system by back substitution.
Example 5.11. Solve the system with augmentation matrix
1
0 3
2 5 1
1
0 3
5 8 1
A=
1
1 4
5 7 0
1 1 2 1 3 3
Answer.
Step 1 clear first collumn using top left hand entry (i.e. equations 2, 3, 4 take
away equation 1)
1
0
3
2
5
1
0
0
0
0
3
3
A
0
1
1
3
2 1
0 1 1 3 2
1
1
0
3
2
5
1
0 1 1 3 2
1
0
1
1
3
2 1
0
0
0
3
3
0
Step 3 clear second collumn using the row 2
1
0
3
2
5 1
0 1 1 3 2 1
0
0
0
0
0 0
0
0
0
3
3 0
Step 4
31
1
0
3
2
5 1
0 1 1 3 2 1
0
0
0
3
3 0
0
0
0
0
0 0
Matrix Algebra
Definition 5.10. Matrix multiplication
Dot product in Rn
y1
x1
..
..
x =. , y =.
yn
xn
x .y = x1 y1 + + xn y n
It is convenient given a row vector z = (za , . . . , zn ) to also define z .y = z1 y1 + +zn yn .
Then one can define matrix multiplication by
a1
A = . . . , B = b1 . . . bn
an
c11 . . . c1p
...
AB = . . .
cm1 . . . cmp
where cij = ai bj
b1
..
Note. If A is 1 n (a1 . . . an ) = a, B is n 1 . = b, AB is a 1 1 matrix (a.b)
bn
32
1 2
0 1
, B=
3 4
1 2
2 5
AB =
4 11
3 4
BA =
5 6
1 2
0 1
1 2
, B=
, C=
3 4
1 2
3 0
2 5
AB =
(AB)C =
4 11
3
0
BC =
, A(BC) =
5 2
13 4
29 8
13 4
29 8
Proof. First, we do special case, when C is p 1 matrix, i.e. column vector. Let
A is m n, B is n p, x is p 1. We show that
(AB)x = A(Bx )
Let y = Bx be a vector and z = Ay . So z is the right hand side. Claim is
z = (AB)x .
y
=
B
x
(n 1)
(n p) (p 1)
x1
y1
b11 . . . b1p
.. ..
.. ..
y =.= .
. .
xp
yn
bn1 . . . bnp
33
y1
a1n
.. ..
. .
bmn
yn
Thus coefficient of xi in zi is
(ai1 bij + ai2 b2j + + ain bnj )
which is ai .bj , where
ai1
b1j
..
..
ai = . , bj = .
ain
bnj
..
..
.
.
cq
Write C = c1
Then
..
..
.
.
BC = Bc1 . . .
Bcq
Therefore
A(BC) = A(Bc1 ) . . .
A(Bcq )
34
Powers of matrices
Definition 5.11. A square matrix is one which is n n for some n.
If A is n n, define
A2
AA
(AA)A = A(AA)
A3 A
...
n
An1 A
A
Example 5.14.
1 2
0 1
2
1 2
1 2
1 4
=
0 2
0 2
0 1
n n In
1
=
0
0
=
0
1
0
=
0
0
0
1
0 0
1 0
0 1
0 ...
1 ...
.
0 ..
0
AIn = A
In B = B
Link between addition and multiplication
Proposition 5.5.
(i) If A is m n and B, C are n p, then
A(B + C) = AB + AC
(ii) If D, E are m n and F is n p, then
(D + E)F = DF + EF
Proof.
(i) Let A = (aij ), B = (bij ), C = (cij ). The ij-entry of AB is
bij
..
(aj1 . . . ain ) . = ai1 bij + + ain bnj
bnj
35
So ij-entry of A(B + C) is
ai1 (b1j + c1j ) + + ain (bnj + cnj )
=
36
37
Chapter 6
Linear equations
Proof. Suppose the number of solutions is not 0 or 1, i.e. there are at least two
solutions. We prove that this implies that there are infinitely many solutions.
Let p and q be two different solutions (p, q Rn ), so
Ap = b
Aq = b
and p 6= q. Then
A(p q) = Ap Aq = 0
For any scalar R
A(p q) = A(p q) = 0
So
A(p + (p q)) = Ap + A(p q) = Ap + 0 = b
So p + (p q) is a solution of the original system.
Since p 6= q, p q 6= 0 and so each different scalar gives a different solution. So
there are solutions.
38
Structure of solutions
Proposition 6.2.
(i) System Ax = 0 either has one solution (which must be x = O) or it has an
infinite number of solutions.
(ii) Suppose p is a solution of a system Ax = b (i.e. p Rn , Ap = b). Then all
solutions of Ax = b take the form
p+h
where h is a solution of the system Ax = 0.
x
1 0 3 1
2
x2 =
. The general solution is
0 1 1
1
x3
x = (2 3a, 1 a, a)
Particular solution p = (2, 1, 0). So general solution is
(2 3a, 1 a, a) = (2, 1, 0) + (3a, a, a) = p + h
1 0 3
0
Where h = (3a, a, a) is the general solution of
x=
.
0 1 1
0
Proof.
(i) clear from previous proposition
(ii) Let q be a solution of A. So Ap = b, Aq = b. So A(q p) = 0.
Put q p = h, a solution to Ax = 0. Then q = p + h.
6.2
Population Distribution
M 25%P, 10%R
R 5%P, 30%M
39
This is called the transition matrix. All entries are 0, and column sums are 1.
Say we start with proportions p1 , p2 , p3 in states 1, 2, 3.
p1
p (0) = p2
p3
is the initial population vector.
After 1 generation
proportion in state 1
proportion in state 2
proportion in state 3
40
Basic Fact
m (0)
In a regular Markov chain,
asn grows, the vector T p gets closer and closer to a
s1
s2
steady state vector s = .. where
.
sn
1) s1 + + sn = 1
2) T s = s
This is true, whatever the initial population vector p (0) . Proof is not hard.
Example 6.4. On a desert island, a veg-prone community dies according to
(1) no-one eats meat 2 days in a row
(2) if someone doesnt eat meat one day, they toss a coin: heads eat meat next day,
tails dont
What proportion can be expected to eat meat on a given day?
Answer Markov chain.
State 1: meat
State 2: no meat
generation: 1 day
Transition matrix
T =
Notice
T2
vector s =
So
=
1
2
1
2
1
4
3
4
0
1
1
2
1
2
s1
, where s1 + s2 = 1 and T s = s.
s2
1
s2 = s1
2
1
s1 + s2 = s2
2
s1 + s2 = 1
So in long run,
1
3
6.3
6.3.1
41
= x1 cos x2 sin
y2 = r sin( + )
cos sin
y1
x1
=
y2
sin cos
x2
cos sin
Call R =
, a rotation matrix.
sin cos
6.3.2
Reflection
x=
x2
x2
0 1
x2
1
0
So matrix S =
represents the reflection s.
0 1
6.3.3
Combining Transformations
r (r (x ))
R (R (x ))
=
(R R )x =
R+
cos sin
sin
cos
cos sin
sin
cos
Reflection+Rotation
Now consider sr , sending x s(r (x )). This sends
x
S(R x )
=
=
=
(SR )x
1
0
cos sin
x
0 1
sin cos
cos sin
x
sin cos
42
43
Chapter 7
Inverses
Definition 7.1. Let A be a square matrix (n n). Say another n n matrix B is an
inverse of A iff AB = BA = In .
Inverse of A is denoted A1 . If A has an inverse, A is invertible.
1 1
Example 7.1. A =
. Then
0 1
1 1
1 0
=
0
1
0 1
1 1
1 1
1 0
=
0
1
0 1
0 1
Example 7.2.
1 1
0 1
1 2
a b
a + 2c b + 2d
=
0 0
c d
0
0
7.1
44
Proof.
Ax
1
A1 b
(A1 A)x
A1 b
A1 b
(Ax )
By previous proposition
x=
7.2
1 1
2
x=
0 1
3
1 1
0
1
2
1
=
3
3
Finding inverses
2 2 matrices
Let A =
a b
. Observe
c d
a b
d b
ad bc
=
c d
c
a
0
0
ad bc
d
c
= (ad bc)I
1
=
ad bc
b
a
d b
). Assume A is invertible.
c a
A1 (AB) = A1 0 = 0
A1 (AB) = (A1 A)B = IB
Therefore IB = 0 and thus A = B = 0. But zero matrix is not invertible.
7.3
45
a1n 1 . . . 0
.. .. . .
.
. .. = (A|I)
. .
ann 0 . . . 1
a11 . . .
..
.
an1 . . .
Now use Gaussian elimination to reduce to Gaussian form. There are two possibilities
1) There is a row with zeros in the left side and non zero elements in the right
side. There is no inverse in this case.
2) We dont get into the first situation. Therefore we can put the left matrix into
Echelon form. Then, we can get rid of non-zero elements above the main diagonal
of the left matrix and get a matrix
(I|E)
So AE = I.
Start with (E|I) and reverse everythung, we end up with (I|A). So solving EX = I
gives X = A, completing proof that E = A1 .
Proposition 7.4.
1) If we can reduce (A|I) to (I|E) using elementary row operations, then E = A1 .
2) If we can reduce (A|I) to matrix with zeros in the left side of the last line and a
non-zero element in the right side of the last line, then A is not invertible.
1 3 2
2 5 3
3 2 4
46
Augmented matrix is
1 3 2 1 0 0
2 5 3 0 1 0
3 2 4 0 0 1
1 0 0
1
3 2
0 1
1 2 1 0
3 0 1
0 11 10
1 0 0
1
3 2
0 1
1 2 1 0
0
0
1 19 11 1
1
0 0
1 3 2
0 1 1
2 11 0
11 1
0 0
1 19
1 3 0 37 22 2
0 1 0 17 10 1
0 0 1 19 11 1
14 8 1
1 0 0
0 1 0 17 10
1
1
0 0 1 19 11
Thus the inverse
14 8 1
17 10
1
19 11
1
47
Chapter 8
Determinants
Recall that matrix
a b
c d
is invertible iff ad bc 6= 0.
a b
c d
or |A|.
Example 8.1.
Recall
1 2
3 4 = 2
cos sin
=1
|R | =
sin cos
48
8.1. PROPERTIES
Example 8.2.
1 2 3
4 5 6 = 1 5 6 2 4 6 + 3 4 5
1 1
1 2
1 2
1 1 2
= 3
Example 8.3.
8.1
a x y
0 b z = abc
0 0 c
Properties
1 2 3
5
6
A = 4 5 6 , A11 =
1 2
1 1 2
a1 a2 a3
A = a1 a2 a3
c1 c2 c3
8.2
49
r1
Proposition 8.4. Let A = r2 be 3 3.
r3
a1 a2 a3
a1
a2
a3
A = b1 b2 b3 A = b1 + a1 b2 + a2 b3 + a3
c1 c2 c3
c1
c2
c3
Expand by the second row
a
|A | = (b1 + a1 ) 2
c2
a1 a2
= |A| + a1 a2
c1 c2
= |A|
a1 a2
a1 a3
a3
(b3 + a3 )
+ (b2 + a2 )
c1 c2
c1 c3
c3
a3
a3
c3
Example 8.5.
1 2 1
1
2
2 3
= 0
4
7
5 9 4
0 1
7 2
=
1 1
= 9
1
2
1
+0+0
50
Example 8.6.
1 x
1 y
1 z
x 2
y 2 x 2
z 2 x 2
2
1 x
x
= (y x )(z x ) 0 1 y + x
0 1 z + x
1 x
x 2
= (y x )(z x ) 0 1 y + x
0 0 z y
= (y x )(z x )(z y )
1
x
x 2
2
y = 0 y x
0 z x
z 2
Proposition 8.5. Let A be 3 3 matrix, and let A be obtained from A by el. row.
ops. Then
|A| = 0 |A | = 0
Proof. Doing a row op. changes |A| to |A|, -|A| or |A| (where 6= 0).
Main result
Theorem 8.6. Let A be 3 3 matrix. Then
|A| 6= 0 A is invertible
(or the system Ax = 0 has unique solution, or A I3 by row ops.)
Proof.
Suppose |A| 6= 0. Reduce A to echelon form A by row
operations.
By 8.5,
1
|A | =
6 0. If A has a zero row, |A| = 0. Hence A = 0 1 so can be
0 0 1
reduced to I. So A is invertible.
Suppose A is invertible. A can be reduced to I by row ops. Since |I| = 1, so
|A| =
6 0.
1 2 5
A = 1 3 7
1 4 a
1 2
5
2 = a 9
|A| = 0 1
0 2 a 5
8.3. N N DETERMINANTS
51
Important consequence
Corollary 8.7. Let A be 3 3 matrix. Suppose the system Ax = 0 has a non-zero
solution x 6= O. Then |A| = 0.
1 2 5
Example 8.8. Let A = 1 3 7. System Ax = 0 has augmented matrix
1 4 a
1 2 5 0
1 2
5
1 3 7 0 0 1
2
1 4 a 0
0 2 a5
1 2
5
0
1
2
0 0 a9
0
0
0
0
0
0
8.3
n n determinants
It is possible to define det(A) for any n n matrix A, and to prove that all the results
of this section are true for n n matrices. Wait for proofs until next year.
Definition 8.4. 4 4 determinant. If A = (aij ) is 4 4,
|A| = a11 |A11 | a12 |A12 | + a13 |A13 | a14 |A14 |
Similarly, define n n determinant in terms of (n 1) (n 1) determinants (recursive
definition).
Example 8.9.
1
2
1
0
2
1
0 1
3
1
0
1
4
5
2
3
0 1 5
1 1 5
= 1 0 2 2 2 0 2
1 1 3
0 1 3
+ 3 + ...
52
8.3. N N DETERMINANTS
53
Chapter 9
9.1
Eigenvectors
v1
..
Definition 9.1. Let A be a n n matrix. Vector v = . R is an eigenvector of
vn
A if
(1) v 6= 0
(2) Av = v ( R)
The scalar is an eigenvalue of A.
Example 9.1.
1
1
= 1
2
2
1
3 2
So
is an eigenvector of A =
and 1 is its eigenvalue.
2
2 0
3 2
2 0
1
2
54
Example 9.2.
3 2
2 0
1
1
5
2
6=
1
1
1
3 2
So
is not an eigenvector of
.
1
2 0
9.2
3 2
2 0
x
x1
= 1
x2
x2
We can get
(3 )x1 + 2x2 = 0
2x1 x2 = 0
So the equation is
3 2
=0
2
2 3 4 = 0
So eigenvectors are
a
2a
= 0
= 0
(a R, a 6= 0)
A + Ix
4 2
x
2 1
1
2
2 4
x =0
2b
(b R,b 6= 0).
b
(A I)x
Precisely when |A I| = 0 (by 8.6).
= 0
= 0
55
Proposition 9.1.
(1) If A is a 33 or 22, then the eigenvalues of A are the solutions of |AI| = 0.
(2) If is an eigenvalue, then the corresponding eigenvectors are the non-zero solutions of
(A I)x = 0
Definition 9.2. The equation |A I| = 0 is the characteristic equation of A, and
|A I| is the characteristic polynomial of A.
9.2.1
Back to Fibonacci
We had
Fn+1
Fn
= An
1
1 1
where A =
.
0
1 0
Strategy
(1) Find eigenvalues 1 , 2 and eigenvectors v1 and v2 of A. Observe
Av1 = 1 v1
Av2 = 2 v2
Then
A2 v1 = A(Av1 )
= A(1 v1 )
= 1 Av1
= 21 v1
Similarly
An v1 = n1 v1
An v2 = n2 v2
1
(2) Express
as a combination of v1 and v2 .
0
1
= v1 + v2 (, R)
0
Then
1
A
= An (v1 + v2 )
0
= An v1 + An v2
1
An
= n1 v1 + n2 v2
0
n
(9.1)
56
9.3. DIAGONALIZATION
Calculations
(1) Characteristic equation is |A I| = 0, i.e.
1 1
=0
1
i.e
2 1 = 0
1
1 =
(1 + 5)
2
1
2 =
(1 5)
2
Eigenvectors for 1
So v1 =
1
1
1 1
x =0
1
is an eigenvector.
2
Similarily v2 =
.
1
(2) We now find and such that
1
1
2
=
+
0
1
1
1
=
1 2
1
=
2 1
Putting all this into (9.1)
Fn+1
Fn
1
= A
0
n
= 1 v1 + n2 v2
n 1
n 2
1
1
1
1
=
1 5
1 5
1
1
5 2
5 2
n
To get formula
1
Fn =
5
9.3
n
n !
1+ 5
1 5
2
2
Diagonalization
1
9.3. DIAGONALIZATION
57
1
O
..
D =
.
O
n
Example 9.4.
1 0
0 2
D =
Then
and
E =
1
..
O
1
O
1 1
DE =
O
Dk =
k1
..
.
n
O
..
.
n n
O
..
kn
Aim - To relate an arbitrary square matrix A to a diagonal matrix, and exploit this to
find An , etc.
22
Let A be 2 2 and suppose A has eigenvalues 1 , 2 with eigenvectors v1 , v2 . Assume
1 6= 2 . We get
Av1 = 1 v1
Av2 = 2 v2
Cleverly define 2 2 matrix P (v1 , v2 are collumn vectors)
P = v1 v2
58
9.3. DIAGONALIZATION
Then
= A(v1 v2 )
AP
Av1 Av2
1 v 1 2 v 2
1 0
v1 v2
0 2
So if we write D =
1 0
, weve shown
0 2
AP
= PD
(9.2)
AP = D =
1 0
0 2
9.3. DIAGONALIZATION
59
1) Characteristic equation of A is
1
|A I| =
2 3
i. e.
=0
2 3 + 2 = 0
( 1)( 2) = 0
So eigenvectors are
1
=1 a
, (a 6= 0).
1
1
=2 b
, (b 6= 0)
2
1 1
Let P =
. Then by Proposition 9.3,
1 2
1 0
P AP = D =
0 2
2 1
1 1
Note that many other P s work, e. g.
. Or if Q =
, then
2 2
2 1
2 0
1
Q AQ =
0 1
1
1 0
0 2n
= D n = P 1 AP
n
1
1
= P
. . P 1 AP P 1 AP}
| AP P AP .{z
n
= P 1 An P
So
P 1 An P
= Dn
P P 1 An P P 1 = P D n P 1
An = P D n P 1
So
n
1 1
1 2
1 0
0 2n
2 1
1 1
1 2n
1 2n+1
2 1
1
1
60
9.3. DIAGONALIZATION
3 Find B such that B 5 = A.
Well, if
1
0
C=
0 21/5
Then C 5 = D. So
(P CP 1 )5 = P CP 1 . . . P CP 1
= P C 5 P 1
= P DP 1 = A
So take
!
1
0
1
1
2 1
1
B = P CP =
1
1 2
1 1
0 25
!
1
1
2 25 25 1
=
6
6
2 25 25 1
Note. Usually a matrix has many square roots, fifth roots, etc. Eg, I has infinitely
many.
Note. Similarly can calculate polynomial functions
p(A) = an An + an1 An1 + + a1 A + a0 I
Summary
If a square matrix A has distinct eigenvalues, then it can be diagonalized, i. e. there
exists an invertible P such that P 1 AP is diagonal.
9.3.1
Repeated eigenvalues
9.3. DIAGONALIZATION
61
Then
= PD
AP
Writing
A v1
P =
v2 =
v1 v2
v1 v2 D
1 v 1 2 v 2
0 1 0
0 0 0
1
, a 6= 0. Hence
0
P =
a b
0 0
Point P must have evectors of A as collumns, but A does not have enough independent evectors to make invertible P .
1
0 0
2 0 . Then the characteristic polynomial is
Example 9.7. Let A = 1
1 1 1
1
0
0
1 2
0
1
1 1
= (1 )2 (2 )
So 1 is a repeated evalue.
Can A be diagonalized?
Lets try.
Evectors for = 2
0
eigenvectors a 1 , a 6= 0.
1
For = 1
1
0
0 0
1
0
0 0
1 1 1 0
0
0 0 0
1
1 0 0
1 1 0 0
62
9.3. DIAGONALIZATION
eigenvectors b .
c
So for collumns of P choose eigenvectors.
0
1
0
1 , 1 , 0
1
0
1
So take
0 1 0
P = 1 1 0
1 0 1
2 0 0
P 1 AP = 0 1 0
0 0 1
Summary If A has enough independent vectors for the repeated eigenvalue, A can be
diagonalized. If not, it cant.
63
Chapter 10
ax1 +
b
2 x2
x
where x = 1 , x T = x1
x2
b
2 x1
x1
= ax12 + bx1 x2 + cx22
+ cx2
x2
x T Ax + d e x + f = 0
a b2
x2 , A = b
2 c
Digression Transposes
Definition 10.1. If A = (aij ) is mn, the transpose of A is the mn matrix AT = (aji ).
1 2
1 3 5
Example 10.1. A = 3 4, AT =
2 4 6
5 6
x
x = 1 , x T = x1 x2
x2
Note.
(AT )T
x .y
= A
=
x1
y1
x2
= xT y
y2
64
Proof. The ij-th entry of (AB)T is the ji-th entry of AB, which is the j-th row of A
multiplied by i-th column of B. And ij-th entry of B T AT is i-th row of B T multiplied
by j-th collumn of AT , i.e. i-th column of B multiplied by j-th row of A. These are
equal.
Back to conics
We formulatied the equation of a conic as
x T Ax + d
b
2 .
c
x1
a
where x =
,A= b
x2
2
Notice
xT
1 0
0 2
e x +f =0
(10.1)
= 1 x12 + 2 x22
y
So, aim is to find a rotation matrix P , such that the change of coordinates to y = 1 ,
y2
where x = P y changes the equation (10.1) to
(P y )T A(P y ) + d e P y + f = 0
y T P T AP y + d e y + f = 0
and P T AP is diagonal.
We can do this.
a
b
2
b
2
Proof.
1) Characteristic polynomial of A is
b
a
b2
2 = 2 (a + c) + ac
b
c
4
2
Roots are
1
p
p
1
a + c (a + c)2 4(ac + b2 ) =
a + c (a c)2 + b2
2
2
65
Since b 6= 0, (a c)2 + b2 > 0, so the roots are real and distinct. Call them 1
and 2 .
2) Let
Av1 = 1 v1
Av2 = 2 v2
Consider
v1T Av2
(a) This is v1T (2 v2 ) = 2 v1T v2 .
(b) It is also (because A is simetric, i.e. A = AT )
(AT v1 )T v2 = (Av1 )T v2 = 1 v1T v2
So
2 v1T v2 = 1 v1T v2
As 1 6= 2 , this forces v1T v2 = 0, i.e. v1 .v2 = 0.
3) Choose unit v1 , v2 (see picture). Then
v1 =
v2 =
cos
sin
sin
cos
So
P
v1 v2
cos sin
=
sin
cos
= R
Finally, by 9.3 ,
T
P AP = P
AP =
1 0
0 2
10.1
Reduction of conics
66
i.e.
y
i.e.
y1 0
y + d e y + f = 0
0 y2
1 y12 + 2 y22 + d y1 + e y2 + f = 0
This is an ellipse if 1 2 > 0, hyperbola if 1 2 < 0, parabola if 1 2 = 0 (or
possible degenerate cases).
Example 10.3. Reduce conic
5x12 + 4x1 x2 + 2x22 = 1
to standard form. This is
5 2
x
x
2 2
T
= 1
1) Characteristic polynomial
5
2
= 2 7 + 6 = ( 1)( + 6)
2
2
1
For = 1, eigenvectors are a
.
2
2
For = 6, eigenvectors are b
.
1
2) Unit vectors are
15
Take
1
2
1
, 5
.
1
1
1
1 2
P =
5 2 1
cos sin
Then |P | = 1, and P = R =
, where cos =
sin cos
3) Let x = P y (i.e. x1 =
1 (y1 +2y2 ),
5
x2 =
y12 + 6y22 = 1
which is an ellipse.
1 ,
5
sin =
.
5
equation becomes
10.1.1
67
Orthogonal matrices
cos
sin
sin cos
= (P v )T (P v )
= vT PT Pv
= v T Iv
= kv k2
10.2
Quadric surfaces
Standard examples
1) Ellipsoid
x12 x22 x32
+ 2 + 2 =1
a2
b
c
2) Hyperboloid of 1 sheet
x12 x22 x32
+ 2 2 =1
a2
b
c
3) Hyperboloid of 2 sheets
x12 x22 x32
+ 2 2 = 1
a2
b
c
4) Elliptic cone
x12 x22 x32
+ 2 2 =0
a2
b
c
(10.2)
68
x12 x22
+ 2
a2
b
x3 =
x12 x22
2
a2
b
6) Hyperbolic parabloid
where
x T Ax + g h j x + k
x1
x2
x =
x3
a d2
A = 22 b
e
2
f
2
= 0
e
2
f
2
v1 v2 v3
has determinant 1.
Then, P is a rotation matrix, and P 1 = P T . Then
P 1 AP
=
P T AP
1 0 0
= 0 2 0
0 0 3
69
y1
i. e.
0 1 1
x T 1 0 0 x
1 0 0
= x2 + 1
2. Characteristic polynomial is
1
1
1 0 = (2 2)
1
0
We get equal to 0,
Eigenvectors.
2, 2.
0
0
For = 0 a 1 , unit eigenvectors 12 1
1
01
1
2
2
Let
0
1
P =
2
1
2
1
2
1
2
1
2
12
1
2
1
2
70
2y22
1
1
1
2y32 = y1 + y2 + y3 + 1
2
2
2
1
2(y2 )2 2(y3 )2 = (y1 )
2
This is a hyperbolic paraboloid.
10.3
10.4
Geometry of planes
Fact there is a unique plane through any 3 points in R3 provided thay arent colinear.
We want to describe planes in terms of vectors and equations.
A plane in R3 is specified by
1) a point A on the plane
2) a vector n normal to the plane
Then x (x a).n = n x .n = a.n.
Proposition 10.5. If there are points A, B, C R3 that are not collinear, there exists
a unique plane through A, B, C.
71
n.(c a) = 0
i.e.
r1 n1 + r2 n2 + r3 n3 = 0
s1 n1 + s2 n2 + s3 n3 = 0
where (r1 , r2 , r3 ) = a b, (s1 , s2 , s3 ) = c a.
We want to show that all solutions are {n | R}. Because A, B, C are not colinear,
r and s are not parallel.
How to find dist(P, )?
Find foot of perpendicular, Q and arbitrary A in the plane.
dist(P, Q) = ka pk cos
But
(a p).n = ka pkknk cos
(a p).n
dist(P, Q) =
knk
72