The preceding section came from our book and will be helpful for what follows, but most of the papers I read approach the topic a little differently. Here goes.
We define two vectors in V over GF() to be equivalent if they are non-zero scalar multiples of each other. We count the number of equivalence classes by taking the number of possible non-zero vectors and dividing this by since this is the number of non-zero elements of our field.
We then choose a representative vector from each of these equivalence classes (they will all be pairwise linearly independent) and use them as columns in a parity check matrix H. Thus H will be x
. It makes things really nice if we choose these vectors such that their first nonzero entry is 1 and such that we place them into H so that the first columns of H form the identity matrix.
Then H will be of the form: H=[I -P]
Then one valid generator matrix G can be formed by the equation G[P I].