This is an old revision of this page, as edited by Maechler(talk | contribs) at 08:51, 17 July 2023(Mention R, Matrix::expm() {since 2005}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 08:51, 17 July 2023 by Maechler(talk | contribs)(Mention R, Matrix::expm() {since 2005})
Finding reliable and accurate methods to compute the matrix exponential is difficult, and this is still a topic of considerable current research in mathematics and numerical analysis. Matlab, GNU Octave, R, and SciPy all use the Padé approximant.[1][2][3][4]
In this section, we discuss methods that are applicable in principle to any matrix, and which can be carried out explicitly for small matrices.[5] Subsequent sections describe methods suitable for numerical evaluation on large matrices.
Diagonalizable case
If a matrix is diagonal:
then its exponential can be obtained by exponentiating each entry on the main diagonal:
Application of Sylvester's formula yields the same result. (To see this, note that addition and multiplication, hence also exponentiation, of diagonal matrices is equivalent to element-wise addition and multiplication, and hence exponentiation; in particular, the "one-dimensional" exponentiation is felt element-wise for the diagonal case.)
Example : Diagonalizable
For example, the matrix
can be diagonalized as
Thus,
Nilpotent case
A matrix N is nilpotent if Nq = 0 for some integer q. In this case, the matrix exponential eN can be computed directly from the series expansion, as the series terminates after a finite number of terms:
Since the series has a finite number of steps, it is a matrix polynomial, which can be computed efficiently.
This means that we can compute the exponential of X by reducing to the previous two cases:
Note that we need the commutativity of A and N for the last step to work.
Using the Jordan canonical form
A closely related method is, if the field is algebraically closed, to work with the Jordan form of X. Suppose that X = PJP−1 where J is the Jordan form of X. Then
Also, since
Therefore, we need only know how to compute the matrix exponential of a Jordan block. But each Jordan block is of the form
where N is a special nilpotent matrix. The matrix exponential of J is then given by
Deriving this by expansion of the exponential function, each power of P reduces to P which becomes a common factor of the sum:
Rotation case
For a simple rotation in which the perpendicular unit vectors a and b specify a plane,[6] the rotation matrixR can be expressed in terms of a similar exponential function involving a generatorG and angle θ.[7][8]
The formula for the exponential results from reducing the powers of G in the series expansion and identifying the respective series coefficients of G2 and G with −cos(θ) and sin(θ) respectively. The second expression here for eGθ is the same as the expression for R(θ) in the article containing the derivation of the generator, R(θ) = eGθ.
In two dimensions, if and , then , , and
reduces to the standard matrix for a plane rotation.
The matrix P = −G2projects a vector onto the ab-plane and the rotation only affects this part of the vector. An example illustrating this is a rotation of 30° = π/6 in the plane spanned by a and b,
Let N = I - P, so N2 = N and its products with P and G are zero. This will allow us to evaluate powers of R.