Dual code Created 2026-09-24 Updated 2026-11-05
For a linear code , the dual code is the orthogonal complement
under the standard bilinear bilinear form. If has dimension , the dual code has dimension and , because this bilinear form is nondegenerate.
The independent rows of a parity-check matrix for form a basis of , so that matrix is a generator matrix for the dual code. If a check matrix has redundant rows, its rows still span the dual code but are not themselves a basis. For example, the dual code of the length- binary even-weight binary code is the repetition code spanned by the all-one word.
Even-weight binary code Created 2026-09-24 Updated 2026-11-05
The length- even-weight binary code consists of words with . It is the kernel of the linear map that sums the coordinates, equivalently the binary single parity-check code.
For its parameters are : the single independent parity equation leaves dimension , every nonzero codeword has even Hamming weight, and a word with two nonzero coordinates attains weight . For the code is , so the distance- assertion does not apply.
Parity-check matrix Created 2026-09-24 Updated 2026-11-05
For a linear code of dimension , a parity-check matrix is an matrix whose rows form a basis of the dual code . With codewords written as row vectors,
Thus gives a full set of independent linear equations defining . A received row vector has syndrome , which is zero exactly when is a codeword.
For example, defines the binary even-weight binary code of length . It has rank , so its kernel has dimension . One can also use a check matrix with redundant rows; the same kernel is defined, but only an independent row selection is a generator matrix whose rows form a basis of .
For a chosen coordinate and symbol , the shortened code retains the words having that symbol in the chosen coordinate and then deletes that coordinate. For the last coordinate,
At least one of the two coordinate fibres contains at least words. Choose that fibre and, if necessary, discard surplus words. Because all retained words agree in the deleted coordinate, their mutual distances do not change. Hence one can always obtain
Without discarding words, its size is that of the chosen fibre and its minimum distance is at least .
For the final calculation, the given code is the whole space , so its parity extension is the length-four even-weight binary code. In a binary symmetric channel, parity fails to notice a nonzero error exactly when an even number of bits flips. The possible error weights are therefore two and four. Their total probability is
This excludes the weight-zero event, since it is not an undetected error.