linalg(deprecated)/eigenvectors - Maple Help

linalg(deprecated)

 eigenvectors
 find the eigenvectors of a matrix

 Calling Sequence eigenvectors(A) eigenvectors(A, 'radical') eigenvectors(A, 'implicit')

Parameters

 A - square matrix

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Eigenvectors], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The procedure eigenvectors computes the eigenvalues and eigenvectors of A.  That is, for each eigenvalue lambda of A it solves the linear system $\left(I\mathrm{lambda}-A\right)X=0$ for X.
 • The result returned is a sequence of lists of the form $[\mathrm{ei},\mathrm{mi},\left\{v[1,i],\mathrm{tripledotplaceholderv}[\mathrm{ni},i]\right\}]$, where the $\mathrm{ei}$ are the eigenvalues, mi their algebraic multiplicities, $\left\{v[1,i],...,v[\mathrm{ni},i]\right\}$ is a set of basis vectors for the eigenspace corresponding to $\mathrm{ei}$, and $1<=\mathrm{ni}<=\mathrm{mi}$ is the dimension of the eigenspace. The first example below shows how to extract the eigenvalues and their eigenvectors from the result.
 • Numeric Case: If the matrix A contains any floating-point (decimal) numbers, the eigenvectors are computed numerically.  A standard numerical algorithm is used.  All floating point arithmetic is done at Digits digits of precision.  Note that the matrix entries on input must all be all of type numeric or complex(numeric).
 • Symbolic Case: Otherwise the eigenvalues and eigenvectors are computed symbolically (exactly). First the characteristic polynomial is computed and solved for its roots (the eigenvalues) lambda[i] symbolically.  Then for each eigenvalue, a basis for its eigenspace is computed by computing the null space of the characteristic matrix $A-{\mathrm{lambda}}_{i}I$.
 • Although eigenvalues and eigenvectors can in principle be computed for a matrix over any field F, one must be able to compute effectively with the roots of a univariate polynomial over F. For this reason, this routine is limited at present to the field of algebraic numbers or algebraic functions.  Therefore, the input A must be a matrix of rationals, or polynomials, or a matrix of algebraic numbers or algebraic functions represented using Maple's RootOf or radical notation.
 • If the optional second argument is 'radical' is specified, Maple will try to express the eigenvalues and eigenvectors in terms of exact radicals. Note this may fail if any factor of the characteristic polynomial has degree 5 or higher. If the optional second argument is 'implicit' then Maple will express the eigenvalues in terms of an algebraic extension of any nonlinear factors of the characteristic polynomial using Maple's RootOf notation. This is always possible. If no optional second argument is specified, then Maple will use radicals as the default.  The examples below will make these differences clear.
 • The command with(linalg,eigenvectors) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Eigenvectors], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\mathrm{matrix}\left(3,3,\left[1,-3,3,3,-5,3,6,-6,4\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {-3}& {3}\\ {3}& {-5}& {3}\\ {6}& {-6}& {4}\end{array}\right]$ (1)
 > $e≔\mathrm{eigenvalues}\left(A\right)$
 ${e}{≔}{4}{,}{-2}{,}{-2}$ (2)
 > $v≔\left[\mathrm{eigenvectors}\left(A\right)\right]$
 ${v}{≔}\left[\left[{4}{,}{1}{,}\left\{\left[\begin{array}{ccc}{1}& {1}& {2}\end{array}\right]\right\}\right]{,}\left[{-2}{,}{2}{,}\left\{\left[\begin{array}{ccc}{1}& {1}& {0}\end{array}\right]{,}\left[\begin{array}{ccc}{-1}& {0}& {1}\end{array}\right]\right\}\right]\right]$ (3)
 > ${{v}_{1}}_{1}$
 ${4}$ (4)
 > ${{v}_{1}}_{2}$
 ${1}$ (5)
 > ${{v}_{1}}_{3}$
 $\left\{\left[\begin{array}{ccc}{1}& {1}& {2}\end{array}\right]\right\}$ (6)
 > ${{v}_{2}}_{1}$
 ${-2}$ (7)
 > ${{v}_{2}}_{2}$
 ${2}$ (8)

Here is a numerical example (A is a symmetric Toeplitz matrix)

 > $A≔\mathrm{toeplitz}\left(\left[1.0,2.0,3.0\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1.0}& {2.0}& {3.0}\\ {2.0}& {1.0}& {2.0}\\ {3.0}& {2.0}& {1.0}\end{array}\right]$ (9)
 > $\mathrm{eigenvalues}\left(A\right)$
 ${-2.00000000000000}{,}{-0.701562118716425}{,}{5.70156211871643}$ (10)
 > $\mathrm{eigenvectors}\left(A\right)$
 $\left[{-2.000000002}{,}{1}{,}\left\{\left[\begin{array}{ccc}{0.7071067811}& {1.47}{×}{{10}}^{{-10}}& {-0.7071067809}\end{array}\right]\right\}\right]{,}\left[{-0.7015621183}{,}{1}{,}\left\{\left[\begin{array}{ccc}{-0.3645129330}& {0.8568900996}& {-0.3645129334}\end{array}\right]\right\}\right]{,}\left[{5.701562115}{,}{1}{,}\left\{\left[\begin{array}{ccc}{0.6059128004}& {0.5154991348}& {0.6059128001}\end{array}\right]\right\}\right]$ (11)

Here is the same example done with exact arithmetic

 > $A≔\mathrm{toeplitz}\left(\left[1,2,3\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {2}& {1}& {2}\\ {3}& {2}& {1}\end{array}\right]$ (12)
 > $\mathrm{eigenvalues}\left(A\right)$
 ${-2}{,}\frac{{5}}{{2}}{-}\frac{\sqrt{{41}}}{{2}}{,}\frac{{5}}{{2}}{+}\frac{\sqrt{{41}}}{{2}}$ (13)
 > $\mathrm{eigenvectors}\left(A\right)$
 $\left[{-2}{,}{1}{,}\left\{\left[\begin{array}{ccc}{-1}& {0}& {1}\end{array}\right]\right\}\right]{,}\left[\frac{{5}}{{2}}{+}\frac{\sqrt{{41}}}{{2}}{,}{1}{,}\left\{\left[\begin{array}{ccc}{1}& {-}\frac{{3}}{{4}}{+}\frac{\sqrt{{41}}}{{4}}& {1}\end{array}\right]\right\}\right]{,}\left[\frac{{5}}{{2}}{-}\frac{\sqrt{{41}}}{{2}}{,}{1}{,}\left\{\left[\begin{array}{ccc}{1}& {-}\frac{{3}}{{4}}{-}\frac{\sqrt{{41}}}{{4}}& {1}\end{array}\right]\right\}\right]$ (14)

By default the eigenvalues and eigenvectors are computed using radicals. To compute implicitly in terms of RootOf's, use the 'implicit' option

 > $\mathrm{eigenvectors}\left(A,'\mathrm{implicit}'\right)$
 $\left[{-2}{,}{1}{,}\left\{\left[\begin{array}{ccc}{-1}& {0}& {1}\end{array}\right]\right\}\right]{,}\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{}{\mathrm{_Z}}{-}{4}\right){,}{1}{,}\left\{\left[\begin{array}{ccc}{1}& \frac{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{}{\mathrm{_Z}}{-}{4}\right)}{{2}}{-}{2}& {1}\end{array}\right]\right\}\right]$ (15)

