from IPython.display import *
var('a:z')
V=Matrix(2,1,[u,v])
A=Matrix(2,2,[1,1,1,0])
B=A*V
display(Math("A="),A)
N=5
mm=Poly((u+v)**N).monoms()
dd=len(mm)
xx=eye(dd)
X=[]
for i in range(dd):
F=x**mm[i][0]*y**mm[i][1]
GG=F.subs(x,B[0]).subs(y,B[1]);FF=expand(GG)
X.append([FF.coeff(u**mm[i][0]*v**mm[i][1]) for i in range(dd)])
#display(X)
MX=Matrix(1,dd,X[0])
for i in range(1,dd):
XM=Matrix(1,dd,X[i])
MX=MX.col_join(XM)
MX
The matrix with binomial coefficients is the symmetric tensor power of the Fibonacci matrix A.
IX=eye(A.shape[0])
delta=series(((IX-t*A).det())**(-1),t,0,10)
for i in range(10):
display(Math("F_{"+str(i+1)+ "} = "+str(delta.coeff(t,i))))
The Fibonacci numbers are the traces of the matrices formed from the binomial coefficients.
MXX=MX.eigenvals()
MXE=list(MXX.keys())
var('phi')
phi=GoldenRatio
[nsimplify(MXE[i],[GoldenRatio]) for i in range(len(MXE))]
[(phi**(N-i)*(-phi)**(-i)) for i in range(N+1)]
[nsimplify(phi**(N-i)*(-phi)**(-i),[GoldenRatio]) for i in range(N+1)]
The eigenvalues are the monomials $(\phi)^{N-i}(-\phi)^{-i}$ in the eigenvalues of A.
Res=series(trace((IX-t*A).inv()),t,0,10)
for i in range(10):
display(Math("L_{"+str(i)+ "} = "+str(Res.coeff(t,i))))
This is the beginning of the sequence of Lucas numbers. Traces of the powers of A.