Search for a tool
Tensor Product

Tool to perform a tensor product calculation, a kind of multiplication applicable on tensors, vectors or matrices.

Results

Tensor Product -

Tag(s) : Matrix

Share dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

Please, check our community Discord for help requests!

Thanks to your feedback and relevant comments, dCode has developped the best 'Tensor Product' tool, so feel free to write! Thank you !

# Tensor Product

## Vector Tensor Product ⊗

Tool to perform a tensor product calculation, a kind of multiplication applicable on tensors, vectors or matrices.

### How to calculate a tensor product of matrices?

From 2 matrices $A=\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}$ and $B=\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix}$ the tensor product noted $\otimes$ is calculated $$A \otimes B = \begin{bmatrix}a_{11}\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix}&a_{12}\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix} \\ a_{21}\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix} & a_{22}\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix}\end{bmatrix} = \begin{bmatrix}a_{11}b_{11}&a_{11}b_{12}&a_{12}b_{11}&a_{12}b_{12}\\a_{11}b_{21}&a_{11}b_{22}&a_{12}b_{21}&a_{12}b_{22}\\a_{21}b_{11}&a_{21}b_{12}&a_{22}b_{11}&a_{22}b_{12}\\a_{21}b_{21}&a_{21}b_{22}&a_{22}b_{21}&a_{22}b_{22}\end{bmatrix}$$

### How to calculate a tensor product of vectors?

From de 2 vectors $\vec{a} = \begin{bmatrix}a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix}$ and $\vec{b} = \begin{bmatrix}b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix}$ the tensor product noted $\otimes$ is calculated $$\vec{a} \otimes \vec{b} = \vec{a} . \vec{b}^T$$ ie. like a multiplication">matrix product but with the matrix transpose of the second vector.

$$\vec{a} \otimes \vec{b} = \begin{bmatrix}a_1 b_1 & a_1 b_2 & \cdots &a_1 b_m \\ a_2 b_1 & a_2 b_2&\cdots &a_2 b_m \\ \vdots & \vdots & \ddots & \vdots \\ a_n b_1 & a_n b_2 & \cdots & a_n b_m \end{bmatrix}$$

## Source code

dCode retains ownership of the online 'Tensor Product' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Tensor Product download for offline use on PC, tablet, iPhone or Android !

## Need Help ?

Please, check our community Discord for help requests!