Functions > Vector and Matrix > Array Characteristics > Example: Eigenvectors and Eigenvalues
  
Example: Eigenvectors and Eigenvalues
Use the eigenvals, eigenvecs, and eigenvec functions to find the eigenvalues and the eigenvectors of a real or complex matrix. Check the theory that for a square matrix M, a nonzero vector v is an eigenvector of M if you can find a number λ such that:
Click to copy this expression
1. Define an input square matrix.
Click to copy this expression
2. Call eigenvals and eigenvecs to find the eigenvalues and the eigenvectors of matrix A.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
The first column of v is the eigenvector corresponding to the first element of c. Similarly, the second column of v is the eigenvector corresponding to the second element of c, and so on.
3. Define v1 to be the first eigenvector and c1 to be the first eigenvalue of A. Compare A x v1 to c1 x v1.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
4. Define v2 to be the first eigenvector and c2 to be the first eigenvalue of A. Compare A x v2 to c2 x v2.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
5. Define v3 to be the first eigenvector and c3 to be the first eigenvalue of A. Compare A x v3 to c3 x v3.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
6. Call the eigenvec function to return a single eigenvector for a particular eigenvalue.
Click to copy this expression
Click to copy this expression
The results returned by eigenvec and eigenvecs do not necessarily match, yet they are both valid solutions. An eigenvector is not unique. It is related to other eigenvectors by a scale factor. For a given eigenvalue, there is an infinite number of eigenvectors.