Kronecker Delta

δ_ij — definition, properties, identity matrix, and tensor contraction

Basic

Overview

The Kronecker delta is a function that returns 1 when its two indices are equal and 0 otherwise. It is a fundamental symbol in linear algebra, tensor analysis, and physics, named after Leopold Kronecker (1823–1891).

The Kronecker delta represents the entries of the identity matrix, and combined with Einstein's summation convention it is indispensable for writing tensor computations concisely.

Definition

Definition: Kronecker delta

The Kronecker delta $\delta_{ij}$ is defined for indices $i, j$ by

$$\delta_{ij} = \begin{cases} 1 & (i = j) \\ 0 & (i \neq j) \end{cases}$$

Concrete example

For $i, j = 1, 2, 3$: $$\delta_{11} = 1, \quad \delta_{12} = 0, \quad \delta_{13} = 0$$ $$\delta_{21} = 0, \quad \delta_{22} = 1, \quad \delta_{23} = 0$$ $$\delta_{31} = 0, \quad \delta_{32} = 0, \quad \delta_{33} = 1$$

Grid of δ_ij (i, j = 1, 2, 3, 4) j i 1 2 3 4 1 2 3 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 i = j → 1 i ≠ j → 0
Figure 1: grid representation of the Kronecker delta δ_ij. Diagonal cells (i = j) are 1 (green); the rest are 0 (grey), matching the entries of the identity matrix.

Relation to the identity matrix

The Kronecker delta is the $(i, j)$ entry of the $n \times n$ identity matrix $I$: $$I = (\delta_{ij})_{i,j=1}^{n} = \begin{pmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{pmatrix}$$

Properties

Basic properties

  • Symmetry: $\delta_{ij} = \delta_{ji}$
  • Idempotency: $\delta_{ij} \delta_{jk} = \delta_{ik}$ (summing over the repeated index)
  • Trace: $\displaystyle\sum_{i=1}^{n} \delta_{ii} = n$ (sum of diagonal entries)

Contraction rule

Contraction formula

Under Einstein summation, the Kronecker delta substitutes one index for another: $$\delta_{ij} v_j = v_i$$ In other words, contracting with δ replaces an index (the index substitution rule).

Contraction rule: δ_ij "substitutes" the index Expand δ₂ⱼ vⱼ (i = 2) j=1: δ₂₁ · v₁ = 0·v₁ j=2: δ₂₂ · v₂ = 1·v₂ j=3: δ₂₃ · v₃ = 0·v₃ δ kills the i ≠ j terms Result δ₂ⱼ vⱼ = v₂ General rule δᵢⱼ vⱼ = vᵢ "replace j with i" δᵢⱼ Aⱼₖ = Aᵢₖ δᵢⱼ δⱼₖ = δᵢₖ
Figure 2: the contraction rule for the Kronecker delta $\delta_{ij}\,v_j = v_i$. Multiplying $\delta_{ij}$ by $v_j$ and summing over the repeated index $j$ (i.e. contracting) kills all terms with $i \neq j$ (they vanish) and replaces $j$ with $i$.

Example: vector components

For a 3D vector $\mathbf{v} = (v_1, v_2, v_3)$, $$\delta_{ij} v_j = \delta_{i1}v_1 + \delta_{i2}v_2 + \delta_{i3}v_3 = v_i.$$

Relation to matrix products

The product of a matrix $A$ with the identity $I = (\delta_{ij})$ is $$(AI)_{ik} = \displaystyle\sum_{j} A_{ij} \delta_{jk} = A_{ik},$$ which is the entry-wise statement of $AI = A$.

Generalized Kronecker delta

Generalized Kronecker delta

The generalized Kronecker delta with multiple indices $\delta^{i_1 \cdots i_p}_{j_1 \cdots j_p}$ is

$$\delta^{i_1 \cdots i_p}_{j_1 \cdots j_p} = \begin{cases} +1 & (i_1, \ldots, i_p) \text{ is an even permutation of } (j_1, \ldots, j_p) \\ -1 & (i_1, \ldots, i_p) \text{ is an odd permutation of } (j_1, \ldots, j_p) \\ 0 & \text{otherwise} \end{cases}$$

For $p = 2$, $$\delta^{ij}_{kl} = \delta^i_k \delta^j_l - \delta^i_l \delta^j_k,$$ which appears in cross products and determinants.

Applications

Einstein notation

In tensor calculations, the Kronecker delta gives a concise notation for contractions: $$A^i_j B^j_k = C^i_k \quad \text{(matrix product)}$$ $$A_{ij} B^{ij} = \mathrm{Tr}(AB^T) \quad \text{(trace)}$$

Vector analysis

Components of a vector $\mathbf{a} = (a_1, a_2, a_3)$ in terms of a basis $\mathbf{e}_i$ read $$\mathbf{a} = \displaystyle\sum_{i=1}^{3} a_i \mathbf{e}_i = a_i \mathbf{e}_i$$ (the last equality uses Einstein notation). The basis satisfies the orthonormality condition $$\mathbf{e}_i \cdot \mathbf{e}_j = \delta_{ij}.$$

Quantum mechanics

For discrete eigenstates $|i\rangle$, the completeness relation $$\displaystyle\sum_i |i\rangle\langle i| = I$$ is accompanied by the orthonormality $\langle i | j \rangle = \delta_{ij}$.

Partial differential equations

The Kronecker delta acts as a discrete analogue of the Dirac delta function $\delta(x - y)$ and appears in finite-difference methods.

Graph theory

Given an adjacency matrix $A_{ij}$ and a degree matrix $D_{ii} = \displaystyle\sum_j A_{ij}$, the Laplacian matrix is $$L_{ij} = D_{ii}\delta_{ij} - A_{ij}.$$

Dirac delta function

For continuous variables, the analogous object is the Dirac delta function $\delta(x)$: $$\displaystyle\int_{-\infty}^{\infty} f(x) \delta(x - a) \, dx = f(a).$$ The Kronecker delta is its discrete counterpart.

Levi-Civita symbol

The Levi-Civita symbol $\varepsilon_{ijk}$ (the fully antisymmetric tensor) encodes cross products and determinants: $$(\mathbf{a} \times \mathbf{b})_i = \varepsilon_{ijk} a_j b_k.$$ The Kronecker delta and the Levi-Civita symbol are linked by $$\varepsilon_{ijk}\varepsilon_{ilm} = \delta_{jl}\delta_{km} - \delta_{jm}\delta_{kl}.$$

Iverson bracket

For a proposition $P$, define $$[P] = \begin{cases} 1 & (P \text{ true}) \\ 0 & (P \text{ false}) \end{cases}$$ Then $\delta_{ij} = [i = j]$.

Implementations

Python (NumPy)

import numpy as np

# 3x3 identity matrix (the Kronecker delta)
delta = np.eye(3)
print(delta)
# [[1. 0. 0.]
#  [0. 1. 0.]
#  [0. 0. 1.]]

# Individual entries
delta_12 = delta[0, 1]  # 0.0
delta_22 = delta[1, 1]  # 1.0

Symbolic computation (SymPy)

from sympy import KroneckerDelta

i, j = symbols('i j')
delta_ij = KroneckerDelta(i, j)

# Evaluation
print(delta_ij.subs({i: 1, j: 1}))  # 1
print(delta_ij.subs({i: 1, j: 2}))  # 0

References

  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press.
  • Arfken, G. B., Weber, H. J., & Harris, F. E. (2012). Mathematical Methods for Physicists (7th ed.). Academic Press.
  • Weisstein, E. W. "Kronecker Delta." From MathWorld--A Wolfram Web Resource.