# ExponentialAction

ExponentialAction is a lightweight package that implements the action of the Matrix exponential using the algorithm of Al-Mohy and Higham^{1}.

The API of this package is a single function `expv(t, A, B)`

that computes `exp(t * A) * B`

for a scalar `t`

, matrix `A`

, and matrix or vector `B`

, without computing `exp(t * A)`

.
For large matrices `A`

, this is significantly less expensive than calling `exp(t * A) * B`

directly.

While `exp(X)`

is only defined in LinearAlgebra for `Diagonal`

, `Symmetric{<:Real}`

/`Hermitian`

, and `StridedMatrix`

, `expv`

can take an arbitrary matrix type.
It also can be differentiated using ForwardDiff, ReverseDiff, and Zygote.
Note that currently this just means we avoid patterns such as type constraints or mutation that are problematic for these automatic differentiation engines; no custom rules are defined.
This may change in the future.

For description of keyword arguments, see the docstring of `expv`

.

## Related Packages

ExponentialUtilities.jl and Expokit.jl both implement an approximation to the action of the matrix exponential using Krylov subspaces.

## References

- Al-Mohy, Awad H. and Higham, Nicholas J. (2011) Computing the Action of the Matrix Exponential, with an Application to Exponential Integrators. SIAM Journal on Scientific Computing, 33 (2). pp. 488-511. ISSN 1064-8275 doi: 10.1137/100788860, eprint: eprints.maths.manchester.ac.uk/id/eprint/1591,
- https://github.com/higham/expmv