Sie sind auf Seite 1von 4

University of Leeds MATH0380

FOUNDATION APPLIED MATHEMATICS FOR BUSINESS


Handout: The Fibonacci series solved using matrices
1. The eigenvalues of a 2 × 2 matrix.
If we can find a vector v such that
Av = λv,
then the number λ is an eigenvalue of the matrix A.
For the 2 × 2 matrix  
a11 a12
A= ,
a21 a22
the eigenvalues of A are found from the condition
|A − λI2×2 | = 0.
Here is the calculation:
 
a11 − λ a12
= 0 (doing the matrix subtraction A − λI2×2 )
a21 a22 − λ
(a11 − λ)(a22 − λ) − a21 a12 = 0 (evaluating the determinant)
λ2 − (TrA)λ + |A| = 0 (multiplying out the terms).
In the last line, we used the notation
TrA = a11 + a22 (called the trace)
|A| = a11 a22 − a12 a21 (called the determinant).
The two eigenvalues of A are
1 1p
λ = TrA ± (TrA)2 − 4|A| .
2 2
We call these values λ1 and λ2 .
Notice that TrA = λ1 + λ2 (Trace = sum of eigenvalues)
|A| = λ1 λ2 (Determinant = product of eigenvalues).
Example
 
1 1
A= , TrA = 1 and |A| = −1 .
1 0
The eigenvalues satisfy
λ2 − λ − 1 = 0.
So the two eigenvalues, which we call λ1 and λ2 , are
√ √
1 5 1 5
λ1 = + and λ2 = − . (1)
2 2 2 2
     
1 1 λ1 λ2
The corresponding eigenvectors of the matrix A = are v1 = and v2 = .
1 0 1 1
You can check that
Av1 = λ1 v1 and Av2 = λ2 v2 .
We will use these eigenvalues and eigenvectors to find a formula for the Fibonacci series. First
we find a fast way to calculate powers of matrices.

1 Continued ...
University of Leeds MATH0380

2. Powers of a matrix.
There is a fast way to calculate the nth power of the matrix A, using two special matrices
S and Λ. The matrix Λ is a diagonal matrix containing the eigenvalues of A:
 
λ1 0
Λ= .
0 λ2

The matrix S is made by putting the two eigenvectors of A together to make a matrix:

S = v1 v2 .

Then
A = SΛS −1 . (2)
In the example we used on the previous page,
 
λ1 λ2
S= .
1 1

The inverse of the matrix S is:


 
−1 1 1 −λ2
S = .
λ 1 − λ2 −1 λ1

We see that (2) is useful when we calculate A2 :

A2 = SΛn S −1 SΛn S −1 (multiplying out)


= SΛI2×2 ΛS −1 (using S −1 S = I2×2 )
= SΛ2 S −1 . (using I2×2 Λ = Λ)

Since Λ is a diagonal matrix, it is easy to find Λ2 :


 2 
2 λ1 0
Λ = .
0 λ22

Let’s calculate A3 in the same way:

A3 = SΛ3 S −1 .

This is no more difficult, because


λ31 0
 
3
Λ = .
0 λ32
The same method works for n = 1, 2, 3, 4, . . .. Therefore

The nth power of the matrix A is An = SΛn S −1 . (3)

No matter how large n is, we only have to multiply three matrices to find An .

2 Continued ...
University of Leeds MATH0380

3. The Fibonacci sequence


The (n + 2)th member of the Fibonacci sequence is related to the two preceding it by

Fn+2 = Fn+1 + Fn . (4)

The first two members of the sequence are F0 = 0 and F1 = 1. (The first 40 members are at
the end of the handout.)
We define a column vector with two members of the series as its entries:
 
Fn+1
un = .
Fn

The rule (4) can be written as a matrix equation:


    
Fn+2 1 1 Fn+1
= .
Fn+1 1 0 Fn

Multiply this out and see what you get. In matrix notation, the rule for the Fibonacci series
is
un+1 = Aun .
Now we can start to calculate:
   
F1 1
u0 = =
F0 0
     

F2 1 1 1 1
u1 = = Au0 = =
F1 1 0 0 1
    
1 1 1 2
u2 = Au1 = A2 u0 = =
1 0 1 1
 
3
u3 = Au2 = A3 u0 =
2
 
5
u4 = Au3 = A4 u0 = .
3

The formula for general n is:


un = An u0 .
If we can find a fast way to calculate the nth power of the matrix A, we have a fast way
calculate Fibonacci numbers. We will use the formula (3). The matrix A is the one we used
in the example earlier and the eigenvalues λ1 and λ2 are given in (1). Now we can write a

3 Continued ...
University of Leeds MATH0380

formula for un :
   
Fn+1 1n
= A
Fn 0
 
1
= SΛn S −1
0
1
= SΛn
λ1 − λ2
 
n 1 1
= SΛ
λ1 − λ2 −1
 n 
1 λ1
= S
λ1 − λ2 −λn2
 n+1
λ1 − λn+1

1 2
= .
λ1 − λ2 λn1 − λn2
1 √
The lower entry of the equation is Fn = λ1 −λ2
(λn1 − λn2 ). (Note that λ1 − λ2 = 5.)
Conclusion: the nth member of the Fibonacci sequence can be calculated directly using
√  √  
1+ 5 n 1− 5 n
 
1
Fn = √ − .
5 2 2
 √ n  √ n  √ n
1+ 5 1− 5 1− 5
Notice that is much larger than
2 2 for large values of n. In fact, 2
is always between −1 and 1.
Here are the first 40 members of the Fibonacci series. Check some of these using the formula.

0 0 20 6765
1 1 21 10946
2 1 22 17711
3 2 23 28657
4 3 24 46368
5 5 25 75025
6 8 26 121393
7 13 27 196418
8 21 28 317811
9 34 29 514229
10 55 30 832040
11 89 31 1346269
12 144 32 2178309
13 233 33 3524578
14 377 34 5702887
15 610 35 9227465
16 987 36 14930352
17 1597 37 24157817
18 2584 38 39088169
19 4181 39 63245986

END

4 Continued ...

Das könnte Ihnen auch gefallen