🧮
🧮 Math & statistics

Tensor Product Calculator (Kronecker product A ⊗ B of two matrices)

Results update as you type.

Your numbers

Understanding the tensor product calculator — concept and principle

This calculator computes the Kronecker (tensor) product A ⊗ B of two matrices, and also B ⊗ A to show that the order matters. It gives the size of the result and the number of entries. Use it for quantum computing (combining qubit states and gates), linear algebra, vectorising matrix equations, and signal and image processing.

Kronecker product of two 2×2 matricesEach entry of A scales a copy of BA1234B0567⊗05010671214015020182124281·B │ 2·B / 3·B │ 4·B2×2 ⊗ 2×2 → 4×4, 16 entries · B ⊗ A differs
Block (i, j) of A ⊗ B is aᵢⱼ·B: the top-right block is 2·B = [0 10; 12 14].

How it is calculated

For an m × n matrix A and a p × q matrix B, A ⊗ B is the mp × nq block matrix

[a₁₁B a₁₂B …; a₂₁B a₂₂B …; …]

Each entry aᵢⱼ is replaced by aᵢⱼ times a full copy of B. Entry by entry, the element in row p(i − 1) + k and column q(j − 1) + l equals aᵢⱼ·bₖₗ. Any sizes can be combined. Inputs are limited to 4 × 4 each so the result stays readable.

The principle

The Kronecker product builds a matrix that acts on pairs of things at once. If A transforms one vector x and B transforms another y, then A ⊗ B transforms their combined vector x ⊗ y exactly as (Ax) ⊗ (By). In quantum computing, a two-qubit state is the tensor product of single-qubit states, and applying gates to each qubit separately is the Kronecker product of the gates. The product is not commutative: B ⊗ A contains the same numbers in a different arrangement, related to A ⊗ B by reordering rows and columns.

Worked example

Default: A = [1 2; 3 4], B = [0 5; 6 7].

  1. Top-left block 1·B = [0 5; 6 7]; top-right 2·B = [0 10; 12 14].
  2. Bottom-left 3·B = [0 15; 18 21]; bottom-right 4·B = [0 20; 24 28].
  3. A ⊗ B = [0 5 0 10; 6 7 12 14; 0 15 0 20; 18 21 24 28].
  4. Size 4 × 4, 16 entries.
  5. B ⊗ A = [0 0 5 10; 0 0 15 20; 6 12 7 14; 18 24 21 28], different from A ⊗ B.

How to read the result

The result is organised in blocks, one for each entry of A. Useful properties: (A ⊗ B)(C ⊗ D) = AC ⊗ BD when the sizes fit; (A ⊗ B)ᵀ = Aᵀ ⊗ Bᵀ; and for square matrices, det(A ⊗ B) = det(A)^p·det(B)^n, with n and p the sizes of A and B. The eigenvalues of A ⊗ B are all products of an eigenvalue of A and one of B.

Common mistakes

Keep in mind: The size grows quickly: two 4 × 4 matrices give a 16 × 16 result. Large Kronecker products are usually handled symbolically or with special algorithms rather than formed explicitly.

Frequently asked questions

Is the tensor product the same as the Kronecker product?

For matrices in standard bases, the Kronecker product is the matrix of the tensor product of the two linear maps.

How is it used in quantum computing?

Multi-qubit states and gates acting on separate qubits are built with Kronecker products.

What size is A ⊗ B?

If A is m × n and B is p × q, the result is mp × nq.

Sources: Wolfram MathWorld, "Kronecker Product"

Checked 9 Nov 2026. Wolfram MathWorld, “Kronecker Product” (C = A ⊗ B is an (mp)×(nq) matrix with c(αβ) = a(ij)·b(kl), α = p(i − 1) + k, β = q(j − 1) + l; block form [a₁₁B a₁₂B; a₂₁B a₂₂B]; (Ax) ⊗ (By) = (A ⊗ B)(x ⊗ y)).

🧮 All math & statistics tools →🌍 Calculators by country →