Download as pdf or txt
Download as pdf or txt
You are on page 1of 91

Determinant and Diagonalization

Determinant and Diagonalization 1 / 76


Goals

Study about determinant of a matrix and diagonalization a square matrix


with application to linear recurrences
1 Compute determinant of a matrix

2 Properties of determinant

3 Use determinant to find inverse of a matrix

4 Use determinant to solve system of linear equations: Cramer’s rule

5 Diagonalize a square matrix

6 Application to linear recurrences

Determinant and Diagonalization 2 / 76


Determinant

Table of contents

1 Determinant
Cofactor Expansion
Elementary operations
Adjugates and Inverse Matrix
Cramer’s rule

2 Diagonalization
Eigenvalues and Eigenvectors
Diagonalization

3 An Application to Linear Recurrences

4 Application in Linear Dynamical System

Determinant and Diagonalization 3 / 76


Determinant Cofactor Expansion

Determinant of a 2 × 2 matrix

Determinant of a square matrix is denoted by det A or det(A) or |A|.


For a 2 × 2 matrix
" #!
a b
det = ad − bc
c d

or
a b
= ad − bc
c d

Determinant and Diagonalization 4 / 76


Determinant Cofactor Expansion

Example

Let " #
1 2
A=
3 5
then det(A) = 1 ∗ 5 − 3 ∗ 5 = −10

Determinant and Diagonalization 5 / 76


Determinant Cofactor Expansion

In order to define the determinant of 3 × 3, 4 × 4 . . . matrix with inductive


method, we need some terminology

Definition (Co-factor)
Let A be a n × n matrix and

(i, j)− minor Aij : matrix obtained from A by deleting row i and column j

Then the (i, j) - cofactor cij (A) is the scale defined by

cij (A) = (−1)i+j det(Aij )

(−1)i+j is called the sign of (i, j) - position

Determinant and Diagonalization 6 / 76


Determinant Cofactor Expansion

Matrix for sign of position

 
+ − + − ...
− + − + . . .
 
+ − + − . . .
 
− −
 
+ + . . .
.. .. .. .. ..
 
. . . . .
The signs alternate along each row and column with + in the upper left
corner

Determinant and Diagonalization 7 / 76


Determinant Cofactor Expansion

Example
Find the cofactors of positions (1, 2), (3, 1), and (2, 3) in the following
matrix.  
3 −1 6
A = 5 2 7
 
8 9 4

Determinant and Diagonalization 8 / 76


Determinant Cofactor Expansion

Example
Find the cofactors of positions (1, 2), (3, 1), and (2, 3) in the following
matrix.  
3 −1 6
A = 5 2 7
 
8 9 4

Solution
In order to compute c12 (A), first we delete row 1 and column 2 to get
" #
5 7
A12 =
8 4

The sign of position (1, 2) is (−1)1+2 . So the (1, 2) - cofactor

5 7
c12 (A) = (−1)1+2 = −(5 ∗ 4 − 7 ∗ 8) = 36
8 4

Determinant and Diagonalization 8 / 76


Determinant Cofactor Expansion

Determinant by Cofactor Expansion

Cofactor expansion along row i

ai1 ci1 (A) + ai2 ci2 )(A) + · · · + ain cin (A)

Cofactor expansion along column j

a1j c1j (A) + a2j c2j )(A) + · · · + anj cnj (A)

The cofactor expansion along any row or column of a matrix A


always gives the same result. This result is called the determinant of A
and denoted by det(A) or det A or |A|

Determinant and Diagonalization 9 / 76


Determinant Cofactor Expansion

Example
Compute the determinant of
 
3 4 5
A = 1 7 2 
 
9 8 −6

Solution
The cofactor expansion along the first row

Determinant and Diagonalization 10 / 76


Determinant Cofactor Expansion

Compute det A by expanding along the first column

Determinant and Diagonalization 11 / 76


Determinant Cofactor Expansion

Example
Compute determinant of
 
3 0 0 0
 5 1 2 0
A=
 
 2 6 0 −1

−6 3 1 0

Solution
The expansion involves multiplying entries by cofactors, so the work is
minimized when the row or column contains as many zero entries as
possible. Row 1 is a best choice in this matrix. The expansion is

Determinant and Diagonalization 12 / 76


Determinant Cofactor Expansion

Solution (cont)
Use expansion along the first row to compute the determinant of 3 × 3
matrix

Determinant and Diagonalization 13 / 76


Determinant Cofactor Expansion

Solution (cont)
Use expansion along the first row to compute the determinant of 3 × 3
matrix

It’d better to choose the column 3

Determinant and Diagonalization 13 / 76


Determinant Cofactor Expansion

Determinant of triangular matrices

Determinant of a triangular matrix is the product of the entries on


the main diagonal.

determinant = a11 a22 . . . ann

Determinant and Diagonalization 14 / 76


