Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

### Contents

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

# expm

Matrix exponential

Y = expm(X)

## Description

Y = expm(X) computes the matrix exponential of X.

Although it is not computed this way, if X has a full set of eigenvectors V with corresponding eigenvalues D, then

`[V,D] = EIG(X) and EXPM(X) = V*diag(exp(diag(D)))/V`

Use exp for the element-by-element exponential.

## Examples

This example computes and compares the matrix exponential of A and the exponential of A.

```A = [1        1        0
0        0        2
0        0       -1 ];

expm(A)
ans =
2.7183   1.7183        1.0862
0        1.0000        1.2642
0             0        0.3679

exp(A)
ans =
2.7183        2.7183        1.0000
1.0000        1.0000        7.3891
1.0000        1.0000        0.3679```

Notice that the diagonal elements of the two results are equal. This would be true for any triangular matrix. But the off-diagonal elements, including those below the diagonal, are different.

expand all

### Algorithms

expm uses the Padé approximation with scaling and squaring. See reference [3], below.

 Note   The files, expmdemo1.mexpmdemo1.m, expmdemo2.mexpmdemo2.m, and expmdemo3.mexpmdemo3.m illustrate the use of Padé approximation, Taylor series approximation, and eigenvalues and eigenvectors, respectively, to compute the matrix exponential. References [1] and [2] describe and compare many algorithms for computing a matrix exponential.

## References

[1] Golub, G. H. and C. F. Van Loan, Matrix Computation, p. 384, Johns Hopkins University Press, 1983.

[2] Moler, C. B. and C. F. Van Loan, "Nineteen Dubious Ways to Compute the Exponential of a Matrix," SIAM Review 20, 1978, pp. 801–836. Reprinted and updated as "Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later," SIAM Review 45, 2003, pp. 3–49.

[3] Higham, N. J., "The Scaling and Squaring Method for the Matrix Exponential Revisited," SIAM J. Matrix Anal. Appl., 26(4) (2005), pp. 1179–1193.