Definition 6
A linear code of dimension

and length

over a field

is a

-dimensional subspace of

. Such a code is called an
![$ [n,k]$](img18.png)
code. If the minumum distance of the code is

, then the code is
called an
![$ [n,k,d]$](img20.png)
code.
The next theorem states the general structure of cyclic codes.
Theorem 3
Let

be a cyclic code of length

over a finite field

. To
each codeword

, associate the polynomial

in
![$ \ensuremath{\mathbb{F}}[x]$](img49.png)
. Among all the nonzero
polynomials obtained from

in this way, let

have the
smallest degree. We may assume that

is monic. This polynomial
is called the generating polynomial for

. Then
1.

is uniquely determined by

.
2.

is a divisor of

.
3.

is exactly the set of coefficients of the polynomials
of the form

with deg

.
4. Write

. Then
![$ m(x)\in\ensuremath{\mathbb{F}}[x]/(x^n-1)$](img55.png)
corresponds
to an element of

iff

.
Proof.
(1)The codespace is spanned by the rows of a matrix. Because the
row space of the matrix is closed under subtraction the difference
between any two vectors, or polynomials, in the space is still in the
space. So if there was another monic generating polynomial

with minimum degree, then

is also in the space. But
this is a contradiction since this new polynomial has smaller degree
than both

and

.
(2)Divide

into

. By the division algorithm we get

mod
where deg

deg

.
But multipying

by powers of

corresponds to a cyclic shift of
the corresponding code vector and multiplication by a polynomial is
thus a linear combination of the codevectors in the generating matrix
and all of their cyclic shifts. So

is in the code space of

. Since deg

deg

,

must be equal to zero.
Thus

. Notice then that
![$ \ensuremath{\mathbb{F}}[x]/(x^n-1)$](img65.png)
is not a
field since it has zero divisors.
(3)Let

correspond to an element in

. Divide

into
with deg

deg

. From (2) we know that

corresponds to a codeword and by assumption so does

. So, since

is closed under subtraction,

mod

is
also a codeword. But this is just

and has degree less than

. It follows that

and

is the product
of the generating polynomial with another polynomial. Because each
codeword has length

, deg

so deg

deg

. Conversely, we have shown that the product of any
two polynomials

is in

. Thus, these polynomials yield
all of the code words of

.
(4)By (2) we can write

. Let

correspond to
an element in

. Then by (3)

mod
Next suppose that

mod

. Then
for some polynomial

. We can now divide through by

and
get
and so

coresponds to a codeword of

.