A linear code of length over is a linear subspace . A parity-check matrix satisfies . Its minimum distance of a code is the least Hamming distance between distinct codewords, equivalently the least Hamming weight of a nonzero word, because differences remain in the code.
For the usual binary bar product of binary linear codes, take equal-length binary codes with and define
It is linear, of length and dimension , since the parametrization is injective. If and the word is nonzero, its weight is . If , coordinatewise . The words with of minimum nonzero weight and with of minimum weight achieve the two candidate bounds. Thus
For a word , membership is equivalent to and . Consequently a parity-check matrix of a bar product is
The same distance argument actually needs only equal block lengths and a common field, not nesting. Over a general field replace the second row block by , so it tests . The displayed binary construction uses the conventional nesting.
For length- binary linear codes , their bar product of binary linear codes is
The map is injective and linear, so
If is the minimum distance of , then
For this is at least ; for a nonzero word has weight at least . Words and attain these bounds, proving
A parity-check matrix for a code is a matrix satisfying . A pair belongs to exactly when
Thus a parity-check matrix is
This is the parity-check matrix of a bar product.
The Reed-Muller code is the length- binary code obtained by evaluating every square-free polynomial in Boolean variables of degree at most on all points of . Equivalently,
The square-free monomials form a basis, so
A word in evaluates an affine function . The two constant functions have weights and . Every nonconstant affine function takes each value equally often, so all other codewords have weight .
A monomial of degree has weight . Hence every generator, and therefore every codeword, has even weight when . For , the monomial has weight one. All words have even weight exactly for .