Definition
Tensor Product
Properties
\begin{alignat*}{3} \text{I.}\qquad &\lambda (v \otimes w) &=\;& (\lambda v) \otimes w &=\;& v \otimes (\lambda w) \qquad &\lambda \in \mathbb{C} \\ \text{II.}\qquad & (v + v') \otimes w &=\;& v \otimes w + v' \otimes w \\ \text{III.}\qquad & v \otimes (w + w') &=\;& v \otimes w + v \otimes w' \end{alignat*}Einsum
Einsum notation can express the tensor product by keeping both pairs of indices separate:
In code, this is similar to
einsum('ij,kl->ikjl', A, B)The result can then be reshaped into the usual matrix form of the tensor product.
Example
Example
For
the tensor product is