Determinant Cofactor Expansion

Theorem
" # " #
A X A 0
Consider matrices and where A and B are square
0 B Y B
matrices. Then
" # " #
A X A 0
det = det(A) det(B) and det = det(A) det(B)
0 B Y B

Proof.
Use induction on size k of matrix A and cofactor expansion along the first
column for upper triangular case and along last column for lower triangular
case.

Determinant and Diagonalization 15 / 76


Determinant Cofactor Expansion

Example
 
2 3 1 3 " # " #
1 −2 −1 1 2 3 1 1
det   = det det = (1)(−3) = −3
 
0 0 1 1 1 2 4 1
0 0 4 1

Determinant and Diagonalization 16 / 76


Determinant Cofactor Expansion

Geometric Meaning of Determinant

Area of parallelogram defined by two vectors is

Figure 1: Parallelogram Area of parallelogram =rectangle area − area of A − · · ·


defined by the two =(x1 + x2 )(y1 + y2 ) = x2 y1 − x1 y1 /2 = x1 y2 − x2 y1
vectors
x1 x2
=
y1 y2

determinant of the matrix’s columns (vectors)

Determinant and Diagonalization 17 / 76


Determinant Cofactor Expansion

Geometric Meaning of Determinant (cont)

(Oriented) volume of the parallelepiped P defined three vector v1 , v2 , v3


h i
vol(P ) = det( v1 v2 v3 )

Determinant and Diagonalization 18 / 76


Determinant Cofactor Expansion

Orientation - swapping changes the sign of the determinant

On the left, →−
u is the first column in the matrix and we get a positive size.
On the right, →−v is first and we get a negative size. On the left, the arc
from first vector to second is counterclockwise while on the right, the arc
from first to second is clockwise. The sign returned by the determinant
reflects the orientation or sense of the box.
Determinant and Diagonalization 19 / 76
Determinant Cofactor Expansion

Scaling effect

If we scale a column by a factor k then the size of the box scales by that
factor

Determinant and Diagonalization 20 / 76


Determinant Cofactor Expansion

Determinant is Unaffected by Combining Columns

The box formed by two vectors →


−v and k →

v +→

w is slanted at a different

− →

angle than the one form by v and w but two boxes have the same base
and height, and hence the same area

Determinant and Diagonalization 21 / 76


Determinant Elementary operations

Cut down the work to compute determinant

If A is a 4 × 4 matrix, the cofactor expansion along any row or


column involves calculating four cofactors, each of which involves the
determinant of a 3 × 3 matrix. And if A is 5 × 5, the expansion
involves five determinants of 4 × 4 matrices

Determinant and Diagonalization 22 / 76


Determinant Elementary operations

Cut down the work to compute determinant

If A is a 4 × 4 matrix, the cofactor expansion along any row or


column involves calculating four cofactors, each of which involves the
determinant of a 3 × 3 matrix. And if A is 5 × 5, the expansion
involves five determinants of 4 × 4 matrices =⇒ tedious work

Determinant and Diagonalization 22 / 76


Determinant Elementary operations

Cut down the work to compute determinant

If A is a 4 × 4 matrix, the cofactor expansion along any row or


column involves calculating four cofactors, each of which involves the
determinant of a 3 × 3 matrix. And if A is 5 × 5, the expansion
involves five determinants of 4 × 4 matrices =⇒ tedious work
calculating a determinant is simplified a great deal when a row or
column consists mostly of zeros

Determinant and Diagonalization 22 / 76


Determinant Elementary operations

Cut down the work to compute determinant

If A is a 4 × 4 matrix, the cofactor expansion along any row or


column involves calculating four cofactors, each of which involves the
determinant of a 3 × 3 matrix. And if A is 5 × 5, the expansion
involves five determinants of 4 × 4 matrices =⇒ tedious work
calculating a determinant is simplified a great deal when a row or
column consists mostly of zeros
one method of creating zeros in a matrix is to apply elementary row
operations to it

Determinant and Diagonalization 22 / 76


Determinant Elementary operations

Properties of Determinant vs Elementary Operations


Let A be a square matrix
1 If A has a row or column of zeros, det A = 0.

expand along the this row/column


2 If two distinct rows (or columns) of A are interchanged, the

determinant of the resulting matrix is − det A.


Induction
3 If a row (or column) of A is multiplied by a constant u, the

determinant of the resulting matrix is u det A.


expand along this row
4 If two distinct rows (or columns) of A are identical, det A = 0.

use result in part 2


5 If a multiple of one row of A is added to a different row (or if a

multiple of a column is added to a different column), the determinant


of the resulting matrix is det A.
expand along this row (or column) and use the result in part 2

Determinant and Diagonalization 23 / 76


Determinant Elementary operations

Example

Determinant and Diagonalization 24 / 76


Determinant Elementary operations

