For distinct evaluation points and , the Reed-Solomon code is
This is a linear code of dimension : evaluation is linear, and a nonzero polynomial of degree less than cannot vanish at all distinct points. The assertion of cyclicity concerns the primitive, unextended construction: set and , where generates the multiplicative group of a finite field . Arbitrary evaluation sets or arbitrary coordinate orders need not make a Reed-Solomon code a cyclic code.
For this ordered full-length construction, shifting the evaluation vector to the right gives . This is the evaluation vector of , whose degree is still less than , so it is a cyclic code. Its generator polynomial follows from the finite geometric series
Here the scalar is nonzero in . Write and . For ,
since . Thus every word is divisible by . This monic divisor of generates a cyclic code of dimension , equal to the evaluation code by inclusion and dimension. Hence
It is useful to allow a starting exponent for the consecutive zeros of a cyclic code. Define the primitive cyclic Reed-Solomon code
All exponents are understood modulo . The same geometric-sum calculation shows that
Indeed evaluating its word polynomial at , , gives sums with exponents between one and . This is a generalized Reed-Solomon code, with nonzero coordinate multipliers ; is the unweighted evaluation code. Directly, a right shift corresponds to replacing by , so these offset codes are also cyclic codes.
A maximum distance separable code, or MDS code, is a linear code attaining the Singleton bound, with . To see the bound, deleting any coordinates is injective on a code of minimum Hamming distance , since two words with the same puncture would differ in at most positions. Therefore and . For a nonzero Reed-Solomon evaluation word, the polynomial has at most distinct polynomial roots, so at least coordinates are nonzero. Nonzero coordinate multipliers do not change these zero positions. This proves for both Reed-Solomon codes and generalized Reed-Solomon codes. Equality can also be exhibited: choose any evaluation points and take their linear factors as ; it vanishes exactly at those points and has weight . Thus
The duality of primitive cyclic Reed-Solomon codes is especially transparent in the evaluation form. Assume first . A vector of has coordinates , ; a vector of has coordinates , . Their standard dot product is
Every monomial in has exponent at least one and at most , and every such power sum vanishes. Thus . Both sides have dimension , giving
In particular has generator . This agrees with the general dual of a cyclic code rule: invert the roots belonging to the complementary factor . The dual is a Reed-Solomon code in the consecutive-zero convention. With the strictly unweighted evaluation definition, its coordinates instead have the form , so it is a generalized Reed-Solomon code; it need not equal the unweighted code of dimension on the same points. This convention distinction is essential. The case is the full word space and its dual is the zero code, obtained by taking .
For code encoding, use the finite-field discrete Fourier transform and its inverse:
For a message , put for , and set all other transform coordinates to zero. The inverse discrete Fourier transform returns
The zero transform coordinates are precisely the root checks defining . This gives non-systematic encoding by evaluation. For systematic polynomial encoding of a cyclic code with a message polynomial of degree less than , put and calculate the remainder of upon division by . Then is divisible by , and the last coefficients are the message coefficients. Both methods use the same generator polynomial and the same ordered powers of .
For bounded-distance decoding, let , put , and assume at most symbol errors. The following description uses the Reed-Solomon key equation and fixes the transform and locator conventions explicitly.
  • Set , all other error coordinates to zero, and output . Verify that all root checks vanish and that the correction has weight at most . Recover the message from the unconstrained transform coordinates by , or from the last coefficients if systematic encoding was used.
The denominator in the Forney algorithm is nonzero for distinct locations. The minimum-distance error-detection and correction guarantee gives unique recovery because . If the required locator or a valid correction cannot be found, declare decoding failure. Beyond errors, a received word may lie near a different codeword, so successful root checks alone do not certify recovery of the originally transmitted message. The guaranteed correction radius is symbol errors.