WOLFRAM

Copy to clipboard.

gives the n ^(th) matrix power of the matrix m.

Copy to clipboard.
MatrixPower[m,n,v]

gives the n^(th) matrix power of the matrix m applied to the vector v.

Details and Options

  • MatrixPower[m,n] effectively evaluates the product of a matrix with itself n times. »
  • When n is negative, MatrixPower finds powers of the inverse of the matrix m. »
  • When n is not an integer, MatrixPower effectively evaluates the power series for the function, with ordinary powers replaced by matrix powers. »
  • MatrixPower works only on square matrices.

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Square a symbolic matrix:

This is :

Out[3]=3

Square the inverse of a symbolic matrix:

This is TemplateBox[{m}, Inverse].TemplateBox[{m}, Inverse]:

Out[3]=3

Raise a matrix to the 10th power:

Out[1]=1

Notice that this is different from raising each entry to the 10th power:

Out[2]=2

Compute a symbolic matrix power:

Out[1]=1

Scope  (15)Survey of the scope of standard use cases

Basic Uses  (9)

Raise a machine-precision matrix to a positive integer power:

Out[1]=1

Raise it to a fractional power:

Out[11]=11

Square a complex matrix:

Raise an exact matrix to an integer power:

Raise it to a fractional power:

Raise an arbitrary-precision matrix to a negative integer power:

Out[1]=1
Out[2]=2

Raise it to an irrational power:

Out[3]=3

Raise a symbolic matrix to an integer power:

Out[1]=1

Raise a matrix to a symbolic power:

Out[1]=1

Raising large machine-precision matrices to a power is efficient:

Out[2]=2

Directly applying the power to a single vector is even more efficient:

Out[3]=3

Raise a matrix with finite field elements to an integer power:

Raise it to a negative power:

Raise a CenteredInterval matrix to an integer power:

Find a random representative mrep of m:

Verify that mpow contains MatrixPower[mrep,17]:

Special Matrices  (6)

The result of raising a sparse matrix to a positive integer power is returned as a sparse matrix:

Out[1]=1
Out[2]=2

Format the result:

Raising a sparse matrix to a other powers will typically produce a normal matrix:

Out[4]=4

Directly apply the power of of a sparse matrix to a sparse vector:

Out[1]=1
Out[2]=2

Raising a structured array to a power will be returned as a structured array if possible:

Out[1]=1
Out[2]=2

This is not always possible:

Out[3]=3
Out[4]=4

IdentityMatrix raised to any power is itself:

Out[1]=1

More generally, the power of any diagonal matrix is the power of its diagonal elements:

Out[2]=2

Raise HilbertMatrix to a negative power:

Compute the ^(th) power of a matrix of univariate polynomials of degree :

Out[2]=2

Applications  (5)Sample problems that can be solved with this function

Find the fundamental solution for the constant coefficient system of difference equations :

Define fundamental solution using MatrixPower:

Out[2]=2

Show that it satisfies the equation:

Out[3]=3

It satisfies the initial condition for a fundamental solution:

Out[4]=4

Find the matrix exponential for a matrix without a full set of eigenvectors:

Out[2]=2

Compute the exponential as the power series for each term:

Out[3]=3
Out[4]=4

Construct a rotation matrix as a limit of repeated infinitesimal transformations:

Out[1]=1
Out[2]=2

Inverse power iteration for the smallest eigenvalue of a sparse positive definite matrix:

Out[1]=1
Out[2]=2

Check the error in m.v-val v:

Out[3]=3

Shifted inverse power iteration for the largest eigenvalue:

Out[4]=4

Check the error in m.v-val v:

Out[5]=5

An easy way to evaluate a matrix polynomial:

Out[2]=2

Evaluate a characteristic polynomial:

Out[4]=4
Out[5]=5

Properties & Relations  (10)Properties of the function, and connections to other functions

For a positive integer power , MatrixPower[m,n] is equivalent to ( times):

Out[10]=10

Write the formula more compactly with Apply (@@):

Out[13]=13

For a negative integer power , MatrixPower[m,-n] is equivalent to TemplateBox[{m}, Inverse].TemplateBox[{m}, Inverse].....TemplateBox[{m}, Inverse] ( times):

Out[1]=1

Write the formula more compactly with Apply:

Out[2]=2

In particular, negative matrix powers are not defined for singular matrices:

Out[3]=3

For a nonsingular matrix m, MatrixPower[m,0] is the identity matrix:

Out[2]=2

If m is nonsingular, MatrixPower[m, n].MatrixPower[m,-n] is the identity:

For noninteger powers, MatrixPower effectively uses the power series, with Power replaced by MatrixPower:

Out[2]=2

Equivalently, MatrixPower is MatrixFunction applied to the appropriate function for the power:

Out[3]=3

The matrix power of a diagonal matrix is a diagonal matrix with the diagonal entries raised to that power:

Out[2]=2
Out[3]=3

For any power and diagonalizable matrix m=v.d.TemplateBox[{v}, Inverse], MatrixPower[m,s] equals v.d^s.TemplateBox[{v}, Inverse]:

Out[2]=2

Use JordanDecomposition to find a diagonalization:

Out[4]=4

Confirm the identity:

Out[5]=5
Out[6]=6

For a real symmetric matrix s and integer power n, MatrixPower[s,n] is also real and symmetric:

Out[1]=1

The analogous statement is true for Hermitian matrices:

Out[2]=2

For am orthogonal matrix o and any power s, MatrixPower[o,s] is also orthogonal:

Out[1]=1

The analogous statement is true for unitary matrices:

Out[2]=2

can be computed from the JordanDecomposition as v.j^s.TemplateBox[{v}, Inverse]:

Out[1]=1

Moreover, is zero except in upper-triangular blocks delineated by s in the superdiagonal:

Out[2]=2
Wolfram Research (1991), MatrixPower, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPower.html (updated 2024).
Copy to clipboard.
Wolfram Research (1991), MatrixPower, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPower.html (updated 2024).

Text

Wolfram Research (1991), MatrixPower, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPower.html (updated 2024).

Copy to clipboard.
Wolfram Research (1991), MatrixPower, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPower.html (updated 2024).

CMS

Wolfram Language. 1991. "MatrixPower." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MatrixPower.html.

Copy to clipboard.
Wolfram Language. 1991. "MatrixPower." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MatrixPower.html.

APA

Wolfram Language. (1991). MatrixPower. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixPower.html

Copy to clipboard.
Wolfram Language. (1991). MatrixPower. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixPower.html

BibTeX

@misc{reference.wolfram_2024_matrixpower, author="Wolfram Research", title="{MatrixPower}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixPower.html}", note=[Accessed: 10-January-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2024_matrixpower, author="Wolfram Research", title="{MatrixPower}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixPower.html}", note=[Accessed: 10-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_matrixpower, organization={Wolfram Research}, title={MatrixPower}, year={2024}, url={https://reference.wolfram.com/language/ref/MatrixPower.html}, note=[Accessed: 10-January-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2024_matrixpower, organization={Wolfram Research}, title={MatrixPower}, year={2024}, url={https://reference.wolfram.com/language/ref/MatrixPower.html}, note=[Accessed: 10-January-2025 ]}