# tensor_product function

Tensor product of two lists or matrices.

## How to write it

### tensor_product(a, b)

**a**

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

**b**

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

## Examples

- $\displaystyle \operatorname{tensor\_product}(\left[ 1, 2 \right], \left[ 3, 4 \right]) = \begin{pmatrix} 3 & 4 \\ 6 & 8 \end{pmatrix}$

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

  In the solver, `tensor_product([1, 2], [3, 4])` gives `[[3, 4], [6, 8]]`.

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

## Related functions

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

  Kronecker product of two matrices.
- [trace](https://hilberon.com/library/trace)

  Trace of a square matrix: the sum of its diagonal.
- [smith_decomposition](https://hilberon.com/library/smith_decomposition)

  Smith normal form of an integer matrix, with the two matrices that reach it.
- [transpose](https://hilberon.com/library/transpose)

  Transpose of a matrix: its rows become its columns.
- [singular_value_list](https://hilberon.com/library/singular_value_list)

  The singular values of a matrix.
- [upper_triangularize](https://hilberon.com/library/upper_triangularize)

  A matrix with the entries below the diagonal set to zero.

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