# eigenvector corresponding to largest eigenvalue

I have tried this code to find the eigenvector corresponding to eigenvalue 3.732050807568878. But it is not giving the result.

A = matrix( AA, 6,6, [2,1,0,0,1,0, 1,2,1,0,0,0, 0,1,2,1,0,0, 0,0,1,1,0,0, 1,0,0,0,2,1, 0,0,0,0,1,1] )

E = matrix.identity( A.nrows() )

n=A.eigenvalues()

n.sort()

print n

k=( A -3.732050807568878*E ).kernel().basis()

print k

The following works:

Just use the exact value of the eigenvalue as it lives in

`AA`

.