Kronecker delta ,, , ...
This Kronecker delta (greek lowercase delta) is pretty simple: If the two indices i and j are the same, its value is 1, otherwise 0.
Written with cases (see previous section):
You might find this symbol with various placements of the indices, as indicated in the title. In some context, e.g. tensors, this placement is important, but often times it isn't.
Code:
function kroneckerDelta(i,j){
if(i === j){
return 1;
} else {
return 0;
}
}