# matrix_log function

Logarithm of a square matrix.

## How to write it

### matrix_log(matrix)

**matrix**

A square matrix. Takes a matrix, written as a list of rows.

## Examples

- $\displaystyle \operatorname{matrix\_log}\left(\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\right) = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$

  `matrix_log([[1, 0], [0, 1]])`

  In the solver, `matrix_log([[1, 0], [0, 1]])` gives `[[0, 0], [0, 0]]`.

  [Open in the solver](https://hilberon.com/?q=matrix_log%28%5B%5B1%2C%200%5D%2C%20%5B0%2C%201%5D%5D%29)

## Related functions

- [matrix_power](https://hilberon.com/library/matrix_power)

  A square matrix to a whole power.
- [matrix_function](https://hilberon.com/library/matrix_function)

  A function of a square matrix.
- [matrix_exp](https://hilberon.com/library/matrix_exp)

  Exponential of a square matrix.
- [identity_matrix](https://hilberon.com/library/identity_matrix)

  Identity matrix of a given size.
- [hilbert_matrix](https://hilberon.com/library/hilbert_matrix)

  Hilbert matrix of a given size: the entry in row i and column j is 1/(i + j - 1).
- [diagonal_matrix](https://hilberon.com/library/diagonal_matrix)

  A matrix with the given list on its diagonal and zeros elsewhere.

---
Source: https://hilberon.com/library/matrix_log
