= Hamming code
{c}
{wiki}
= Hamming's code
{c}
{synonym}
For an integer $r\ge2$, the binary <Hamming code> has a <parity-check matrix> containing each nonzero vector of $\mathbb F_2^r$ exactly once as a column. Its parameters are
$$
[2^r-1,\ 2^r-r-1,\ 3].
$$
The columns contain a <basis>, so the <matrix> has <rank> $r$. A weight-one <codeword> would require a zero column, and a weight-two <codeword> would require repeated columns, both impossible. Two distinct nonzero columns sum to a third distinct nonzero column, giving a weight-three <codeword>. These facts prove the stated <dimension> and <minimum Hamming distance>.
A single error in coordinate $j$ has <syndrome> equal to column $j$, so the <syndrome> directly identifies the corrupted bit. For $r=3$ this is the <Hamming code of length seven>. The excluded case $r=1$ gives the length-one zero code, not a code of <minimum Hamming distance> three.
Back to article page