# Documentation

### This is machine translation

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

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

## Compute Eigenvalues and Eigenvectors Numerically

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.

When computing eigenvalues and eigenvectors of some matrices symbolically, you can get a long result in a form that is not suitable for further computations. For example, the `linalg::eigenvectors` function returns the following results for eigenvalues and eigenvectors of the 3 ×3 Hilbert matrix:

```H := linalg::hilbert(3): eigen := linalg::eigenvectors(H)```
``` ```

Numeric approximation of the result returned by the symbolic `linalg::eigenvectors` function gives a shorter answer that contains complex numbers:

`float(eigen)`
``` ```

If you need simple (though approximate) eigenvalues and eigenvectors of the Hilbert matrix in further computations, use numeric methods from the beginning. To approximate eigenvalues and eigenvectors of a matrix numerically, use the `numeric::eigenvectors` function. The function returns eigenvalues, eigenvectors, and residues (estimated errors for the numerical eigenvalues):

`[eigenvalues, eigenvectors, residues] := numeric::eigenvectors(H)`
``` ```

Small residue values indicate that roundoff errors do not significantly affect the results. To suppress the computation of the residues, use the `NoResidues` option:

`numeric::eigenvectors(H, NoResidues)`
``` ```

If you want to compute only eigenvalues of a matrix, use the `numeric::eigenvalues` function:

`numeric::eigenvalues(H)`
``` ```

When computing eigenvalues and eigenvectors numerically, you can use the `HardwareFloats` and `SoftwareFloats` options to employ hardware or software float arithmetic, respectively. For information about these options, see the Numeric Determinant section. For more details, see the `numeric::eigenvectors` and `numeric::eigenvalues` help pages.