Professional Documents
Culture Documents
Santiago Oliveros
University of Bristol
Today we cover SB Ch 23.1-23.5
TB1 2023
1 / 50
Economic Dynamics
Difference Equations
and
Linear Algebra
2 / 50
Motivation: SIR model
3 / 50
Motivation: formal SIR(D) model
5 / 50
Diagonalization
6 / 50
Motivation: Solving SIR model
πt = π αt = α βt = β
it +1 = (1 − α − β + πc )it st +1 = st − πcit
7 / 50
Motivation: Solving SIR model
zt +1 = At +1 × z0
8 / 50
Difference Equations: definition
xt = f (xt −1 , xt −2 ...xt −T ; t )
9 / 50
Difference Equations: definition
10 / 50
Reducing the problem
Definition
A matrix A ∈ Rk ×k is diagonalizable if there is a non-singular
matrix P ∈ Rk ×k such that
P −1 × A × P = D
D 2 = [P −1 × A × P ] × [P −1 × A × P ] = [P −1 × A2 × P ]
D 3 = [P −1 × A2 × P ] × [P −1 × A × P ] = [P −1 × A3 × P ]
....
D t = [P −1 × At × P ] ⇒ At = [P × D t × P −1 ]
And
(r1 )t
0 0 ... 0
0 (r2 )t 0 ... 0
Dt =
....
... .... ... ...
0 0 0 ... (rk )t
12 / 50
Reducing the problem
zt +1 = At +1 × z0
13 / 50
Reducing the problem
14 / 50
Eigenvalues and Eigenvectors
15 / 50
Eigenvalues
Definition
r is an eigenvalue of the square matrix [A] if and only if the
matrix [A − rI ] is singular or det [A − rI ] = 0.
16 / 50
Examples
a1 a2
Consider a square matrix A = , then
a3 a4
a1 − r a2
det [A − rI ] = det = (a1 − r )(a4 − r ) − a2 a3
a3 a4 − r | {z }
characteristic polinomial
= a1 a4 − a2 a3 − ( a1 + a4 ) r + r 2
= det[A] − tr ([A])r + r 2
s 2
tr ([A]) tr ([A])
→r = ± − det([a])
2 2
→ r1 + r2 = tr ([A]) r1 r2 = det([A])
17 / 50
Eigenvectors
Definition
The non-zero vector v is an eigenvector of the eigenvalue r of
the square matrix [A] if and only if [A − rI ] × v = [0].
Note that
→ →
0 = [A − rI ] × ~v = [A] × v − r × [I ] × v
→ →
= [A] × v − r × v
→ →
→ [A] × v = r × v
19 / 50
Using the eigenvalues and eigenvectors
21 / 50
Using the eigenvalues and eigenvectors
zt +1 = [A] × zt
22 / 50
Using the eigenvalues and eigenvectors
r1 0 .... 0
0 r2 .... 0
Ẑt +1 0 0 .... 0 × Ẑt
=
0 0 .... rk
( r1 ) t + 1
0 .... 0
0 (r2 )t +1 .... 0 × Ẑ0
Ẑt +1 =
0 0 .... 0
0 0 .... (rk )t +1
(r1 )t +1 (z0 )1
(r2 )t +1 (z0 )2
Ẑt +1 =
....
t + 1
(rk ) (z0 )k
23 / 50
Using the eigenvalues and eigenvectors
(r1 )t +1 (z0 )1
(r2 )t +1 (z0 )2
[P ] × Ẑt +1 = [P ] ×
....
t + 1
(rk ) (z0 )k
(r1 )t +1 (z0 )1
(r2 )t +1 (z0 )2
zt + 1 = [~v1 ~v2 ....~vk ] ×
....
t + 1
(rk ) (z0 )k
k
zt + 1 = ∑ (rj )t +1 (z0 )j × ~vj
j =1
24 / 50
Using the eigenvalues and eigenvectors
25 / 50
Properties of Eigenvalues
kA − rI k = 0
26 / 50
Properties of Eigenvalues
27 / 50
Properties of Eigenvalues
Theorem
Let A ∈ Rk ×k be a matrix and r1 , ...rk its eigenvalues, then
The sum of the eigenvalues of A is equal to the trace of
A (the sum of all elements of the diagonal)
The product of the eigenvalues is equal to determinant of
A
28 / 50
Putting all together
r1 + r2 = 2 − α − β + πc and r1 × r2 = 1 − α − β + πc
29 / 50
Putting all together
r1 = 1 r2 = 1 − α
30 / 50
Putting all together
Recalling
0 d
P = ~v1 ~v2 =
c d
−1 −1 1 0
Zt = P zt and [P AP ] =
0 1−α
we get
−1 it +1 1 0 −1 it
P = ×P
st + 1 0 1−α st
31 / 50
Putting all together
It follows then
−1 it +1 1 0 −1 i0
P = ×P
st +1 0 (1 − α )t +1 s0
32 / 50
Putting all together
It follows then
st +1 − it +1 s0 − i0
=1
c c
it +1 i0
= ( 1 − α )t +1
d d
or after some algebra
st +1 = s0 − i0 1 − (1 − α)t +1
it +1 = (1 − α)t +1 i0
33 / 50
Some important caveats
34 / 50
Dealing with patologies: multiple equal roots
This is because,
r t tr t −1
−1 t
[P AP ] =
0 rt
35 / 50
Dealing with patologies: multiple equal roots
Recalling that
r 1
AP = P
0 r
r 1
A ~v1 ~v2 = ~v1 ~v2
0 r
A~v1 A~v2 = r~v1 ~v1 + r~v2
It follows then
36 / 50
Dealing with patologies: multiple equal roots
Theorem
Consider the generic matrix
a a
A = 11 12
a21 a22
tr (A) = 2 − α − β + πc |A| = (1 − α − β + πc )
The theorem then says that all roots are real and if
α + β ≤ 1 they are different.
Let’s forget about that and imagine that we actually have
complex roots.
40 / 50
Dealing with patologies: complex roots
[A] × ~v = r × [I ] × ~v
[A] × [~u + i w
~ ] = (A ± iB ) × [~u + i w
~]
The matrix P is also complex, but we know that
A + iB 0
[ P −1 A P ] =
0 A − iB
41 / 50
Dealing with patologies: complex roots
42 / 50
Dealing with patologies: complex roots
for
A
cos θ = √
A2 + B 2
43 / 50
Dealing with patologies: complex roots
44 / 50
Summary
45 / 50
Finally....a recipe I
tr (A) 2
If 2 = |A|
They are real and equal so
tr (A)
r=
2
We then calculate the eigenvectors A~v1 = r~v1 and
A~v2 = r~v2 + ~v1
The solution is then given by
tr (A) 2
If 2 < |A|
They are complex and different so
v
u tr (A) 2
u
tr (A)
rj = ± it − |A|
2 2
49 / 50
Some final comments
50 / 50