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
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 dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Tensor Product' tool for free! Thank you!

Tensor Product

Vector Tensor Product ⊗


Loading...
(if this message do not disappear, try to refresh this page)

Loading...
(if this message do not disappear, try to refresh this page)

Matrix Tensor Product ⊗


Loading...
(if this message do not disappear, try to refresh this page)

Loading...
(if this message do not disappear, try to refresh this page)

Answers to Questions (FAQ)

What is a tensor product? (Definition)

The tensor product is a method for multiplying linear maps that computes the outer product of every pair of tensors.

With matrices/vectors/tensors, the tensor product is also called the Kronecker product.

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 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 $ [ a_{i} ] \otimes [ b_{j} ] ^ T $ by converting vectors to matrices by transposing the second vector so as to have a row vector and a column vector.

The resulting tensor will have dimensions of the multiplication of the number of elements in the original vectors.

$$ \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} $$

Example: $$ \begin{bmatrix} 1 \\ 2 \end{bmatrix} \otimes \begin{bmatrix} 3 & 4 \end{bmatrix} = \begin{bmatrix} 3 & 4 \\ 6 & 8 \end{bmatrix} $$

Source code

dCode retains ownership of the "Tensor Product" source code. Any algorithm for the "Tensor Product" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Tensor Product" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Tensor Product" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Tensor Product" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/tensor-product
In a scientific article or book, the recommended bibliographic citation is: Tensor Product on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/tensor-product

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Tensor Product' tool for free! Thank you!


https://www.dcode.fr/tensor-product
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback