 Eigenvals - Maple Programming Help

Home : Support : Online Help : System : Libraries and Packages : Deprecated Packages and Commands : Deprecated commands : Eigenvals(deprecated)

Eigenvals

eigenvalues/vectors of a numeric matrix

 Calling Sequence Eigenvals(A, vecs) Eigenvals(A, B, vecs)

Parameters

 A, B - square matrices of real or complex numbers vecs - (optional) name to be assigned the matrix of eigenvectors

Description

 • 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 $\mathrm{AX}=\mathrm{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)).

Examples

Important: The command Eigenvals has been deprecated. Use the superseding commands LinearAlgebra[Eigenvalues] and LinearAlgebra[Eigenvectors] instead.

 > $A≔\mathrm{array}\left(\left[\left[1,2,4\right],\left[3,7,2\right],\left[5,6,9\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {4}\\ {3}& {7}& {2}\\ {5}& {6}& {9}\end{array}\right]$ (1)
 > $B≔\mathrm{array}\left(\left[\left[1,2,3\right],\left[1,2,3\right],\left[2,5,6\right]\right]\right)$
 ${B}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {1}& {2}& {3}\\ {2}& {5}& {6}\end{array}\right]$ (2)
 > $\mathrm{evalf}\left(\mathrm{Eigenvals}\left(A\right)\right)$
 $\left[\begin{array}{ccc}{-0.8946025434}& {13.74788901}& {4.146713483}\end{array}\right]$ (3)
 > $\mathrm{\lambda }≔\mathrm{evalf}\left(\mathrm{Eigenvals}\left(A,\mathrm{vecs}\right)\right)$
 ${\mathrm{\lambda }}{≔}\left[\begin{array}{ccc}{-0.8946025434}& {13.74788901}& {4.146713483}\end{array}\right]$ (4)
 > $\mathrm{print}\left(\mathrm{vecs}\right)$
 $\left[\begin{array}{ccc}{0.946575123}& {0.3592673648}& {-0.2987282688}\\ {-0.2818195168}& {0.4346670837}& {0.7371720079}\\ {-0.3074361518}& {0.9276415841}& {-0.6035890728}\end{array}\right]$ (5)
 > $\mathrm{v1}≔\mathrm{linalg}\left[\mathrm{submatrix}\right]\left(\mathrm{vecs},1..3,1..1\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{c}{0.946575123}\\ {-0.2818195168}\\ {-0.3074361518}\end{array}\right]$ (6)
 > $\mathrm{evalm}\left(A\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{v1}\right)=\mathrm{evalm}\left(\mathrm{\lambda }\left[1\right]\mathrm{v1}\right)$
 $\left[\begin{array}{c}{-0.8468085176}\\ {0.2521164474}\\ {0.275033148}\end{array}\right]{=}\left[\begin{array}{c}{-0.8468085126}\\ {0.2521164565}\\ {0.2750331633}\end{array}\right]$ (7)
 > $\mathrm{vecs}≔'\mathrm{vecs}'$
 ${\mathrm{vecs}}{≔}{\mathrm{vecs}}$ (8)

Note:  If we did not unassign vecs, the following command would be interpreted as a generalized eigenvalue problem.

 > $\mathrm{evalf}\left(\mathrm{Eigenvals}\left(B,\mathrm{vecs}\right)\right)$
 $\left[\begin{array}{ccc}{9.321825393}& {4.28431003}{}{{10}}^{{-9}}& {-0.3218253804}\end{array}\right]$ (9)
 > $\mathrm{print}\left(\mathrm{vecs}\right)$
 $\left[\begin{array}{ccc}{-0.4286091784}& {0.9434028233}& {0.7693450002}\\ {-0.4286091784}& {-4.6}{}{{10}}^{{-10}}& {0.7693450117}\\ {-0.9031974602}& {-0.3144676070}& {-0.8518765909}\end{array}\right]$ (10)
 > $C≔\mathrm{array}\left(\left[\left[10,2,1\right],\left[-2,12,3\right],\left[1,0,8\right]\right]\right)$
 ${C}{≔}\left[\begin{array}{ccc}{10}& {2}& {1}\\ {-2}& {12}& {3}\\ {1}& {0}& {8}\end{array}\right]$ (11)
 > $\mathrm{evalf}\left(\mathrm{Eigenvals}\left(A,C\right)\right)$
 $\left[\begin{array}{ccc}{1.215689290}& {-0.1061957634}& {0.4006484607}\end{array}\right]$ (12)