# Cross product (cross)

Cross product of two vectors in three dimensions.

## How to write it

### cross(a, b)

**a**

A vector with three components. Takes a list.

**b**

A vector with three components. Takes a list.

## Examples

- $\displaystyle \left[ 1, 2, 3 \right] \times \left[ 4, 5, 6 \right] = \left[ -3, 6, -3 \right]$

  `cross([1, 2, 3], [4, 5, 6])`

  In the solver, `cross([1, 2, 3], [4, 5, 6])` gives `[-3, 6, -3]`.

  [Open in the solver](https://hilberon.com/?q=cross%28%5B1%2C%202%2C%203%5D%2C%20%5B4%2C%205%2C%206%5D%29)

## Related functions

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

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

  Cholesky decomposition of a symmetric positive definite matrix.
- [diagonal](https://hilberon.com/library/diagonal)

  The diagonal of a matrix, as a list.
- [characteristic_polynomial](https://hilberon.com/library/characteristic_polynomial)

  Characteristic polynomial of a square matrix in a variable.
- [diagonal_matrix](https://hilberon.com/library/diagonal_matrix)

  A matrix with the given list on its diagonal and zeros elsewhere.
- [adjugate](https://hilberon.com/library/adjugate)

  Adjugate of a square matrix: the transpose of its cofactors.

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