Example
Evaluate the determinant of
 
1 −1 3
A = 1 0 −1
 
2 1 6

Solution
The matrix does have zero entries, so expansion along (say) the second
row would involve somewhat less work. However, a column operation can
be used to get a zero in position (2, 3) - namely, add column 1 to column
3. Because this does not change the value of the determinant, we obtain

1 −1 4
−1 4
det A = 1 0 0 = − = 12
1 8
2 1 8

Determinant and Diagonalization 25 / 76


Determinant Elementary operations

Example
a b c
If p q r = 6 , evaluate det A where
x y z
 
a+x b+y c+z
A =  3x 3y 3z 
 
−p −q −r

Solution
Take common factors out of rows 2 and 3

a+x b+y c+z


det A = 3(−1) x y z
p q r

Determinant and Diagonalization 26 / 76


Determinant Elementary operations

Solution (cont)
Subtract the second row from the first

a b c
det A = −3 x y z
p q r

Interchange the last two rows.

a b c
det A = 3 p q r = 3 ∗ 6 = 18
x y z

Determinant and Diagonalization 27 / 76


Determinant Elementary operations

Example
Let  
1 x x
A = x 1 x
 
x x 1
Find the values of x for which det A = 0
Solution

1 x x 1 x x
r2 −xr1 r3 −xr1
det A = 0 1 − x x − x2
2 = 0 1 − x x − x2
2

x x 1 0 x − x2 1 − x2
1 − x2 x − x2
=
x − x2 1 − x2

Determinant and Diagonalization 27 / 76


Determinant Elementary operations

Solution (cont)
Taking a common factor of (1 − x) from each row

(1 − x)(1 + x) x(1 − x) 1+x x


det A = = (1 − x)2
x(1 − x) (1 − x)(1 + x) x 1+x
= (1 − x)2 (2x + 1)

Hence det A = 0 means (1 − x)2 (2x + 1) = 0,that is x = 1 or x = − 12 .

Determinant and Diagonalization 28 / 76


Determinant Elementary operations

Exercise

Show that
 
1 a1 a21
det 1 a2 a22  = (a1 − a2 )(a2 − a3 )(a3 − a1 )
 
1 a3 a23

Determinant and Diagonalization 29 / 76


Determinant Elementary operations

Properties of Determinant

1 If A is a n × n matrix then det(uA) = un A


Take the common factor u out of each row and use property 3 in
element row operations
2 det(AB) = det(A) det(B)
3 det(A1 . . . Ak ) = det(A1 ) . . . det(Ak )
4 det(Ak ) = (det(A))k
5 If A is invertible then det(A−1 ) = det(A) 1

Determinant and Diagonalization 30 / 76


Determinant Elementary operations

Inversely if det(A) ̸= 0 then A is invertible


In fact, A can be carried to reduced row-echelon matrix R by sequence of
elementary matrices E1 , . . . , Ek . That is

R = Ek . . . E1 A.

Since det(E) ̸= 0 for all elementary matrix E and det(A) ̸= 0, we have

det(R) = det(E1 ) . . . det(Ek ) det(A) ̸= 0

It implies that the square matrix R of reduced row-echelon form has no


zero row and then R must be identity matrix. Hence A is invertible

Determinant and Diagonalization 31 / 76


Determinant Elementary operations

Example
 
1 0 −c
For which values of c does A = −1 3 1  have an inverse?
 
0 2c −4

Determinant and Diagonalization 32 / 76


Determinant Elementary operations

Example
 
1 0 −c
For which values of c does A = −1 3 1  have an inverse?
 
0 2c −4

Solution
Compute det(A) by first adding c times column 1 to column 3 and then
expanding along row 1.
   
1 0 c 1 0 0
det(A) = det −1 3 1  = det −1 3 1 − c
   
0 2c −4 0 2c −4
" #
3 1−c
= det = 2(c + 2)(c − 3)
2c −4

A is invertible if and only if det(A) ̸= 0. Hence c ̸= −2 and c ̸= 3


Determinant and Diagonalization 32 / 76
Determinant Elementary operations

Exercise

Show that if a product A1 . . . Ak is invertible then each matrix Ai is


invertible.

Determinant and Diagonalization 33 / 76


Determinant Elementary operations

Determinant of transpose

det(AT ) = det(A)

We can prove by induction with respect to the size of A


If n = 2 then
" # " #
a a a a
A = 11 12 and A = 11 21
T
a21 a22 a12 a22

thus det(A) = det(AT ) = a11 a22 − a12 a21


Suppose tht it holds for any n × n matrix A
We prove that it holds for any n + 1 × n + 1 matrix A. In fact,
expand along the first row of A and first column of AT with remark
that Aij = ATji are n × n matrix thus cij (A) = cji (AT ), we obtain
det(A) = det(AT )
Determinant and Diagonalization 34 / 76
Determinant Elementary operations

