# Pseudoinverse of a matrix (pseudo_inverse)

Moore-Penrose pseudo-inverse of a matrix.

## How to write it

### pseudo_inverse(matrix)

**matrix**

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

## Examples

- $\displaystyle \operatorname{pseudo\_inverse}\left(\begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}\right) = \begin{pmatrix} \frac{1}{25} & \frac{2}{25} \\ \frac{2}{25} & \frac{4}{25} \end{pmatrix}$

  `pseudo_inverse([[1, 2], [2, 4]])`

  In the solver, `pseudo_inverse([[1, 2], [2, 4]])` gives `[[1/25, 2/25], [2/25, 4/25]]`.

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

## Related functions

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

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

  QR decomposition of a matrix: an orthogonal factor and an upper triangular one.
- [orthogonalize](https://hilberon.com/library/orthogonalize)

  Orthonormal vectors spanning the same space as some vectors, by the Gram-Schmidt process.
- [rank](https://hilberon.com/library/rank)

  Rank of a matrix: the number of independent rows.
- [null_space](https://hilberon.com/library/null_space)

  A basis of the null space of a matrix: the vectors v with A v = 0.
- [row_reduce](https://hilberon.com/library/row_reduce)

  Reduced row echelon form of a matrix.

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