# Null space of a matrix (null_space)

A basis of the null space of a matrix: the vectors v with A v = 0.

## How to write it

### null_space(matrix)

**matrix**

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

## Examples

- $\displaystyle \ker \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix} = \begin{pmatrix} -2 & 1 \end{pmatrix}$

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

  In the solver, `null_space([[1, 2], [2, 4]])` gives `[[-2, 1]]`.

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

## Related functions

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

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

  A vector scaled to length 1.
- [pseudo_inverse](https://hilberon.com/library/pseudo_inverse)

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

  Length of a vector.
- [qr_decomposition](https://hilberon.com/library/qr_decomposition)

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

  The matrix of minors: the determinant left when each row and column is removed.

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