Example
If det(A) = 2 and det(B) = 5, calculate det(A3 B −1 AT B 2 ).

Solution

det(A3 B −1 AT B 2 ) =
|{z} det(A3 ) det(B −1 ) det(AT ) det(B 2 )
determinant of product

=
|{z} (det(A))3 det(B −1 ) det(AT )(det(B))2
determinant of power

=
|{z} (det(A))3 det(B −1 )det(A)(det(B))2
determinant of transpose
1
= (det(A))4 (det(B))2
|{z} det(B)
determinant of inverse
1
= 24 ∗ ∗ 52 = . . .
5

Determinant and Diagonalization 35 / 76


Determinant Elementary operations

Example

A square matrix is called orthogonal if A−1 = AT . What are the possible


values of det(A) if A is orthogonal?

Determinant and Diagonalization 36 / 76


Determinant Elementary operations

Example

A square matrix is called orthogonal if A−1 = AT . What are the possible


values of det(A) if A is orthogonal?

Solution
If A is orthogonal then AAT = I. Take determinants to obtain

det(I) = det(AAT )

So
1 = det(A) det(AT ) = det(A) det(A) = [det(A)]2
Hence det(A) = 1 or det(A) = −1.

Determinant and Diagonalization 36 / 76


Determinant Adjugates and Inverse Matrix

Definition (Adjugate matrix)


The adjugate of A, denoted adj(A), is the transpose of the cofactor matrix

adj(A) = [cij (A)]T

Theorem (Adjugate Formula)


If A is a square matrix then

A(adj(A)) = (adj(A))A = det(A)I

In particular if det(A) ̸= 0 then the inverse of A is given by


1
A−1 = adj(A)
det A

Determinant and Diagonalization 37 / 76


Determinant Adjugates and Inverse Matrix

Example

Compute the adjugate of


 
1 3 −2
A= 0 1 5
 
−2 −6 7

and A−1

Determinant and Diagonalization 38 / 76


Determinant Adjugates and Inverse Matrix

Solution
Compute the cofactor matrix

Determinant and Diagonalization 39 / 76


Determinant Adjugates and Inverse Matrix

The adjugate of A is the transpose of this cofactor matrix

Determinant and Diagonalization 40 / 76


Determinant Adjugates and Inverse Matrix

The determinant of A

1 3 −2
r3 +2r1
det(A) = 0 1 5 =3
0 0 3

The inverse of A
   
37 −9 17 111 −27 51
1
A−1 = adj(A) = 3 −10 3 −5 = −30 9 −15
   
det(A)
2 0 1 6 0 3

Determinant and Diagonalization 41 / 76


Determinant Adjugates and Inverse Matrix

Example
 
2 1 3
Find the (2, 3) - entry of A−1 if A = 5 −7 1 
 
3 0 −6

Solution
2 1 3 2 1 7
c3 +2c1 1 7
det(A) = 5 −7 1 = 5 −7 11 = 3 = 180
−7 11
3 0 −6 3 0 0
Since A−1 = det(A)
1
adj(A) = 1801
[cij (A)]T , the (2, 3) - entry of A−1 is the
1
(3, 2)- entry of 180 [cij (A)] and equals to
!
1 1 2 3 13
c32 (A) = − =
180 180 5 1 180

Determinant and Diagonalization 42 / 76


Determinant Adjugates and Inverse Matrix

Example
Let A be an n × n matrix, n ≥ 2. Show that det(adj(A)) = (det(A))n−1

Determinant and Diagonalization 43 / 76


Determinant Adjugates and Inverse Matrix

Example
Let A be an n × n matrix, n ≥ 2. Show that det(adj(A)) = (det(A))n−1

Solution
Denote d = det(A). From adjugate formula, we have

det(Aadj(A)) = det(dI) = dn det(I) = dn

Moreover

det(Aadj(A)) = det(A) det(adj(A)) = d × det(adj(A))

So
d × det(adj(A)) = dn
If d ̸= 0 then we have det(adj(A)) = (det(A))n−1 .
Inversely if d = 0 then from adjugat formula, Aadj(A) = 0. If
det(adj(A)) ̸= 0 then adj(A) is invertible and A = 0(adj(A)−1 ) = 0. It
implies that adj(A) = 0 which is impossible. Hence det(adj(A)) = 0 = d
Determinant and Diagonalization 43 / 76
Determinant Cramer’s rule

Come back to linear system with unique solution


Suppose that
Ax = b
is a system of linear equations of n variables x1 , . . . , xn with
A is a n × n matrix 
x1 b1
 x2   b2 
   
x=  ..  and b =  .. 
  
 .  .
xn bn
If det(A) ̸= 0 then the system solution has unique solution
1
x = A−1 b = (adj(A))b
det(A)
    
