This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Find Eigenvalues and Eigenvectors

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Linear transformations are operations that matrices perform on vectors. An eigenvalue and eigenvector of a square matrix A are, respectively, a scalar λ and a nonzero vector such that


Typically, if a matrix changes the length of a vector, but does not change its direction, the vector is called an eigenvector of the matrix. The scaling factor is the eigenvalue associated with this eigenvector.

MuPAD® provides the functions for computing eigenvalues and eigenvectors. For example, create the following square matrix:

A := matrix([[1, 2, 3], [4, 5, 6], [1, 2, 3]])

To compute the eigenvalues of the matrix A, use the linalg::eigenvalues function:


The linalg::eigenvalues function returns a set of eigenvalues. A set in MuPAD cannot contain duplicate elements. Therefore, if a matrix has eigenvalues with multiplicities greater than 1, MuPAD automatically removes duplicate eigenvalues. If you want the linalg::eigenvalues function to return eigenvalues along with their multiplicities, use the Multiple option. For example, zero is a double eigenvalue of the matrix A:

linalg::eigenvalues(A, Multiple)

To compute the eigenvectors of a matrix, use the linalg::eigenvectors function. The function returns eigenvectors along with corresponding eigenvalues and their multiplicities:


The linalg::eigenvalues function computes eigenvalues of a matrix by finding the roots of the characteristic polynomial of that matrix. There is no general method for solving polynomial equations of orders higher than 4. When trying to compute eigenvalues of a large matrix, the solver can return complicated solutions or solutions in the form of RootOf. Also, the solver can fail to find any solutions for some matrices. For example, create the 6 ×6 Pascal matrix:

P := linalg::pascal(6)

For that matrix, MuPAD finds eigenvalues in the form of RootOf:

eigenvalues := linalg::eigenvalues(P)

You can find floating-point approximation of the result by using the float command:


For more information about approximating eigenvalues and eigenvectors numerically, see Numeric Eigenvalues and Eigenvectors.

Was this topic helpful?