Skip to contents

Computes the matrix exponential of a symmetric matrix. The result is an SPD matrix.

Usage

matrix_expm_spd(S_symm)

Arguments

S_symm

A numeric, symmetric matrix (e.g., a matrix in the tangent space).

Value

The matrix exponential of S_symm (an SPD matrix).

Examples

S1 <- matrix(c(2.3, -0.3, -0.3, 3.6), 2, 2)
logS1 <- matrix_logm_spd(S1)
S1_reconstructed <- matrix_expm_spd(logS1)
# all.equal(S1, S1_reconstructed) # Should be TRUE, up to numerical precision