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.