Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Outer Product Matrix Dimensions
3 x 2
rows x columns (m x n)
4 5
8 10
12 15
Rows (m) 3
Columns (n) 2
Definition C[i][j] = a_i × b_j

What is the vector outer product?

The outer product (also called the tensor product or dyadic product) of two vectors combines a length-m vector a and a length-n vector b into an m x n matrix C. Each entry is simply the product of one component of a and one component of b: \((\mathbf{a} \otimes \mathbf{b})_{ij} = a_i\, b_j\). Unlike the dot (inner) product, which collapses two vectors into a single number, the outer product expands them into a full matrix. This is pure linear algebra and applies everywhere — no region-specific rules.

How to use this calculator

Type the components of vector a, one number per line (or separated by commas), then do the same for vector b. The vectors do not need to be the same length. Choose how many decimal places to display, then submit. The result shows the dimensions (m x n) plus the full matrix grid. Negative, fractional, and zero values are all supported.

The formula explained

If a is treated as a column vector (m x 1) and b as a row vector (1 x n, the transpose of b), then $$\mathbf{a} \otimes \mathbf{b} = \mathbf{a}\,\mathbf{b}^{\top} = \begin{bmatrix} a_1 b_1 & a_1 b_2 & \cdots & a_1 b_n \\ a_2 b_1 & a_2 b_2 & \cdots & a_2 b_n \\ \vdots & \vdots & \ddots & \vdots \\ a_m b_1 & a_m b_2 & \cdots & a_m b_n \end{bmatrix}$$ Multiplying an m x 1 by a 1 x n yields an m x n matrix. The number of rows equals the length of a; the number of columns equals the length of b. The resulting matrix always has rank 1 (rank 0 if either vector is all zeros).

Advertisement
Column vector a times row vector b transpose producing an m by n grid of products
The outer product multiplies a column vector a by a row vector b^T to form an m x n matrix.

Worked example

Let a = [1, 2, 3] (m = 3) and b = [4, 5] (n = 2). Then C is 3 x 2:
Row 1: \(1\times 4 = 4\), \(1\times 5 = 5\)
Row 2: \(2\times 4 = 8\), \(2\times 5 = 10\)
Row 3: \(3\times 4 = 12\), \(3\times 5 = 15\)
So C = [[4, 5], [8, 10], [12, 15]], with rows = 3 and cols = 2.

Grid showing each matrix entry as the product of a row factor and a column factor
Each entry C[i][j] equals a_i times b_j.

FAQ

Do both vectors need the same length? No. The outer product produces an m x n matrix for any lengths m and n. Requiring equal length is a feature of the inner (dot) product, not the outer product.

Is the outer product commutative? No. Swapping the inputs transposes the result: \(\mathbf{a} \otimes \mathbf{b} = (\mathbf{b} \otimes \mathbf{a})^{\top}\).

How is this different from the cross product? The cross product is defined only for 3D vectors and returns a vector. The outer product works for any dimensions and returns a matrix.

Last updated: