Notice! This document is currently in Archived status.
The content of this document may be incorrect or outdated.

Print this article Edit this article

How Do I find Eigen Vectors?

In Maple, Mathematica, and Matlab, how do I obtain eigenvalues and eigenvectors?

Maple

In Maple, the command to obtain eigenvalues and eigenvectors is:

  eigenvects( map(evalf, A) )

Example:

  > with(linalg):  
> A := matrix( [ [10, 0, 1], [0, 5, 1], [1, 1, 3] ] );

  [ 10   0  1 ]
[ ]
A := [ 0 5 1 ]
[ ]
[ 1 1 3 ]

  > eigsys := eigenvects( map(evalf, A) );

  eigsys := 
[2.471653325, 1, { [-.1225891913, -.3650187460, .9228939292]} ],
[10.14389544, 1, { [ .9894258912, .02767822018, .1423738801]} ],
[5.384451215, 1, { [.07751319726, -.9305886462,-.3577659480]} ]

  > eigsys[2][3][1][3];

  .1423738801

Mathematica

In Mathematica, use:

  {d,v} = Eigensystem[N[a]]

Example:

  In[1]:= a = {{10., 0, 1}, {0, 5, 1}, {1, 1, 3}}

  Out[1]= {{10., 0, 1}, {0, 5, 1}, {1, 1, 3}}

  In[2]:= eigsys = Eigensystem[N[a]]

  Out[2]= { {10.1439, 5.38445, 2.47165},
> { {-0.989426,-0.0276782, -0.142374},
> {0.0775132, -0.930589, -0.357766},
> { 0.122589, 0.365019, -0.922894} } }

  In[3]:= eigsys[[2,1,3]]

  Out[3]= -0.142374

Matlab

In Matlab, use:

  [V,D] = eig(A)

Example:

  >> A = [ 10., 0, 1; 0, 5, 1; 1, 1, 3 ]

  A =

  10     0     1
0 5 1
1 1 3

  >> [V,D] = eig(A);
>> [V,D] = eig(A)

  V =

  0.9894    0.0775   -0.1226
0.0277 -0.9306 -0.3650
0.1424 -0.3578 0.9229

  D =

  10.1439         0         0
0 5.3845 0
0 0 2.4717

  >> V(3,1)

  ans =

  0.1424

Last Modified: Dec 19, 2016 11:12 am US/Eastern
Created: Mar 22, 2007 4:32 pm GMT-4 by admin
JumpURL: