Actually, the Kronecker delta function can be defined with its domain as any nonempty set, so long as its codomain is a ring (even though its range will be the set of 0 and 1). However, it is usually only used as described above.

For those of you whose consoles do not display backslash-escaped characters, the Kronecker delta is usually displayed as a small delta (the one that looks curvy and like a d, not the big triangle). If your browser supports HTML 4.0 in all of its glory, it should look like this: δ.