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 \in \{1, 2, \ldots, n\}$ (where $n$ is the dimension of the space under consideration) by
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$$
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, an index that appears twice in a single term (a repeated index) is summed over without writing $\Sigma$. Summing $\delta_{ij} v_j$ over $j$ leaves only the term with $j = i$, so $$\delta_{ij} v_j = v_i$$ In other words, contracting with δ replaces an index (the index substitution rule).
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
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, Einstein notation writes the matrix product and the trace as follows (with $C = AB$): $$A^i_j B^j_k = C^i_k \quad \text{(matrix product)}$$ $$A_{ij} B^{ij} = \mathrm{Tr}(AB^T) \quad \text{(trace)}$$ In the convention that distinguishes upper and lower indices, each summed index appears once as a superscript and once as a subscript. The second formula holds in an orthonormal basis when the upper-index components $B^{ij}$ are identified with the lower-index components $B_{ij}$ (the transpose is needed; it is not $\mathrm{Tr}(AB)$). In this notation the Kronecker delta plays the role of the identity matrix, as in $A^i_j \delta^j_k = A^i_k$.
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). An orthonormal basis (mutually orthogonal unit vectors) satisfies $$\mathbf{e}_i \cdot \mathbf{e}_j = \delta_{ij}.$$
Quantum mechanics
When the discrete eigenstates $\{|i\rangle\}$ form a complete orthonormal basis, both the orthonormality condition $\langle i | j \rangle = \delta_{ij}$ and the completeness relation $$\displaystyle\sum_i |i\rangle\langle i| = I$$ hold. Completeness alone does not imply orthonormality (a set of vectors that are not mutually orthogonal can still satisfy the completeness relation).
Partial differential equations
In finite-difference methods, the Kronecker delta serves as a discrete analogue of the Dirac delta function $\delta(x - y)$. Since $\delta(x - y)$ has the dimension of an inverse length, on a grid with spacing $h$ it is the dimensionless $\delta_{ij}$ divided by $h$, namely $\delta_{ij}/h$, that corresponds to $\delta(x - y)$.
Graph theory
Given an adjacency matrix $A_{ij}$ and the vertex degrees $d_i = \displaystyle\sum_j A_{ij}$, the degree matrix is $D_{ij} = d_i \delta_{ij}$ and the Laplacian matrix is $$L_{ij} = D_{ij} - A_{ij} = d_i\delta_{ij} - A_{ij}.$$ Here the $i$ in $d_i\delta_{ij}$ is a free index that also appears on the left-hand side, so it is not summed (an explicit exception to the repeated-index rule of the summation convention).
Related symbols
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).$$ Note that $\delta(x)$ is not an ordinary function but a generalized function (distribution); $\delta$ is defined by requiring this identity for continuous $f$. The Kronecker delta can be regarded as its discrete counterpart, playing the same role in the sum $\sum_j f_j \delta_{ij} = f_i$ (when approximating on a grid with spacing $h$, it is normalized as $\delta_{ij}/h$).
Levi-Civita symbol
In three dimensions (indices ranging over $1, 2, 3$), 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}$$ (the $\varepsilon$-$\delta$ identity). The left-hand side is summed over $i$ from $1$ to $3$. This identity holds only in three dimensions, where the indices range over $1, 2, 3$.
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, symbols
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.