# Matrix inverse (inverse)

Inverse of a square matrix.

With this function, the solver shows the steps whenever it finds them.

## How to write it

### inverse(matrix)

**matrix**

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

## Examples

- $\displaystyle \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}^{-1} = \begin{pmatrix} -2 & 1 \\ \frac{3}{2} & -\frac{1}{2} \end{pmatrix}$

  `inverse([[1, 2], [3, 4]])`

  In the solver, `inverse([[1, 2], [3, 4]])` gives `[[-2, 1], [3/2, -1/2]]`.

  [Open in the solver](https://hilberon.com/?q=inverse%28%5B%5B1%2C%202%5D%2C%20%5B3%2C%204%5D%5D%29)

## Related functions

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

  Moore-Penrose pseudo-inverse of a matrix.
- [jordan_decomposition](https://hilberon.com/library/jordan_decomposition)

  Jordan decomposition of a square matrix: the matrix of generalized eigenvectors and the Jordan form.
- [identity_matrix](https://hilberon.com/library/identity_matrix)

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

  Jordan normal form of a square matrix.
- [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).
- [kronecker_product](https://hilberon.com/library/kronecker_product)

  Kronecker product of two matrices.

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