Mathwords logoMathwords

Tensor Product — Definition, Formula & Examples

The tensor product combines two vectors (or more general objects) into a higher-dimensional object that captures every possible pairing of their components. For two vectors, the result is a matrix whose entries are all products of one component from each vector.

Given vectors uRm\mathbf{u} \in \mathbb{R}^m and vRn\mathbf{v} \in \mathbb{R}^n, the tensor product uv\mathbf{u} \otimes \mathbf{v} is the m×nm \times n matrix with entries (uv)ij=uivj(\mathbf{u} \otimes \mathbf{v})_{ij} = u_i \, v_j. More generally, for vector spaces VV and WW over a field FF, the tensor product VWV \otimes W is a vector space spanned by elements vwv \otimes w subject to bilinearity: (αv)w=v(αw)=α(vw)(\alpha v) \otimes w = v \otimes (\alpha w) = \alpha(v \otimes w) and distributivity over addition.

Key Formula

uv=uvT=(u1v1u1v2u1vnu2v1u2v2u2vnumv1umv2umvn)\mathbf{u} \otimes \mathbf{v} = \mathbf{u}\,\mathbf{v}^T = \begin{pmatrix} u_1 v_1 & u_1 v_2 & \cdots & u_1 v_n \\ u_2 v_1 & u_2 v_2 & \cdots & u_2 v_n \\ \vdots & \vdots & \ddots & \vdots \\ u_m v_1 & u_m v_2 & \cdots & u_m v_n \end{pmatrix}
Where:
  • u\mathbf{u} = A vector in \mathbb{R}^m
  • v\mathbf{v} = A vector in \mathbb{R}^n
  • uiu_i = The i-th component of u
  • vjv_j = The j-th component of v

How It Works

To compute the tensor product of two vectors, multiply every component of the first vector by every component of the second. Arrange the results into a matrix where rows correspond to the first vector and columns to the second. Unlike the dot product (which returns a scalar) or the cross product (which returns a vector), the tensor product increases dimensionality. If u\mathbf{u} has mm components and v\mathbf{v} has nn components, the result is an m×nm \times n matrix — equivalently called the outer product in this vector-to-vector case.

Worked Example

Problem: Compute the tensor product of u = (2, 3) and v = (1, 4, 5).
Step 1: Set up the outer product matrix by multiplying each component of u with each component of v.
uv=(23)(145)\mathbf{u} \otimes \mathbf{v} = \begin{pmatrix} 2 \\ 3 \end{pmatrix} \begin{pmatrix} 1 & 4 & 5 \end{pmatrix}
Step 2: Compute each entry: row 1 gives (2·1, 2·4, 2·5) and row 2 gives (3·1, 3·4, 3·5).
uv=(281031215)\mathbf{u} \otimes \mathbf{v} = \begin{pmatrix} 2 & 8 & 10 \\ 3 & 12 & 15 \end{pmatrix}
Answer: The tensor product is the 2×3 matrix [[2, 8, 10], [3, 12, 15]].

Why It Matters

Tensor products appear throughout physics and engineering — stress tensors in mechanics, quantum state spaces in quantum computing, and feature interactions in machine learning all rely on them. In a linear algebra or abstract algebra course, understanding tensor products is essential for working with multilinear maps and higher-dimensional data representations.

Common Mistakes

Mistake: Confusing the tensor product with the dot product or cross product.
Correction: The dot product of two vectors yields a scalar, the cross product yields a vector (in 3D), but the tensor product yields a matrix (or higher-order tensor). They are fundamentally different operations with different output types.

Related Terms