In the usual column convention, a codeword of a linear code obeys , so its nonzero coordinates give a linear dependence among columns of its parity-check matrix. Conversely a dependence gives a nonzero codeword supported on those coordinates. Minimizing the support gives the minimum Hamming distance of a linear code. In the transposed convention , the corresponding objects are the rows of . The size of a dependent set means the number of its coordinate positions, even when some check vectors coincide.
A binary block code of length is a nonempty subset . Its size is , the number of distinct codewords. The Hamming distance counts coordinates at which two words differ. The code's minimum Hamming distance is when there are at least two words. No pairwise minimum exists for a singleton code; it can be assigned as a convention when needed.
A binary linear code is a vector subspace of . If its dimension is , a generator matrix has a basis of as its rows, giving
To match the coordinate-row convention, take a parity-check matrix of size , with independent columns, and define
The transpose is the usual parity-check matrix with one column per coordinate. By rank-nullity theorem, the displayed kernel has dimension . The two constructions agree when : the generator's row space lies in the parity-check kernel and has the same dimension, hence equals it. Conversely, for a given , choose the columns of as a basis of its dual code ; orthogonality and the dimension formula give exactly as the kernel.
For a nonzero linear code, is a nonzero codeword whenever are distinct codewords, and . Conversely compare any nonzero codeword with zero. Thus the minimum Hamming distance of a linear code is the least nonzero Hamming weight.
Write for the row associated with coordinate . A nonzero binary vector is a codeword exactly when
Its nonzero coordinate positions therefore index a linearly dependent set of rows. Conversely, a dependence among a set of rows has coefficients in , not all zero; putting these coefficients in the corresponding coordinates gives a nonzero codeword of weight no greater than the number of rows in that set. Taking minima in both directions proves the parity-check dependencies determine minimum distance criterion:
Rows here are indexed by positions: equal row vectors at different positions are two distinct members of the indexed family. In the usual matrix convention, the same result refers to columns of . For the zero code, neither a nonzero codeword nor a dependent coordinate set exists, so both minima can consistently be interpreted as .
For the Hamming code, let , set , and let the rows of be all nonzero vectors of , each once. These rows include the standard basis, so has rank and the code has dimension and size . There is no dependence involving one row, because no row is zero, or two rows, because no rows are equal. For , any two distinct nonzero vectors have a distinct nonzero sum , which is another row. These three rows sum to zero. Thus for .
The perfectness of a Hamming code also has a direct decoding proof. Given any received word , its syndrome is . A zero syndrome means . Otherwise it equals exactly one row . The vector then has syndrome zero and is the unique codeword obtainable by changing one coordinate. There is no other codeword at distance at most one: its necessary correction would have to have the same syndrome, and among zero and all single-coordinate errors the syndromes are precisely the distinct vectors of . Therefore the radius-one Hamming balls about codewords partition .
Equivalently, each ball contains words; disjointness and show that none are uncovered. Hence every nondegenerate binary Hamming code is a perfect single-error-correcting code. For , the construction is the singleton code , whose one radius-one ball is also the whole ambient space. This deals with the degenerate boundary without falsely claiming its minimum distance is three.
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.
Work over the finite field . The given factorization shows that divides , so it generates a length- cyclic code . Since , the vectors represented by
form a basis: their distinct leading degrees prove their linear independence, and every multiple of representing a polynomial of degree below has a multiplier of degree at most . Hence is a binary linear code of dimension , containing codewords. The generator has Hamming weight seven, so the minimum Hamming distance of a linear code satisfies .
The BCH bound used here is the following consecutive-root theorem. If a length- cyclic code over , with relatively prime to , has a generator polynomial of a cyclic code vanishing at for a primitive th root , then its minimum Hamming distance is at least .
Choose a root of in an algebraic closure of . The factorization implies , while in , so . As is prime, has order . The Frobenius endomorphism preserves the roots of a polynomial with coefficients in : . Thus every is a root. In particular, shows that
are roots of . These four consecutive roots give by the BCH bound. A further argument is needed to exclude weights five and six.
Put . Cancelling in the supplied factorization gives . In the quotient ring , is invertible and every cyclic shift of equals . Since ,
The coefficient of in this circular product is , the binary inner product of the coefficient vector of with a cyclic shift of itself. Every coefficient of is one. The circular autocorrelation of the binary Golay generator therefore implies that all pairs of basis rows , including equal rows, satisfy
Each has Hamming weight seven. Append its parity bit, which is one, and write . The extended rows have Hamming weight eight and satisfy . Their linear span is precisely the parity extension of , because the appended coordinate is the linear functional equal to the sum of all coordinates.
These extended generators produce a doubly even code. To prove this rather than assume it, use
All the extended generators have weights divisible by four. A sum of previous generators is orthogonal to the next generator, so the intersection size in this identity is even. Induction proves that every word in has Hamming weight divisible by four; this is the orthogonal generators of doubly even codes argument.
An original word of weight five acquires a parity bit and has extended weight six, while a word of weight six acquires a zero parity bit and still has extended weight six. Both contradict divisibility by four. Together with the BCH bound and the weight-seven generator, this completes the BCH and parity-extension proof of the binary Golay distance:
Its radius-three Hamming balls are disjoint, and their volume is
There are such balls, so they contain words, exactly the size of the ambient binary cube. They therefore cover the cube, with every word in exactly one ball. Hence
Work over the finite field . Reduce polynomials modulo , so their monomials are square-free. The binary Reed-Muller code consists of the evaluation vectors of polynomials of degree at most at all points of , in a fixed order. This is a linear code of length and dimension , for . Square-free monomials give independent evaluation functions, as follows inductively by splitting according to the last variable.
The minimum Hamming distance of a linear code equals its least nonzero Hamming weight. The result is
Here is the repetition code, while is the full binary vector space and has distance one. For the induction step, write , where and . Its evaluation vector is , the Reed-Muller bar-product recursion. If , its nonzero Hamming weight is at least , with the full-space endpoint treated as above. If , every position where contributes exactly one to the sum of the two weights; hence the weight is at least . The monomial is one exactly on points, attaining the bound. Degrees greater than give the same full code; the zero code at negative degree has no nonzero word whose weight could define a finite minimum.
Let and let be the parity-check matrix whose columns are the distinct nonzero vectors of the finite field vector space . The binary Hamming code is
A perfect code has Hamming balls of radius about its codewords partitioning the whole ambient space, where is its minimum Hamming distance of a linear code.
No column of is zero and no two columns agree, so has no word of Hamming weight one or two. Three suitable columns sum to zero, so . For any received word , its syndrome is either zero or is the unique column of equal to that syndrome. In the first case ; in the second,
so is at Hamming distance one from a codeword. Uniqueness follows from . Thus the radius-one balls partition , and the code is perfect.
For , the dual code is the binary simplex code of length seven. Every nonzero dual word evaluates a nonzero linear functional on the seven nonzero vectors of , and exactly four of those evaluations are one. Hence every nonzero word of has weight
Adding the all-one codeword is a bijection from to itself, and it replaces every bit by its complement. It therefore sends weight to weight , proving
The code has one word of weight zero and, since its minimum Hamming distance is three, no words of weight one or two. Combining this with part (i) gives
Write for the all-one column vector. The parity-check extension of a linear code is
The defining map is linear, so is a binary linear code. If is a generator matrix and a parity-check matrix for , then one may take
The punctured code in, say, the last coordinate is
Coordinate deletion is a linear map, so is linear. Its generator matrix is obtained by deleting the last column of . If the minimum distance is at least two, deletion is injective on , and hence has the same dimension as .
For its parity-check matrix, first use invertible row operations on to make its nonzero last column a coordinate vector. The last column is nonzero because otherwise the weight-one word supported there would belong to , contrary to . Delete the pivot row and the last column; the resulting matrix is a parity-check matrix for . Equivalently, is obtained by shortening the dual code at the deleted coordinate.
Finally, the shortened code in the last coordinate is
It is linear whenever is linear, because it is the puncture of the subspace .