*2.1. Linear Codes*

**Definition 1** (Linear Code)**.** *A linear code C of length n and dimension k is a subspace of* (F*q*)*n, where* F*<sup>q</sup> is the finite field with q elements, q is a prime power, and k and n are positive integers such that k* ≤ *n. It is denoted by an* [*n*, *k*]*-code. The error-correcting capacity of C is the maximum number t of errors that C can skillfully decode. All vectors of* (F*q*)*<sup>n</sup> that are orthogonal to every codeword of C consist of the dual code C*<sup>⊥</sup> *which is an* [*n*, *n* − *k*]*-code.*

**Definition 2** (Hamming Weight)**.** *The Hamming weight w*(*x*) *of a vector x in* (F*q*)*<sup>n</sup> is the number of non-zero entries of x.*

**Definition 3** (Generator Matrix)**.** *A generator matrix G of C is the rows that are a basis of C. G is also a k* × *n matrix.*

**Definition 4** (Parity-Check Matrix)**.** *A parity-check matrix H for a linear code C is an* (*n* − *k*) × *n matrix which is a generator matrix for its dual code C*⊥*.*
