Matrix Calculator

🌐 English
A (3×3)
Rows: 3
Cols: 3
B (3×3)
Rows: 3
Cols: 3
Supports: fractions (1/2), decimals (0.5), constants (pi, e). Empty cells are treated as 0.

Calculation Results

1. Definition & formula

The Kronecker product (also called tensor product, denoted $\otimes$) of an $m\times n$ matrix $A=[a_{ij}]$ and a $p\times q$ matrix $B$ is the block matrix:

$$ A \otimes B = \begin{bmatrix} a_{11}B & a_{12}B & \cdots & a_{1n}B \\ a_{21}B & a_{22}B & \cdots & a_{2n}B \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1}B & a_{m2}B & \cdots & a_{mn}B \end{bmatrix}, $$

The result has size $(mp)\times(nq)$. Each entry $a_{ij}$ of $A$ multiplies the entire matrix $B$ to form the corresponding block.

2. Useful properties

  • Mixed-product property: $(A\otimes B)(C\otimes D) = (AC)\otimes(BD)$ when dimensions are compatible.
  • Transpose: $(A\otimes B)^{T} = A^{T}\otimes B^{T}$.
  • Associativity: $(A\otimes B)\otimes C = A\otimes(B\otimes C)$ (up to natural reshaping).
  • Scalar multiple: $(\alpha A)\otimes B = A\otimes(\alpha B) = \alpha (A\otimes B)$.
  • Eigenvalues: If $A v = \lambda v$ and $B w = \mu w$, then $(A\otimes B)(v\otimes w) = (\lambda\mu)(v\otimes w)$.

3. Worked examples

Example 1 — small matrices

$$ A = \begin{pmatrix}1 & 2\\ 3 & 4\end{pmatrix},\quad B = \begin{pmatrix}0 & 5\\ 6 & 7\end{pmatrix} $$

Compute $A\otimes B$ by replacing each $a_{ij}$ with $a_{ij}B$:

$$ A\otimes B = \begin{bmatrix} 1\cdot B & 2\cdot B \\ 3\cdot B & 4\cdot B \end{bmatrix} = \begin{bmatrix} 0 & 5 & 0 & 10 \\ 6 & 7 & 12 & 14 \\ 0 & 15 & 0 & 20 \\ 18 & 21 & 24 & 28 \end{bmatrix}. $$

Result is $(2\cdot2)\times(2\cdot2)=4\times4$.

Example 2 — with vector

$$ A = \begin{pmatrix}2 & 0\\ 1 & 3\end{pmatrix},\quad B = \begin{pmatrix}1 & 2\end{pmatrix} $$

$B$ is $1\times2$, $A\otimes B$ is $(2\cdot1)\times(2\cdot2)=2\times4$:

$$ A\otimes B = \begin{bmatrix} 2B & 0B \\ 1B & 3B \end{bmatrix} = \begin{bmatrix} 2 & 4 & 0 & 0 \\ 1 & 2 & 3 & 6 \end{bmatrix}. $$

4. Common mistakes

  • Confusing element-wise multiply with Kronecker product: Kronecker creates large block matrices, not entrywise multiplication.
  • Expecting same size: $A\otimes B$ rarely has the same dimension as $A$ or $B$ unless one is $1\times1$.
  • Forgetting block order: Blocks follow row-major order of $A$ — each row of $A$ creates a block row of $B$-blocks.
  • Mismatching dimensions when using mixed-product property: ensure matrix multiplications $AC$ and $BD$ are valid before applying the property.
  • Indexing mistakes: when programming, carefully map $(i,j)$ in $A$ to blocks of size $p\times q$ in the result.

5. Practice problems

Try these Kronecker product problems. Click Show Answer to reveal the result.

Exercise 1

$$ A=\begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix},\quad B=\begin{pmatrix}2 & 3\\ 4 & 5\end{pmatrix} $$
Show Answer
$$ A\otimes B = \begin{pmatrix} 2 & 3 & 0 & 0\\ 4 & 5 & 0 & 0\\ 0 & 0 & 2 & 3\\ 0 & 0 & 4 & 5 \end{pmatrix}. $$

Exercise 2

$$ A=\begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix},\quad B=\begin{pmatrix}1 & 1\\ 0 & 2\end{pmatrix} $$
Show Answer
$$ A\otimes B = \begin{pmatrix} 0\cdot B & 1\cdot B\\ 1\cdot B & 0\cdot B \end{pmatrix} = \begin{pmatrix} 0 & 0 & 1 & 1\\ 0 & 0 & 0 & 2\\ 1 & 1 & 0 & 0\\ 0 & 2 & 0 & 0 \end{pmatrix}. $$

Exercise 3

$$ A=\begin{pmatrix}1 & 2 & 3\end{pmatrix},\quad B=\begin{pmatrix}4\\ 5\end{pmatrix} $$
Show Answer

Here $A$ is $1\times3$, $B$ is $2\times1$, so $A\otimes B$ is $(1\cdot2)\times(3\cdot1)=2\times3$:

$$ A\otimes B = \begin{pmatrix} 1\cdot B & 2\cdot B & 3\cdot B \end{pmatrix} = \begin{pmatrix} 4 & 8 & 12 \\ 5 & 10 & 15 \end{pmatrix}. $$

Exercise 4

$$ A=\begin{pmatrix}2 & -1\\ 0 & 3\end{pmatrix},\quad B=\begin{pmatrix}1 & 0\\ 0 & -1\end{pmatrix} $$
Show Answer
$$ A\otimes B = \begin{pmatrix} 2B & -1B \\ 0B & 3B \end{pmatrix} = \begin{pmatrix} 2 & 0 & -1 & 0 \\ 0 & -2 & 0 & 1 \\ 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & -3 \end{pmatrix}. $$

Carefully multiply scalar blocks; keep block positions aligned with $A$'s entries.


Copyright Notice: This article is original content from the Matrix Calculator website. Please credit the source when sharing or reproducing it. For more matrix computation tools, visit matrixcalcu.com.

Learn matrix multiplication more easily in just 2 minutes with this free game.

Matrix Multiplication Game