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() to each entry. Use expm() 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(). Eigenvalue analysis through eigs() can help explain existence and numerical sensitivity.

Try Logm in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions