TensorProduct[tensor1,tensor2,…]
represents the tensor product of the tensori.
TensorProduct
TensorProduct[tensor1,tensor2,…]
represents the tensor product of the tensori.
Details
- TensorProduct[a,b] can be input as ab. The character is entered as
t*
or \[TensorProduct]. - The tensor product a1…an of rectangular arrays ai is equivalent to Outer[Times, a1,…,an].
- The tensor product t1…tn of arrays and/or symbolic tensors is interpreted as another tensor of rank TensorRank[t1]+…+TensorRank[tn].
- TensorProduct[] returns 1. TensorProduct[x] returns x.
- TensorProduct is an associative, non-commutative product of tensors.
Examples
open all close allBasic Examples (2)
TensorProduct[{2, 3}, {{a, b}, {c, d}}, {x, y}]Tensor product of symbolic expressions:
TensorProduct[a + 2b, c]%//TensorExpandCompute properties of tensorial expressions:
Assuming[(a | b | c)∈Vectors[dim], TensorDimensions[%]]Scope (4)
Tensor product of arrays of any depth and dimensions:
array1 = RandomInteger[10, {2, 5}]array2 = RandomInteger[10, {3, 4}]array1array2%//DimensionsProduct of symmetrized arrays, with the result also in symmetrized form:
A = SymmetrizedArray[{{a, b}, {b, c}}]TensorSymmetry[A]AAThe fact that both arrays are the same adds more symmetry:
TensorSymmetry[%]There are only six nonzero independent components:
SymmetrizedArrayRules[%%]Tensor product of symbolic expressions:
$Assumptions = {T∈Arrays[{4, 4, 3}, Reals, Antisymmetric[{1, 2}]]}TTTTTensorRank[%]Tensor product of objects of different types. Contiguous arrays are multiplied:
A{a, b}{x, y}AAProperties & Relations (11)
The tensor product is not commutative:
TensorProduct[{a, b}, {x, y}]TensorProduct[{x, y}, {a, b}]The difference is always some transposition:
%% === Transpose[%]The tensor product of arrays is equivalent to the use of Outer:
array1 = RandomInteger[10, {2, 5}]array2 = RandomInteger[10, {3, 4}]array1array2array1 === Outer[Times, array1, array2, array1]The KroneckerProduct of vectors is equivalent to their TensorProduct:
vec1 = {x, y, z};
vec2 = {a, b};
KroneckerProduct[vec1, vec2] === TensorProduct[vec1, vec2]The KroneckerProduct of matrices is equivalent to the flattening of their TensorProduct to another matrix:
mat1 = Array[a, {2, 3}];
mat2 = Array[b, {4, 5}];
KroneckerProduct[mat1, mat2] === ArrayFlatten[TensorProduct[mat1, mat2]]The KroneckerProduct of any two arrays is also equivalent to a flattening of their TensorProduct:
arr1 = Array[a, {2, 3, 4, 5}];
arr2 = Array[b, {4, 6}];
KroneckerProduct[arr1, arr2] === ArrayFlatten[TensorProduct[arr1, arr2], 3]The rank of a tensor product is the sum of ranks of the factors:
TensorProduct[a, b, c]TensorRank[%]The tensor product of a tensor with itself gives a result with added symmetry:
$Assumptions = A∈Arrays[{3, 3}];TensorProduct[A, A]//TensorSymmetryTensorProduct[x] returns x irrespectively of what x is:
TensorProduct[I]TensorProduct[] is 1:
TensorProduct[]Obvious scalars are extracted from a tensor product:
TensorProduct[3, v, -2, w]Symbolic scalars need to be specified with assumptions:
Assuming[x∈Reals, vxw]TensorProduct has Flat attribute:
TensorProduct[a, TensorProduct[b, c]]//FullFormTensorProduct[a, b, c, d] /. TensorProduct[b, c] -> eTensorProduct, in combination with TensorContract, can be used to implement Dot:
v = Array[x, {3}];
a = Array[y, {3, 3, 3}];
m = Array[z, {3, 3}];v.a.m == TensorContract[vam, {{1, 2}, {4, 5}}]//SimplifyAntisymmetrization of TensorProduct is proportional to TensorWedge:
v = RandomInteger[10, 3]w = RandomInteger[10, 3]Symmetrize[vw, Antisymmetric[{1, 2}]]2% === vwSee Also
Outer TensorWedge KroneckerProduct Inner Dot
Characters: \[TensorProduct]
Function Repository: QuantumTensorProduct ToTensor
Tech Notes
Related Guides
History
Text
Wolfram Research (2012), TensorProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/TensorProduct.html.
CMS
Wolfram Language. 2012. "TensorProduct." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TensorProduct.html.
APA
Wolfram Language. (2012). TensorProduct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TensorProduct.html
BibTeX
@misc{reference.wolfram_2026_tensorproduct, author="Wolfram Research", title="{TensorProduct}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/TensorProduct.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tensorproduct, organization={Wolfram Research}, title={TensorProduct}, year={2012}, url={https://reference.wolfram.com/language/ref/TensorProduct.html}, note=[Accessed: 13-June-2026]}