Matrix functions and Jordan form
Matrix exponential, logarithm, trigonometric, hyperbolic, and Jordan operations are exact symbolic operations.
exponential#
Matrix method
exponential() -> MatrixThe matrix exponential exp(M), evaluated through the certified Jordan
decomposition. Declines on inputs whose eigenvalues cannot be certified
exactly.
logarithm#
Matrix method
logarithm() -> MatrixThe principal matrix logarithm log(M). Raises on a zero or negative-real
eigenvalue (principal branch cut).
square_root#
Matrix method
square_root() -> MatrixThe principal matrix square root sqrt(M); the result is verified to square
back to M. Raises on a negative-real eigenvalue, or on a nontrivial zero
eigenblock (non-analytic).
sine#
Matrix method
sine() -> MatrixThe primary matrix sine sin(M), evaluated exactly through the certified
Jordan decomposition. The result is certified together with the matrix cosine
by sin(M)^2 + cos(M)^2 = I.
cosine#
Matrix method
cosine() -> MatrixThe primary matrix cosine cos(M), evaluated exactly through the certified
Jordan decomposition and the trigonometric identity certificate.
hyperbolic_sine#
Matrix method
hyperbolic_sine() -> MatrixThe primary hyperbolic matrix sine sinh(M), evaluated exactly through the
certified Jordan decomposition. The result is certified together with the
hyperbolic matrix cosine by cosh(M)^2 - sinh(M)^2 = I.
hyperbolic_cosine#
Matrix method
hyperbolic_cosine() -> MatrixThe primary hyperbolic matrix cosine cosh(M), evaluated exactly through the
certified Jordan decomposition and the hyperbolic identity certificate.
jordan_decomposition#
Matrix method
jordan_decomposition() -> tuple[Matrix, Matrix, list[tuple[Expression, int]]]The Jordan decomposition returned as (similarity, jordan_form, blocks) with
, where blocks lists each
Jordan block as an (eigenvalue, size) pair. Every root is certified over an
exact algebraic field. Notes: WASM returns a JordanDecomposition
result class with similarity/jordan_form/blocks getters, each block a
JordanBlock with eigenvalue/size getters.
jordan_decomposition (WASM result class)#
Matrix method
jordan_decomposition() -> tuple[Matrix, Matrix, list[tuple[Expression, int]]]similarity#
Not exposed by the Python bindings. Available as UniffiJordanDecomposition.similarity in Kotlin, UniffiJordanDecomposition.similarity in Swift, api::results::JordanDecomposition::similarity in Rust.
jordan_form#
Not exposed by the Python bindings. Available as UniffiJordanDecomposition.jordanForm in Kotlin, UniffiJordanDecomposition.jordanForm in Swift, api::results::JordanDecomposition::jordan_form in Rust.
blocks#
Not exposed by the Python bindings. Available as UniffiJordanDecomposition.blocks in Kotlin, UniffiJordanDecomposition.blocks in Swift, api::results::JordanDecomposition::blocks in Rust.
jordan_block (WASM result class)#
size#
Not exposed by the Python bindings. Available as UniffiJordanBlock.size in Kotlin, UniffiJordanBlock.size in Swift, api::results::JordanBlock::size in Rust.
The jordan_block.eigenvalue -> Expression getter reuses the shared
eigenvalue heading documented above.
Example#
Spectral decompositions of an exact matrix.
import symi
matrix = symi.Matrix([[5, 4], [1, 2]])
similarity, jordan_form, blocks = matrix.jordan_decomposition()
print(matrix.eigenvalues())
print(matrix.characteristic_polynomial("x"))
print(blocks)