# logm() Function & Examples

Use the logm() math function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

Try it yourself:

---

## logm(): Matrix Logarithm

**logm()** computes a matrix logarithm: a matrix L for which expm(L) equals the original matrix. It is used in continuous-time systems, interpolation of transformations, and advanced linear algebra.

## Important caveats

A matrix logarithm is not obtained by applying [log()](https://calcul.io/function/log/index.md) to each entry. Use [expm()](https://calcul.io/function/expm/index.md) to check a result. Matrix logarithms may be complex or non-unique, so domain assumptions and branch choices matter.

Input should be square; verify it with [size()](https://calcul.io/function/size/index.md). Eigenvalue analysis through [eigs()](https://calcul.io/function/eigs/index.md) can help explain existence and numerical sensitivity.

[All functions](https://calcul.io/functions/index.md)
