Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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])=(3468)\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