x1 c11 (A) c21 (A) . . . cnn (A) b1
 x2  c12 (A) c22 (A) . . . cn2 (A) 
  b2 
    
1 
that is 
 ..  = . .. .. ..   .
 .. .   .. 
   
 .  det(A)  . .
xn c1n c2n ... cnn bn
Determinant and Diagonalization 44 / 76
Determinant Cramer’s rule

So we have
1
x1 = [b1 c11 (A) + b2 c22 (A) + · · · + bn cn1 (A)]
det(A)

The quantity b1 c11 (A) + b2 c22 (A) + · · · + bn cn1 (A) occurring in the
formula looks like the cofactor expansion of the determinant of a matrix.
The cofactors involved are c11 (A), c21 (A), ..., cn1 (A), corresponding to the
first column of A. If A1 is obtained from A by replacing the first column
of A by b then expanding det(A1 ) by the first column gives

det(A1 ) = b1 c11 (A) + b2 c22 (A) + · · · + bn cn1 (A) = det(A)x1

Simular result for x2 , . . .

Determinant and Diagonalization 45 / 76


Determinant Cramer’s rule

Theorem (Cramer’s rule)


If A is invertible n × n matrix then the solution of the system

Ax = b

of n equations in n variables x1 , . . . , xn is given by

det(A1 ) det(A2 ) det(An )


x1 = , x2 = , . . . , xn =
det(A) det(A) det(A)

where, for each k, Ak is the matrix obtained from A by replacing column


k by b.

Determinant and Diagonalization 46 / 76


Determinant Cramer’s rule

Example
Find x1 given the following system of equations
5x1 + x2 − x3 = 4
9x1 + x2 − x3 = 1
x1 − x2 + 5x3 = 2

Solution

5 1 −1
det(A) = 9 1 −1 = −16
1 −1 5
4 1 −1
det(A1 ) = 1 1 −1 = 12
2 −1 5

det(A1 ) 12
Hence x1 = det(A) = −16 = − 34 by Cramer’s rule.
Determinant and Diagonalization 47 / 76
Diagonalization

Table of contents

1 Determinant
Cofactor Expansion
Elementary operations
Adjugates and Inverse Matrix
Cramer’s rule

2 Diagonalization
Eigenvalues and Eigenvectors
Diagonalization

3 An Application to Linear Recurrences

4 Application in Linear Dynamical System

Determinant and Diagonalization 48 / 76


Diagonalization

Motivation example
Consider the evolution of the population of a species of birds. Because the
number of males and females are nearly equal, we count only females. We
assume that each female remains a juvenile for one year and then becomes
an adult, and that only adults have offspring. We make three assumptions
about reproduction and survival rates:
1 The number of juvenile females hatched in any year is twice the

number of adult females alive the year before (we say the
reproduction rate is 2).
2 Half of the adult females in any year survive to the next year (the

adult survival rate is 12 ).


3 One quarter of the juvenile females in any year survive into adulthood

(the juvenile survival rate is 14 ) .


If there were 100 adult females and 40 juvenile females alive initially,
compute the population of females k years late

Determinant and Diagonalization 49 / 76


Diagonalization

ak and jk : the number of adult and juvenile females after k years


total female population is ak + jk .
Assumption 1 shows that jk+1 = 2ak
assumptions 2 and 3 show that ak+1 = 12 ak + 14 jk .
Hence
1 1
ak+1 = ak + jk
2 4
jk+1 = 2ak
" # " #
1 1
a
Write vk = k and A = 2 4 then
jk 0 0

vk+1 = Avk matrix recurrence


So v1 = Av0 , v2 = Av1 = A2 v0 , . . . . In general
vk = Ak v0
" #
100
with v0 =
40
Determinant and Diagonalization 50 / 76
Diagonalization

Direct computation of the powers Ak can be time-consuming → need


an indirect method
the power Dk of a diagonal matrix D are easy to compute
   
d11 0 . . . 0 dk11 0 . . . 0
 0 d22 . . . 0  0 dk22 . . . 0
   
 =⇒ D k =  .
 
 ..
D= .. .. ..  . .. .. .. 
 . . . .

  . . . .


0 0 ... dnn 0 0 ... dknn

Idea: first diagonalize the matrix A, that is find an invertible matrix P


such that
P AP −1 = D is a diagonal matrix
then compute Ak

A2 = (P AP −1 )(P AP −1 ) = P A2 P −1 ,
A3 = AA2 = (P AP −1 )(P A2 P −1 ) = P A3 P −1

Determinant and Diagonalization 51 / 76


Diagonalization

Theorem
If A = P DP −1 then Ak = P Dk P −1 for k = 1, 2, . . .

Determinant and Diagonalization 52 / 76


Diagonalization

Theorem
If A = P DP −1 then Ak = P Dk P −1 for k = 1, 2, . . .

Question: How to find an invertible matrix P ?

