EXPM
Overview
The EXPM
function computes the matrix exponential of a square matrix. The matrix exponential is a fundamental operation in linear algebra, with applications in solving systems of linear differential equations, quantum mechanics, control theory, and more. The matrix exponential of a square matrix is defined as:
This function uses the algorithm from Awad H. Al-Mohy and Nicholas J. Higham (2009), which is a scaling and squaring method with a variable-order Padé approximation, as implemented in scipy.linalg.expm . For more details, see the SciPy documentation .
This example function is provided as-is without any representation of accuracy.
Usage
To use the function in Excel:
=EXPM(matrix)
matrix
(2D list, required): A square matrix (n x n) of real or complex numbers.
The function returns a 2D list (n x n) representing the matrix exponential of the input matrix, or a 2D list of strings with an error message if the input is invalid.
Examples
Example 1: Exponential of the Zero Matrix
In Excel:
=EXPM({0,0;0,0})
Expected output:
1.0 | 0.0 |
0.0 | 1.0 |
Live Notebook
Edit this function in a live notebook .