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.

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

Eigenvalues and eigenvectors

`e = eig(A)`

```
[V,D] =
eig(A)
```

```
[V,D,W]
= eig(A)
```

`e = eig(A,B)`

```
[V,D] =
eig(A,B)
```

```
[V,D,W]
= eig(A,B)
```

`[___] = eig(A,balanceOption)`

`[___] = eig(A,B,algorithm)`

`[___] = eig(___,eigvalOption)`

`[`

also returns full matrix `V`

,`D`

,`W`

]
= eig(`A`

)`W`

whose
columns are the corresponding left eigenvectors, so that ```
W'*A
= D*W'
```

.

The eigenvalue problem is to determine the solution to the equation *A** v* =

`n`

-by-`n`

matrix, `n`

, and `[`

also
returns full matrix `V`

,`D`

,`W`

]
= eig(`A`

,`B`

)`W`

whose columns are the corresponding
left eigenvectors, so that `W'*A = D*W'*B`

.

The generalized eigenvalue problem is to determine the solution
to the equation *A** v* =

`n`

-by-`n`

matrices, `n`

, and `[___] = eig(`

,
where `A`

,`balanceOption`

)`balanceOption`

is `'nobalance'`

,
disables the preliminary balancing step in the algorithm. The default
for `balanceOption`

is `'balance'`

,
which enables balancing. The `eig`

function can return
any of the output arguments in previous syntaxes.

`[___] = eig(`

,
where `A`

,`B`

,`algorithm`

)`algorithm`

is `'chol'`

, uses
the Cholesky factorization of `B`

to compute the
generalized eigenvalues. The default for `algorithm`

depends
on the properties of `A`

and `B`

,
but is generally `'qz'`

, which uses the QZ algorithm.

If `A`

is Hermitian and `B`

is
Hermitian positive definite, then the default for `algorithm`

is `'chol'`

.

`[___] = eig(___,`

returns
the eigenvalues in the form specified by `eigvalOption`

)`eigvalOption`

using
any of the input or output arguments in previous syntaxes. Specify `eigvalOption`

as `'vector'`

to
return the eigenvalues in a column vector or as `'matrix'`

to
return the eigenvalues in a diagonal matrix.

The

`eig`

function can calculate the eigenvalues of sparse matrices that are real and symmetric. To calculate the eigenvectors of a sparse matrix, or to calculate the eigenvalues of a sparse matrix that is not real and symmetric, use the`eigs`

function.

Was this topic helpful?