Determinant and Diagonalization 52 / 76


Diagonalization Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors

Definition
If A is an n × n matrix, a number λ is called an eigenvalue of A if
Ax = λx for some column x ̸= 0 in Rn .
In this case, x is called an eigenvector of A corresponding to the
eigenvalue λ , or a λ-eigenvector for short.

Example
" # " #
3 5 5
If A = and x = then Ax = 4x. So λ = 4 is an eigenvalue of
1 −1 1
A corresponding to the eigenvector x.

Determinant and Diagonalization 53 / 76


Diagonalization Eigenvalues and Eigenvectors

λ is an eigenvalue of matrix A if and only if Ax = λx for some x ̸= 0. This


is equivalent to the system
(λI − A)x = 0
has non trivial solution. This happens if and only if λI − A is not
invertible.

Determinant and Diagonalization 54 / 76


Diagonalization Eigenvalues and Eigenvectors

λ is an eigenvalue of matrix A if and only if Ax = λx for some x ̸= 0. This


is equivalent to the system
(λI − A)x = 0
has non trivial solution. This happens if and only if λI − A is not
invertible.
Definition (Characteristic Polynomial of a Matrix)
If A is an n × n matrix then the characteristic polynomial of A is

cA (x) = det(xI − A)

Theorem
Let A is an n × n matrix.
1 The eigenvalues λ of A are the roots of the characteristic polynomial
cA (x) of A.
2 The λ-eigenvectors x are the nonzero solutions to the homogeneous
system
(λI − A)x = 0
Determinant and Diagonalization 54 / 76
Diagonalization Eigenvalues and Eigenvectors

Example
" #
3 5
Find the characteristic polynomial of the matrix A = and then
1 −1
find all the eigenvalues and their eigenvectors.
Solution
" # " # " #
x 0 3 5 x−3 5
xI − A = − =
0 x 1 −1 1 x+1
" #
x−3 5
cA (x) = det = x2 − 2x − 8 = (x − 4)(x + 2)
1 x+1
The roots of cA (x) are λ1 = −2 and λ2 = 4 and these are the eigenvalues

Determinant and Diagonalization 55 / 76


Diagonalization Eigenvalues and Eigenvectors

Solution (cont)
Find the eigenvectors corresponding to λ1 = −2
We have " # " #
−2 − 3 −5 −5 −5
λ1 I − A = =
−1 −2 + 1 −1 −1
" # " #
−t −1
General solution to (λ1 − A)x = 0 are x = =t . So the
t 1
" #
−t
eigenvectors corresponding to λ1 = −2 is x = for t ̸= 0.
t
" # " #
5t 5
Similar, the eigenvectors corresponding to λ2 = 4 are x = =t for
t 1
t ̸= 0

Determinant and Diagonalization 56 / 76


Diagonalization Eigenvalues and Eigenvectors

A square matrix A has many eigenvectors associated with any given


eigenvalue λ. Any set of nonzero multiples of the basic solutions of
(λI − A)x = 0 will
" be# called a set of basic eigenvectors corresponding to
−1
λ. For example, is a basic eigenvector corresponding to λ1 = −2.
1

Determinant and Diagonalization 57 / 76


Diagonalization Eigenvalues and Eigenvectors

Example
Find the characteristic polynomial, eigenvalues, and basic eigenvectors for
 
2 0 0
A = 1 2 −1
 
1 3 −2

Solution
Characteristic polynomial
 
x−2 0 0
cA (x) = det  −1 x − 2 1  = (x − 2)(x − 1)(x + 1)
 
11 −3 x + 2

so the eigenvalues are λ1 = 2, λ2 = 1 and λ3 = −1.

Determinant and Diagonalization 58 / 76


Diagonalization Diagonalization

Solution (cont)
To find all the eigenvectors corresponding to λ1 = 2, compute
   
λ1 − 2 0 0 0 0 0
λ1 I − A =  −1 λ1 − 2 1  = −1 0 1
   
11 −3 λ1 + 2 11 −3 4

Solve (λ1 I − A)x


 = 0 by gaussian algorithm
 to obtain the general
1 1
solution x = t  1 . So we can use x1 = 1 as the basic eigenvector
   
11 1
coresponding to λ
 1 = 2.  
0 0
Similary x2 = 1 and x3 = 1 are the basic eigenvectors corresponding
   
1 3
to λ2 = 1 and λ3 = −1

Determinant and Diagonalization 59 / 76


Diagonalization Diagonalization

Diagonal matrix

An n × n matrix D is called a diagonal matrix if all its entries off the


main diagonal are zero
 
λ1 0 . . . 0
 0 λ2 . . . 0


 ..
D= .. . . .. 
 . . . . 

0 0 ... λn

Denote D = diag(λ1 , λ2 , . . . , λn )

Determinant and Diagonalization 59 / 76


Diagonalization Diagonalization

