The Golay code is a perfect linear error-correcting code. There are two essentially distinct versions of the Golay code: a binary version and a ternary version.
The binary version is a binary linear code consisting of codewords of length 23 and minimum distance 7. The ternary version is a ternary linear code, consisting of codewords of length 11 with minimum distance 5.
A parity check matrix for the binary Golay code is given by the matrix , where is the identity matrix and is the matrix
By adding a parity check bit to each codeword in , the extended Golay code , which is a nearly perfect binary linear code, is obtained. The automorphism group of is the Mathieu group .
A second generator is the adjacency matrix for the icosahedron, with appended, where is a unit matrix and is an identity matrix.
A third generator begins a list with the 24-bit 0 word (000...000) and repeatedly appends first 24-bit word that has eight or more differences from all words in the list. Conway and Sloane list many further methods.
Amazingly, Golay's original paper was barely a half-page long but has proven to have deep connections to group theory, graph theory, number theory, combinatorics, game theory, multidimensional geometry, and even particle physics.