The resulting matrix is over CC, and contains the eigenvectors of
M. The lapack library is used to compute eigenvectors of real and complex matrices.
Recall that if
v is a non-zero vector such that
Mv = av, for a scalar a, then
v is called an eigenvector corresponding to the eigenvalue
a.
i1 : M = matrix{{1.0, 2.0}, {5.0, 7.0}}
o1 = | 1 2.000000 |
| 5.000000 7.000000 |
2 2
o1 : Matrix RR <--- RR
|
i2 : eigenvectors M
o2 = (| -0.358899 |, | -0.827138 -0.262266 |)
| 8.358899 | | 0.561999 -0.964996 |
o2 : Sequence
|
If the matrix is symmetric (over RR) or Hermitian (over CC), this information should be provided as an optional argument
Hermitian=>true. In this case, the resulting matrix of eigenvalues (and eigenvectors, if
M is over
RR) is defined over
RR, not
CC.
i3 : M = matrix{{1.0, 2.0}, {2.0, 1.0}}
o3 = | 1 2.000000 |
| 2.000000 1 |
2 2
o3 : Matrix RR <--- RR
|
i4 : eigenvectors(M, Hermitian=>true)
o4 = (| -1 |, | -0.707107 0.707107 |)
| 3.000000 | | 0.707107 0.707107 |
o4 : Sequence
|
If the matrix you wish to use is defined over
ZZ or
QQ, then first move it to
RR.
i5 : M = matrix(QQ,{{1,2/17},{2,1}})
o5 = | 1 2/17 |
| 2 1 |
2 2
o5 : Matrix QQ <--- QQ
|
i6 : M = substitute(M,RR)
o6 = | 1 0.117647 |
| 2.000000 1 |
2 2
o6 : Matrix RR <--- RR
|
i7 : eigenvectors M
o7 = (| 1.485071 |, | 0.235702 -0.235702 |)
| 0.514929 | | 0.971825 0.971825 |
o7 : Sequence
|