Diagonalizable Matrices

An n × n matrix A is called diagonalizable if there exists an invertible


matrix P such that
P −1 AP is diagonal form
The invertible matrix P is called a diagonalizing matrix for A

Determinant and Diagonalization 60 / 76


Diagonalization Diagonalization

h i
Denote x1 , x2 , . . . , xn the columns of P and write P = x1 x2 . . . xn
Then P −1 AP = D for some diagonal matrix D implied that

AP = P D

which is equivalent to
h i h i
Ax1 Ax2 . . . Axn = λ1 x1 λ2 x2 . . . λ n xn

So
Axk = λk xk
for all k = 1, 2, . . . , n.
In other words, P −1 AP = D holds if and only if the diagonal entries of
diagonal D are eigenvalues of A and the columns of the diagonalizing
matrix P are corresponding eigenvectors.

Determinant and Diagonalization 61 / 76


Diagonalization Diagonalization

Diagonalization Algorithm

To diagonalize an n × n matrix A:
Step 1 Find the distinct eigenvalues λ of A.
Step 2 Compute a set of basic eigenvectors corresponding to each of these
eigenvalues λ as basic solutions of the homogeneous system
(λI − A)x = 0.
Step 3 The matrix A is diagonalizable if and only if there are n basic
eigenvectors in all.
Step 4 If A is diagonalizable, the n × n matrix P with these basic
eigenvectors as its columns is a diagonalizing matrix for A, that is, P
is invertible and P −1 AP is diagonal.

Determinant and Diagonalization 62 / 76


Diagonalization Diagonalization

Example

Diagonalize the matrix  


2 0 0
A = 1 2 −1
 
1 3 −2

Determinant and Diagonalization 63 / 76


An Application to Linear Recurrences

Solution
The matrix A has three eigenvalues λ1=2, λ2 =   λ3 = −1with
1 and 
1 0 0
corresponding basis eigenvectors x1 = 1 , x2 = 1 and x3 = 1
     
1 1 3
The diagonalizing matrix
 
h i 1 0 0
P = x1 x2 x3 = 1 1 1
 
1 1 3

and    
λ1 0 0 2 0 0
−1
P AP = D =  0 λ2 0  = 0 1 0 
   
0 0 λ3 0 0 −1

Determinant and Diagonalization 64 / 76


An Application to Linear Recurrences

Table of contents

1 Determinant
Cofactor Expansion
Elementary operations
Adjugates and Inverse Matrix
Cramer’s rule

2 Diagonalization
Eigenvalues and Eigenvectors
Diagonalization

3 An Application to Linear Recurrences

4 Application in Linear Dynamical System

Determinant and Diagonalization 64 / 76


An Application to Linear Recurrences

Recurrece
It often happens that a problem can be solved by finding a sequence of
numbers x0 , x1 , x2 , ... where the first few are known, and subsequent
numbers are given in terms of earlier ones
Example
Fibonacci sequence

f0 = 1, f1 = 1, fn = fn−1 + fn−2 for n ≥ 2

Example
An urban planner wants to determine the number xk of ways that a row of
k parking spaces can be filled with cars and trucks if trucks take up two
spaces each. Find the first few values of xk .

Determinant and Diagonalization 65 / 76


An Application to Linear Recurrences

Recurrece
It often happens that a problem can be solved by finding a sequence of
numbers x0 , x1 , x2 , ... where the first few are known, and subsequent
numbers are given in terms of earlier ones
Example
Fibonacci sequence

f0 = 1, f1 = 1, fn = fn−1 + fn−2 for n ≥ 2

Example
An urban planner wants to determine the number xk of ways that a row of
k parking spaces can be filled with cars and trucks if trucks take up two
spaces each. Find the first few values of xk .
Solution
Some first few terms x0 = 1, x1 = 1, x2 = 2 and xk+1 = xk + xk+1 ∀k ≥ 0

Determinant and Diagonalization 65 / 76


An Application to Linear Recurrences

Question

How to find explicit formula for terms in a sequence given by a linear


recursive relation?

Determinant and Diagonalization 66 / 76


An Application to Linear Recurrences

Example
Suppose the number x0 , x1 . . . are given by the linear recursive relation
xk+2 = xk+1 + 6xk
with x0 = 1, x1 = 3.
Solution
The idea is to compute the sequence v0 , v1 . . . of columns instead of the
numbers x0 , x1 , . . . where
" #
xk
vk = for k ≥ 0.
xk+1
" #
1
We have v0 = and
1
" # " # " #" # " #
x xk+1 0 1 xk 0 1
vk+1 = k+1 = = = Avk with A =
xk+2 6xk + xk+1 6 1 xk+1 6 1
Determinant and Diagonalization 67 / 76
An Application to Linear Recurrences

Solution (cont)

It is easy to see that vk = Ak v0 . So we first diagonalize A and then


