1111: Linear Algebra I Computing Fibonacci numbers Dr. Vladimir Dotsenko (Vlad) Lecture 22

advertisement
1111: Linear Algebra I
Dr. Vladimir Dotsenko (Vlad)
Lecture 22
Computing Fibonacci numbers
As we discussed previously, a matrix of a linear operator ϕ is diagonal in the system of coordinates given by
the basis e1 , e2 if and only if ϕ(e1 ) = a1 e1 , ϕ(e2 ) = a2 e2 , or, in general in dimension n, if ϕ(e1 ) = a1 e1 ,
. . . , ϕ(en ) = an en .
Suppose that v is a nonzero vector for which ϕ(v) = av for some scalar a. For whichever basis e1 , . . . , en
we may have, this means Aϕ,e ve = ave , or
(Aϕ,ve − aIn )ve = 0.
This means that the matrix A = Aϕ,ve − aIn is not invertible, and
that det(A)
= 0. Note that det(A) is a
a11 a12
polynomial expression in A of degree n. For example, for Aϕ,e =
, we have
a21 a22
det(A) = a2 − a(a11 + a22 ) + a11 a22 − a12 a21 = a2 − tr(Aϕ,e ) + det(Aϕ,e ),
the polynomial equation we obtained before in a different way.
Therefore,the vectors
that are reasonable candidates for a basis are obtained
of the systems
from solutions
√
x
0 1
1
, and the second one
of equations
x = 1±2 5 x. The first of them has the general solution 1+√5
1 1
2 x1
x1
1
has the general solution 1−√5
. Setting in each cases x1 = 1, we obtain two vectors e1 = 1+√5
2 x1
2
1√
and e2 = 1− 5 . The transition matrix from the basis of standard unit vectors s1 , s2 to this basis is,
2
1√
1√
manifestly, Ms,e = 1+ 5 1− 5 , so
2
2
M−1
s,e
√
1
√
= −
5
√
1− 5
2√
−1− 5
2
!
−1
,
1
√
Since Ae1 = ( 1+2 5 )e1 , and Ae2 = ( 1−2 5 )e2 , the matrix of the linear transformation ϕ relative to the basis
e1 , e2 is
!
√
1+ 5
0√
−1
2
Ms,e AMs,e =
.
1− 5
0
2
Therefore,
A = Ms,e
√
1+ 5
2
0√
1− 5
2
0
1
!
M−1
s,e ,
and hence
An =
√
1+ 5
2
Ms,e
0
M−1
s,e
√
1− 5
2
0
!n
!
= Ms,e
√
1+ 5
2
0
0

!n
√
1− 5
2

M−1
s,e = Ms,e
Substituting the above formulas for Ms,e and M−1
s,e , we see that

 √ n
1+ 5
0
1
1
1
2
n
√
√


√
√
A = 1+ 5 1− 5
−
n
1− 5
5
0
2
2
2
√ n
1+ 5
2
√
1− 5
2√
−1− 5
2
0
0

−1
√ n  Ms,e .
1− 5
2
!
−1
1
In fact, we have vn = An v0 , so
vn =
1+ 5
2
=
1√
1√
1+ 5
2
1√
1− 5
2
Recalling that vn =
√ n
1+ 5
2

1− 5
2
1√

0


fn
fn+1
√ n
1+ 5
2
0
! 1−√5
1
−1
0
2√
√ n  − √
=
−1− 5
1− 5
1
1
5
2
2


√ n 
! 1+ 5
√1
√1
0
1
1
5 2
5
√
√

√ n 
√ n  =
= 1+ 5 1− 5
1− 5
1− 5
− √15
√1
−
2
2
2
2
5

√ n √ n 
1+ 5
√1
− 1−2 5
2
5

√ n+1 
√
=
n+1

1
1+
5
√
− 1−2 5
2
5
0

, we observe that
1
fn = √
5
√ !n
1+ 5
−
2
√ !n !
1− 5
.
2
√ This formula is quite informative. For instance, we can remark that 1−2 5 < 1, so for large n the Fibonacci
√ n
number fn is the closest integer to √15 1+2 5 .
Next week, we shall discuss some further examples of applications of linear algebra.
2
Download