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

## Maple

In Maple, in the LinearAlgebra package, the command to obtain eigenvalues and eigenvectors for the matrix A is:

Eigenvectors(A)

For example:

> with(LinearAlgebra): > A:=<1, 2; 6, -1>; [1 2] A := [ ] [6 -1] > v,e:=Eigenvectors(A); [ 1/2 ] [ 2 2 ] [13 ] [--------- ----------] v, e := [ ], [ 1/2 1/2 ] [ 1/2] [13 - 1 -13 - 1] [-13 ] [ ] [ 1 1 ] > evalf(v); [3.605551275 ] [ ] [-3.605551275]

## Mathematica

In Mathematica, use:

{v, e} = Eigensystem[A]

For example:

In[1]:= A = {{1, 2}, {6, -1}} Out[1]= {{1, 2}, {6, -1}} In[2]:= {v, e} = Eigensystem[A] 1 - Sqrt[13] 1 + Sqrt[13] Out[2]= {{-Sqrt[13], Sqrt[13]}, {{------------, 1}, {------------, 1}}} 6 6 In[3]:= N[v] Out[3]= {-3.60555, 3.60555}

## MATLAB

In MATLAB, use:

[e,v] = eig(A)

For example:

>> A=[1, 2; 6, -1] A = 1 2 6 -1 >> [e v]=eig(A) e = 0.6089 -0.3983 0.7933 0.9172 v = 3.6056 0 0 -3.6056 >> v v = 3.6056 0 0 -3.6056

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics. Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200; staff are available for consultation Monday-Friday 9am-noon and by appointment.

## Related documents

*This is document* afko *in the Knowledge Base.*

*Last modified on* 2015-05-20 00:00:00*.*

- Fill out this form to submit your issue to the UITS Support Center.
- Please note that you must be affiliated with Indiana University to receive support.
- All fields are required.

- Fill out this form to submit your comment to the IU Knowledge Base.
- If you are affiliated with Indiana University and need help with a computing problem, please
use the
**I need help with a computing problem**section above, or contact your campus Support Center.