compute Ak to obtain the general formula for xk .

Determinant and Diagonalization 68 / 76


An Application to Linear Recurrences

Solution (cont)

It is easy to see that vk = Ak v0 . So we first diagonalize A and then


compute Ak to obtain the general formula for xk .
Diagonalize A √
The characteric polynomial is cA (x) = x2 − x − 1 with roots 1±2 5 so A
has two eigenvalues
√ √
1+ 5 1− 5
λ1 = , λ2 =
2 2
" # " #
1 1
The corresponding eigenvectors are x1 = , x2 = .
λ1 λ2
" #
h i 1 1
The diagonalizing matrix for A is P = x1 x2 = which is
λ1 λ2
invertible

Determinant and Diagonalization 68 / 76


An Application to Linear Recurrences

Solution (cont)
Find general formula of "xk #
λ1 0
We have P AP = D =
−1 So
0 λ2

Dk = (P −1 AP )(P −1 AP ) . . . P −1 AP = P −1 Ak P
It implies that
Ak = P D k P − 1
and then
 
" # λk+1
1 √ −λk+1
2
vk
= vk = Ak v0 = P Dk P − 1v0 = 5
 
 λk+2 −λ k+2 
vk+1 1 √ 2
5

Comparing top entries give an exact formula for xk


λk+1
1 √ − λk+1
2
xk =
5
Determinant and Diagonalization 69 / 76
An Application to Linear Recurrences

Exercise

Find an exact formula for the numbers in Fibonacci sequence.

Determinant and Diagonalization 70 / 76


Application in Linear Dynamical System

Table of contents

1 Determinant
Cofactor Expansion
Elementary operations
Adjugates and Inverse Matrix
Cramer’s rule

2 Diagonalization
Eigenvalues and Eigenvectors
Diagonalization

3 An Application to Linear Recurrences

4 Application in Linear Dynamical System

Determinant and Diagonalization 71 / 76


Application in Linear Dynamical System

Linear Dynamical System

If A is an n × n matrix, a sequence v0 , v1 , v2 , . . . is called a linear


dynamical system if v0 is specified and v1 , v2 , . . . are given by the matrix
recurrence
vk+1 = Avk
for each k ≥ 0.
We call A the migration matrix of the system

Determinant and Diagonalization 72 / 76


Application in Linear Dynamical System

Example - Evolution of the population


The bird population
" # was described by computing the female population
ak
profile vk = of the species where ak and jk represents the number of
jk
adults and juvenile females present k years after the initial values a0 = 100
and j0 = 40 were observed. The model assumes that these numbers are
related by the following equation

ak+1 = 0.5ak + 0.25jk


jk+1 = 2ak

We can write
" #
0.5 0.25
vk+1 = Avk where A=
2 0

We can now use our diagonalization techniques to determine the


population profile vk for all values of k in terms of the initial values.
Determinant and Diagonalization 73 / 76
Application in Linear Dynamical System

Diagonalize A
The chacteristic polynomial of A is

cA (x) = x2 − 0.5x − 0.5 = (x − 1)(x − 0.5)

so the eigenvalues are λ1 = 1, λ2 = 0.5. " #


0.5
Gaussian elimination gives corresponding basic eigenvectors and
1
" # " # " #
−0.25 1 −1
. For convenience, we use multiplies x1 = and x2 =
1 2 4
respectively. Hence a diagonalizing matrix
" #
1 −1
P =
2 4

and we obtain " #


−1 1 0
P AP = D =
0 −0.5

Determinant and Diagonalization 74 / 76


Application in Linear Dynamical System

Compute vk
Compute explicitly Ak for k ≥ 0
" #" # " #
k k −1 1 −1 1 0 1 4 1
A = PD P = k
2 4 0 (−0.5) 6 −2 4
" #
1 4 + 2(−0.5)k 1 − (−0.5)k
=
6 8 − 8(−0.5)k 2 + 4(−0.5)k
Hence we obtain
" # " #" #
ak 1 4 + 2(−0.5)k 1 − (−0.5)k 100
= v k = Ak v 0 =
jk 6 8 − 8(−0.5)k 2 + 4(−0.5)k 40
" #
1 440 + 160(−0.5)k
=
6 880 − 640(−0.5)k
Thus we obtain
1  1 
ak = 440 + 160(−0.5)k , jk = 880 − 640(−0.5)k
6 6
Determinant and Diagonalization 75 / 76
Application in Linear Dynamical System

Observe that

lim ak = lim 440 + 160(−0.5)k = 440


k→∞ k→∞

while
lim jk = lim 880 − 640(−0.5)k = 880
k→∞ k→∞

So in long term ak ≈ 440 while jk ≈ 880, that is the female population

stabilizes with approximately twice as many juveniles as adults.

Determinant and Diagonalization 76 / 76

You might also like