Tensor Product Calculator

Enter two vectors to compute their tensor (outer) product uᵢvⱼ — the resulting m×n matrix, its flattened Kronecker-product form, and a norm check.

Quick Facts

Definition
(u⊗v)ᵢⱼ = uᵢ · vⱼ
Each entry of the result is a product of one entry from u and one from v.
Result size
m × n matrix
A length-m vector tensored with a length-n vector produces mn numbers.
Norm identity
‖u⊗v‖ = ‖u‖ · ‖v‖
The magnitude of the tensor product equals the product of the two vector magnitudes.
Not symmetric
u⊗v ≠ v⊗u
Swapping the vectors swaps the matrix shape: v⊗u = (u⊗v)ᵀ.

Your Results

Calculated
Result Dimensions
-
Rows = length of u, columns = length of v
Tensor Product Matrix
-
(u⊗v)ᵢⱼ = uᵢ · vⱼ, one row per entry of u
Flattened Vector (Kronecker form)
-
Row-major flatten — matches the Kronecker product u⊗v
Norm Check
-
‖u⊗v‖ compared with ‖u‖·‖v‖

Ready

Enter two vectors, then press Calculate.

How the Tensor Product of Two Vectors Works

For a vector u with m entries and a vector v with n entries, the tensor product u⊗v (also called the outer product) is the m×n matrix built from every possible pairing of one entry from u and one entry from v: the entry in row i, column j is uᵢ · vⱼ. Unlike the dot product, u and v do not need to be the same length — the tensor product is defined for any two vectors and always produces an m×n matrix with m·n total entries.

Formula and method

This calculator parses your two comma-separated vectors u = (u₁, ..., uₘ) and v = (v₁, ..., vₙ), then builds the m×n matrix T where Tᵢⱼ = uᵢ · vⱼ. In matrix notation this is the same as u vᵀ, treating u as a column vector and v as a row vector. The tool also lists the result flattened row by row into a single length-mn vector — that flattened list is identical to the standard Kronecker product u⊗v of the two vectors written as columns, so this calculator doubles as a Kronecker product calculator for vectors.

Common sources of error

  • Confusing it with the dot product: the dot product needs equal-length vectors and returns one number; the tensor product works for any lengths and returns a full m×n matrix.
  • Getting the order backwards: u⊗v and v⊗u are generally different — they even have different shapes (m×n versus n×m) unless m = n, and even then the entries differ unless u = v.
  • Rounding early: multiply the raw entries first and round only the final matrix, since rounding uᵢ or vⱼ before multiplying compounds error across every one of the mn output entries.

Checking your result

Two quick sanity checks catch most mistakes. First, count entries: the result should have exactly m × n numbers, one row per entry of u and one column per entry of v. Second, use the norm identity ‖u⊗v‖ = ‖u‖ · ‖v‖ — compute the Euclidean length of u, the Euclidean length of v, multiply them, and confirm it matches the Euclidean length of the flattened result. If either check fails, recheck how the vectors were entered.

Applications

The vector tensor (outer) product shows up whenever a system's state is built by combining two independent pieces: in quantum mechanics, the joint state of two independent systems lives in the tensor product of their individual state spaces; in machine learning, outer products build low-rank weight updates, bilinear feature crosses, and attention score matrices; in image and signal processing, separable 2D filters are constructed as the outer product of two 1D filters; and in statistics, the outer product of a vector with itself, u⊗u, produces a rank-one covariance-style matrix.

Frequently Asked Questions

What is the tensor product of two vectors?
For vectors u (length m) and v (length n), the tensor product u⊗v is the m×n matrix whose entry in row i, column j equals uᵢ·vⱼ. It is also called the outer product, written u⊗v = uvᵀ.
How is the tensor product different from the dot product?
The dot product requires two vectors of the same length and returns a single scalar (the sum of uᵢvᵢ). The tensor product works for vectors of any lengths and returns an m×n matrix of every pairwise product uᵢvⱼ, not just matching-index pairs.
Is the tensor product commutative?
No. u⊗v is an m×n matrix while v⊗u is an n×m matrix, so they generally have different shapes and are not equal. They are related by a transpose: v⊗u = (u⊗v)ᵀ.
How does this relate to the Kronecker product?
Flattening the m×n outer-product matrix row by row gives exactly the same mn-entry vector as the standard Kronecker product u⊗v of the two column vectors, so this calculator's flattened result and the Kronecker product are identical.