Let be a code and its Hamming distance function. The (minimum) distance of , denoted by , is the smallest Hamming distance possible achieved by two (distinct) codewords of .

Mathematically,