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
tensor_product([1, 2], [3, 4])In the solver,
Open in the solvertensor_product([1, 2], [3, 4])gives[[3, 4], [6, 8]].
Related functions
- kronecker_product
Kronecker product of two matrices.
- trace
Trace of a square matrix: the sum of its diagonal.
- smith_decomposition
Smith normal form of an integer matrix, with the two matrices that reach it.
- transpose
Transpose of a matrix: its rows become its columns.
- singular_value_list
The singular values of a matrix.
- upper_triangularize
A matrix with the entries below the diagonal set to zero.