Here is an example of a symbolic matrix

 > $T≔\mathrm{toeplitz}\left(\left[a,b,c\right]\right)$
 ${T}{≔}\left[\begin{array}{ccc}{a}& {b}& {c}\\ {b}& {a}& {b}\\ {c}& {b}& {a}\end{array}\right]$ (16)
 > $\mathrm{eigenvalues}\left(T\right)$
 ${a}{-}{c}{,}{a}{+}\frac{{c}}{{2}}{+}\frac{\sqrt{{8}{}{{b}}^{{2}}{+}{{c}}^{{2}}}}{{2}}{,}{a}{+}\frac{{c}}{{2}}{-}\frac{\sqrt{{8}{}{{b}}^{{2}}{+}{{c}}^{{2}}}}{{2}}$ (17)
 > $\mathrm{eigenvectors}\left(T,'\mathrm{implicit}'\right)$
 $\left[{a}{-}{c}{,}{1}{,}\left\{\left[\begin{array}{ccc}{-1}& {0}& {1}\end{array}\right]\right\}\right]{,}\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}\left({-}{2}{}{a}{-}{c}\right){}{\mathrm{_Z}}{+}{{a}}^{{2}}{+}{c}{}{a}{-}{2}{}{{b}}^{{2}}\right){,}{1}{,}\left\{\left[\begin{array}{ccc}{1}& {-}\frac{{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}\left({-}{2}{}{a}{-}{c}\right){}{\mathrm{_Z}}{+}{{a}}^{{2}}{+}{c}{}{a}{-}{2}{}{{b}}^{{2}}\right){+}{a}{+}{c}}{{b}}& {1}\end{array}\right]\right\}\right]$ (18)

The sqrt(2) in the following example makes the computation more difficult.

 > $T≔\mathrm{toeplitz}\left(\left[\sqrt{2},a,3\right]\right)$
 ${T}{≔}\left[\begin{array}{ccc}\sqrt{{2}}& {a}& {3}\\ {a}& \sqrt{{2}}& {a}\\ {3}& {a}& \sqrt{{2}}\end{array}\right]$ (19)
 > $\mathrm{eigenvectors}\left(T\right)$
 $\left[\sqrt{{2}}{+}\frac{{3}}{{2}}{+}\frac{\sqrt{{8}{}{{a}}^{{2}}{+}{9}}}{{2}}{,}{1}{,}\left\{{r}\right\}\right]{,}\left[\sqrt{{2}}{+}\frac{{3}}{{2}}{-}\frac{\sqrt{{8}{}{{a}}^{{2}}{+}{9}}}{{2}}{,}{1}{,}\left\{{r}\right\}\right]{,}\left[\sqrt{{2}}{-}{3}{,}{1}{,}\left\{{r}\right\}\right]$ (20)

This final example shows a case where the algebraic multiplicity of the eigenvalue u is 4 but the dimension of the eigenspace is only 3.

 > $B≔\mathrm{matrix}\left(4,4,\left[0,1,0,0,-{u}^{2},2u,0,0,-us,s,u,0,-ut,t,0,u\right]\right)$
 ${B}{≔}\left[\begin{array}{cccc}{0}& {1}& {0}& {0}\\ {-}{{u}}^{{2}}& {2}{}{u}& {0}& {0}\\ {-}{u}{}{s}& {s}& {u}& {0}\\ {-}{u}{}{t}& {t}& {0}& {u}\end{array}\right]$ (21)
 > $\mathrm{eigenvectors}\left(B\right)$
 $\left[{u}{,}{4}{,}\left\{\left[\begin{array}{cccc}\frac{{1}}{{u}}& {1}& {0}& {0}\end{array}\right]{,}\left[\begin{array}{cccc}{0}& {0}& {1}& {0}\end{array}\right]{,}\left[\begin{array}{cccc}{0}& {0}& {0}& {1}\end{array}\right]\right\}\right]$ (22)