Kronecker Product Calculator
Compute the Kronecker product, also known as the matrix tensor product, by multiplying each entry of one matrix by the entire second matrix. The result is a larger block matrix used in linear algebra, systems theory, and applied mathematics.
A
B
Learn About Kronecker Matrix Product
Definition and Block Tensor Structure
The Kronecker product (also known as the matrix tensor product), denoted $\mathbf{A} \otimes \mathbf{B}$, is an operation on two matrices of arbitrary dimensions that produces a block matrix. If $\mathbf{A}$ is an $m \times n$ matrix and $\mathbf{B}$ is a $p \times q$ matrix, their Kronecker product $\mathbf{C} = \mathbf{A} \otimes \mathbf{B}$ is an $(mp) \times (nq)$ block matrix formed by multiplying each entry $a_{ij}$ of $\mathbf{A}$ by the entire matrix $\mathbf{B}$:
Unlike standard matrix multiplication, the Kronecker product does not require inner dimensions to match; it applies to any two matrices regardless of their shape.
Fundamental Algebraic Properties
- Mixed-Product Property: If matrix dimensions allow standard multiplication, then:
- Transpose Distribution: $(\mathbf{A} \otimes \mathbf{B})^T = \mathbf{A}^T \otimes \mathbf{B}^T$
- Inverse Rule: If $\mathbf{A}$ and $\mathbf{B}$ are invertible:
- Trace Product: For square matrices $\mathbf{A}$ and $\mathbf{B}$:
- Determinant Power Rule: If $\mathbf{A}$ is $m \times m$ and $\mathbf{B}$ is $p \times p$:
- Eigenvalue Spectrum: If $\mathbf{A}$ has eigenvalues $\lambda_1, \dots, \lambda_m$ and $\mathbf{B}$ has eigenvalues $\mu_1, \dots, \mu_p$, the $mp$ eigenvalues of $\mathbf{A} \otimes \mathbf{B}$ are all pairwise products:
Non-Commutativity
The Kronecker product is generally non-commutative:
However, $\mathbf{A} \otimes \mathbf{B}$ and $\mathbf{B} \otimes \mathbf{A}$ are permutation-equivalent: there exist permutation matrices $\mathbf{P}$ and $\mathbf{Q}$ such that $\mathbf{B} \otimes \mathbf{A} = \mathbf{P}(\mathbf{A} \otimes \mathbf{B})\mathbf{Q}$.
Worked Numerical Example
Compute $\mathbf{A} \otimes \mathbf{B}$ for $\mathbf{A} = \begin{bmatrix} 1 & 2 \\ 0 & -1 \end{bmatrix}$ and $\mathbf{B} = \begin{bmatrix} 3 & 0 \\ 1 & 4 \end{bmatrix}$:
Expand into the resulting $4 \times 4$ matrix:
1. Why do the dimensions multiply rather than add?
Because each single entry of the $m \times n$ matrix $\mathbf{A}$ is replaced by an entire $p \times q$ block of matrix $\mathbf{B}$. Having $m$ block rows, each containing $p$ scalar rows, yields $m \cdot p$ total rows. Similarly, $n$ block columns of width $q$ produce $n \cdot q$ total columns.
2. What is the difference between the Kronecker product and the outer product?
The outer product of two column vectors $\mathbf{u} \in \mathbb{R}^m$ and $\mathbf{v} \in \mathbb{R}^n$ is an $m \times n$ matrix $\mathbf{u}\mathbf{v}^T$. The Kronecker product of two column vectors $\mathbf{u} \otimes \mathbf{v}$ produces an $(mn) \times 1$ long column vector. In fact, vectorizing an outer product satisfies $\operatorname{vec}(\mathbf{u}\mathbf{v}^T) = \mathbf{v} \otimes \mathbf{u}$.
3. How is the Kronecker product used to solve matrix equations?
In control theory and linear systems, equations like the Sylvester equation $\mathbf{A}\mathbf{X} + \mathbf{X}\mathbf{B} = \mathbf{C}$ or Lyapunov equation $\mathbf{A}\mathbf{X} + \mathbf{X}\mathbf{A}^T = \mathbf{Q}$ are solved by flattening matrix $\mathbf{X}$ into a vector $\operatorname{vec}(\mathbf{X})$. Using the identity $\operatorname{vec}(\mathbf{A}\mathbf{X}\mathbf{B}) = (\mathbf{B}^T \otimes \mathbf{A})\operatorname{vec}(\mathbf{X})$, the matrix equation converts into a standard linear system $(\mathbf{I} \otimes \mathbf{A} + \mathbf{B}^T \otimes \mathbf{I})\operatorname{vec}(\mathbf{X}) = \operatorname{vec}(\mathbf{C})$.
1. Quantum Computing and Entanglement
In quantum mechanics, quantum bits (qubits) combine via the Kronecker product. If qubit 1 is in state $|\psi\rangle = \begin{bmatrix} \alpha \\ \beta \end{bmatrix}$ and qubit 2 is in state $|\phi\rangle = \begin{bmatrix} \gamma \\ \delta \end{bmatrix}$, their combined 2-qubit state space is the Kronecker tensor product:
Quantum logic operations on multiple qubits (such as applying Hadamard gates to two qubits simultaneously, $\mathbf{H} \otimes \mathbf{H}$) are computed directly via Kronecker products of $2 \times 2$ unitary matrices.
2. Fast Transforms in Signal Processing
The Fast Fourier Transform (FFT) and discrete wavelet transforms can be factored into sparse Kronecker products of small butterflies and identity matrices. This Kronecker factorization provides the exact algorithmic structure that accelerates discrete Fourier transforms from $O(n^2)$ to $O(n \log n)$.