In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise: δ i j = { 0 if i ≠ j , 1 if i = j . {\displaystyle \delta _{ij}={\begin{cases}0&{\text{if }}i\neq j,\\1&{\text{if }}i=j.\end{cases}}} or with use of Iverson brackets: δ i j = [ i = j ] {\displaystyle \delta _{ij}=[i=j]\,} For example, δ 12 = 0 {\displaystyle \delta _{12}=0} because 1 ≠ 2 {\displaystyle 1\neq 2} , whereas δ 33 = 1 {\displaystyle \delta _{33}=1} because 3 = 3 {\displaystyle 3=3} .
The Kronecker delta appears naturally in many areas of mathematics, physics, engineering and computer science, as a means of compactly expressing its definition above.
In linear algebra, the n × n {\displaystyle n\times n} identity matrix I {\displaystyle \mathbf {I} } has entries equal to the Kronecker delta: I i j = δ i j {\displaystyle I_{ij}=\delta _{ij}} where i {\displaystyle i} and j {\displaystyle j} take the values 1 , 2 , ⋯ , n {\displaystyle 1,2,\cdots ,n} , and the inner product of vectors can be written as a ⋅ b = ∑ i , j = 1 n a i δ i j b j = ∑ i = 1 n a i b i . {\displaystyle \mathbf {a} \cdot \mathbf {b} =\sum _{i,j=1}^{n}a_{i}\delta _{ij}b_{j}=\sum _{i=1}^{n}a_{i}b_{i}.} Here the Euclidean vectors are defined as n-tuples: a = ( a 1 , a 2 , … , a n ) {\displaystyle \mathbf {a} =(a_{1},a_{2},\dots ,a_{n})} and b = ( b 1 , b 2 , . . . , b n ) {\displaystyle \mathbf {b} =(b_{1},b_{2},...,b_{n})} and the last step is obtained by using the values of the Kronecker delta to reduce the summation over j {\displaystyle j} .
It is common for i and j to be restricted to a set of the form {1, 2, ..., n} or {0, 1, ..., n − 1}, but the Kronecker delta can be defined on an arbitrary set.