For a binary self-dual code, every word satisfies . In characteristic two this is , so the all-ones word is orthogonal to every codeword and lies in the dual code, hence the code itself. The dual code dimension identity gives even length and half-length dimension.
For a linear code , its dual code is
The standard bilinear form is nondegenerate. The map obtained by restricting the dot-product functional to is surjective: extend a functional from a basis of to a basis of , then use the nondegenerate dot product to represent it. Its kernel is . The rank-nullity theorem therefore gives
The first proposed description of the dual code is false without self-orthogonality. At length three take . It has the specified dimension, but
whereas contains and , neither of which is in . The natural corrected statement is the odd-length binary self-orthogonal dual extension: if also , every word of has even Hamming weight, the all-ones word lies in but not in , and dimensions then give .
For a binary self-dual code, for every . In , this equals , so every codeword has even Hamming weight. Thus for all , giving . The dimension identity yields , so is even. Alternatively and itself gives evenness. Hence the second assertion is true.
For every , use
This linear code has dimension , and . Therefore ; both have dimension , so equality holds. This constructs a binary self-dual code at every even length. Conversely the dimension identity already proves every self-dual length- linear code has dimension .
For a nonbinary example, over take . Its generator has self-product in , so . Both are one-dimensional, proving
Work over the finite field , and write for row of the PDF's matrix. The first row has Hamming weight eleven; all other rows have Hamming weight seven. To check their intersections economically, index the last eleven columns modulo eleven. The last eleven rows, after deleting the first column, are the successive cyclic shifts of the set . Direct calculation gives
The intersection sizes for equal those for . Thus two different rows among meet in four positions, including their shared first coordinate, whereas meets each of these rows in six positions. All these intersection sizes are even numbers, while each row weight is an odd number. Consequently . The first row and column agree, and the entry of the last eleven-by-eleven block depends only on the sum of its row and column indices modulo eleven, because successive rows are left shifts. Thus is a symmetric matrix, so .
The generator matrix has rank twelve, and
Hence its linear code lies in its dual code . Both have dimension twelve, so : it is a self-dual code. Moreover , and is an invertible matrix, so this is another generator matrix for the same code. In the column parity-check matrix convention of the question,
The matrix has rank twelve, so its nullspace condition characterizes exactly.
To prove the minimum Hamming distance, first observe that the rows of have Hamming weights twelve and eight. For binary vectors,
Every partial sum of generator rows is orthogonal to every further generator row, by . Its intersection with that row therefore contains an even number of positions. Induction using this identity proves that every codeword has weight divisible by four: is a doubly even code.
The systematic-matrix proof of extended Golay distance now excludes weight four. Write a codeword as and put . If its total weight were four, . For , the right half is a row of and has weight seven or eleven. For , the right half is the sum of two distinct rows; the intersection counts above give weight or . For , the right half would be a unit vector, but then would be a row of , of weight seven or eleven. For , the right half would vanish, contradicting invertibility of . Thus no nonzero word has weight four. Every nonzero weight is consequently at least eight, and any generator row other than the first attains eight. Since the minimum Hamming distance of a linear code is its least nonzero weight,
Define the length- binary Golay code as the punctured code obtained by deleting the first coordinate of this extended binary Golay code. This puncturing is injective on , because a nonzero word in its kernel would have weight one. Thus , and deleting one coordinate gives . The sum of the first two generator rows has weight eight and first coordinate one, so its puncture has weight seven. Therefore . In fact any coordinate can be punctured: every left coordinate except the first occurs in a weight-eight generator row, the first occurs in the sum just used, and every right coordinate occurs in at least one of the weight-eight generator rows.
The radius-three Hamming balls around the words of are disjoint, since two centers in intersecting balls would have Hamming distance at most six. Each ball contains
words. Their combined size is , the size of the entire binary Hamming space. Hence
For decoding in , write the received word as , where is the unknown error in its two halves. Its syndrome is
Let denote the length-twelve unit vector. For bounded-distance decoding, the three-error syndrome decoding of extended Golay code is the following finite search, returning the first successful candidate error:
  • If , return .
  • Otherwise, if some satisfies , return .
  • Otherwise, compute ; if , return .
  • Otherwise, if some satisfies , return .
  • If no test succeeds, declare that no error of weight at most three has this syndrome.
Every returned candidate has total Hamming weight at most three and the required syndrome. Conversely, an error of total weight at most three has a half of weight zero or one. The tests exhaust respectively , , , and , so they find every such error. Two distinct successful candidates would differ by a nonzero codeword of weight at most six, contradicting . Thus the result is unique, and the decoded word is . The condition still allows the first test when the weight is exactly three; for larger syndrome weight begin with the second test. A large syndrome weight alone does not imply more than three errors.
The decoder corrects every error of weight at most three; failure means that the received word is outside all radius-three decoding balls. Unlike its puncture, is not a perfect code: its radius-three balls cover only words. Without the three-error assumption, a successful test identifies a nearby codeword but need not identify the transmitted word.
For an arbitrary received word, a complete minimum-distance decoding fallback is to enumerate and minimize . Every error with the observed syndrome has exactly the form , so a minimizer gives a nearest codeword . Report all minimizers if there is a tie. This also decodes outside the guaranteed radius in the nearest-word sense, while making no unsupported claim that the transmitted word is determined. Thus a syndrome of weight at least three alone is insufficient for guaranteed recovery; either the three-error hypothesis or a choice among nearest words is needed.
Suppose a binary symmetric matrix satisfies , has one row of Hamming weight eleven and eleven rows of Hamming weight seven, and every sum of two distinct rows has Hamming weight six. Then generates a self-dual code. Its rows have weights twelve or eight; their mutual orthogonality makes every generated word doubly even. A weight-four word would have left-half weight one, two, three or four. The first two cases are excluded by the stated row weights; weight three would force to be a unit vector and hence to be a row of ; weight four would force . Thus weight four is impossible and the minimum Hamming distance is eight.