Eigenvals
eigenvalues/vectors of a numeric matrix
Calling Sequence
Parameters
Description
Examples
Eigenvals(A, vecs)
Eigenvals(A, B, vecs)
A, B
-
square matrices of real or complex numbers
vecs
(optional) name to be assigned the matrix of eigenvectors
Important: The command Eigenvals has been deprecated. Use the superseding commands LinearAlgebra[Eigenvalues] and LinearAlgebra[Eigenvectors] instead.
Eigenvals(A) returns an array of the eigenvalues of A. The eigenvalues are computed by the QR method. The matrix is first balanced and transformed into upper Hessenberg form. Then the eigenvalues (eigenvectors) are computed.
If an optional parameter vecs (which must be an unassigned name) is supplied, the eigenvectors are returned in an n by n array assigned to the name vecs, such that the ith column is the ith eigenvector corresponding to the ith eigenvalue.
If the ith eigenvalue is complex and the (i+1)th eigenvalue is its complex conjugate, then the ith and (i+1)th columns in the eigenvector array contain the real and imaginary parts of the eigenvector corresponding to the ith eigenvalue. In this case, the real and imaginary components of the eigenvector corresponding to the (i+1)th eigenvalue are comprised respectively of the ith column and the negation of the (i+1)th column of the eigenvector array.
Note that in the two argument form, vecs must be unassigned, otherwise it will taken to be the input for the generalized problem of the three argument form (i.e., the argument B in the second calling sequence above). For multiple calls using the same name for vecs, enclose the name in single quotes.
If the matrix is symmetric then the routine will handle the matrix specially (using a faster algorithm).
This routine also handles the generalized eigenvalue problem: find eigenvalues and eigenvectors L and X such that AX=LBX where A and B are square matrices of the same dimensions.
The function Eigenvals itself is inert. To actually compute the eigenvalues and eigenvectors, the user must evaluate the inert function in the floating point domain, by evalf(Eigenvals(A)).
A≔array⁡1,2,4,3,7,2,5,6,9
A≔124372569
B≔array⁡1,2,3,1,2,3,2,5,6
B≔123123256
evalf⁡Eigenvals⁡A
−0.894602543413.747889014.146713483
λ≔evalf⁡Eigenvals⁡A,vecs
λ≔−0.894602543413.747889014.146713483
print⁡vecs
0.9465751230.3592673648−0.2987282688−0.28181951680.43466708370.7371720079−0.30743615180.9276415841−0.6035890728
v1≔linalgsubmatrix⁡vecs,1..3,1..1
v1≔0.946575123−0.2818195168−0.3074361518
evalm⁡A&*v1=evalm⁡λ1⁢v1
−0.84680851760.25211644740.275033148=−0.84680851260.25211645650.2750331633
vecs≔vecs
Note: If we did not unassign vecs, the following command would be interpreted as a generalized eigenvalue problem.
evalf⁡Eigenvals⁡B,vecs
9.3218253934.28431003×10−9−0.3218253804
−0.42860917840.94340282330.7693450002−0.4286091784−4.6×10−100.7693450117−0.9031974602−0.3144676070−0.8518765909
C≔array⁡10,2,1,−2,12,3,1,0,8
C≔1021−2123108
evalf⁡Eigenvals⁡A,C
1.215689290−0.10619576340.4006484607
See Also
LinearAlgebra[Eigenvalues]
LinearAlgebra[Eigenvectors]
Download Help Document