eig - Maple Help

Matlab

 eig
 compute the eigenvalues of a MapleMatrix or MatlabMatrix in MATLAB(R)

 Calling Sequence eig(X) eig(X, Y) eig(X, Y, eigenvectors=true, balanced=true)

Parameters

 X - MapleMatrix, or MatlabMatrix Y - (optional) MapleMatrix or a MatlabMatrix eigenvectors=[true|false] - (optional) return eigenvectors balanced=[true|false] - (optional) balance the matrix

Description

 • The eig command computes the eigenvalues of a matrix using MATLAB®.
 • If you specify the option 'eigenvectors'='true', then both the eigenvectors and the eigenvalues of the matrix are returned. The default is 'eigenvectors'='false'. In this form, the eigenvectors are the columns of the first matrix returned, and the eigenvalues are the entries along the diagonal of the second matrix returned.
 • If you specify the option 'balanced'='false', then a preliminary balancing step is not computed first. The balancing step  improves the conditioning of the matrix X. The default is 'balanced'='true'.
 • The call Matlab[eig](X, Y) solves the "generalized eigenvalue problem"; that is, it finds the roots of the polynomial $\mathrm{det}\left(\mathrm{lambda}Y-X\right)$.
 • By default a Vector of eigenvalues is returned. When you specify 'eigenvectors'='true', an additional Matrix of eigenvectors is also returned.

Examples

Define the Maple matrix

 > $\mathrm{with}\left(\mathrm{Matlab}\right):$
 > $\mathrm{maplematrix_a}≔\mathrm{Matrix}\left(\left[\left[1,2,3\right],\left[3,4,5\right],\left[6,7,8\right]\right]\right)$
 ${\mathrm{maplematrix_a}}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {3}& {4}& {5}\\ {6}& {7}& {8}\end{array}\right]$ (1)

The Eigenvalues of this MapleMatrix are computed as

 > $\mathrm{Matlab}\left[\mathrm{eig}\right]\left(\mathrm{maplematrix_a}\right)$

 [    14.0663729752107667    ] [                           ] [   -1.06637297521077667    ] [                           ] [                        -15] [-0.379901471867316940 10   ]

To get the eigenvectors also

 > $\mathrm{vects},\mathrm{vals}≔\mathrm{Matlab}\left[\mathrm{eig}\right]\left(\mathrm{maplematrix_a},'\mathrm{eigenvectors}'='\mathrm{true}'\right):$
 > $\mathrm{vects}$

 [-0.265647760732583504 ,  -0.744428627863832570 , 0.408248290463863628] [                                                                     ] [-0.491207120532433317 , -0.190701223873281478 , -0.816496580927726145] [                                                                     ] [-0.829546160232207730 ,  0.639889882112543052 ,  0.408248290463862573]

 > $\mathrm{vals}$

 [14.0663729752107667 ,     0. ,     0.] [                                     ] [0. ,     -1.06637297521077667 ,    0.] [                                     ] [                                  -15] [0. , 0. , -0.379901471867316940 10   ]