Incoding theory, agenerator matrix is amatrix whose rows form abasis for alinear code. The codewords are all of thelinear combinations of the rows of this matrix, that is, the linear code is therow space of its generator matrix.
IfG is a matrix, it generates thecodewords of a linear codeC by
wherew is a codeword of the linear codeC, ands is any input vector. Bothw ands are assumed to be row vectors.[1] A generator matrix for a linear-code has format, wheren is the length of a codeword,k is the number of information bits (the dimension ofC as a vector subspace),d is the minimum distance of the code, andq is size of thefinite field, that is, the number of symbols in the alphabet (thus,q = 2 indicates abinary code, etc.). The number ofredundant bits is denoted by.
Thestandard form for a generator matrix is,[2]
where is theidentity matrix and P is a matrix. When the generator matrix is in standard form, the codeC issystematic in its firstk coordinate positions.[3]
A generator matrix can be used to construct theparity check matrix for a code (and vice versa). If the generator matrixG is in standard form,, then the parity check matrix forC is[4]
where is thetranspose of the matrix. This is a consequence of the fact that a parity check matrix of is a generator matrix of thedual code.
G is a matrix, while H is a matrix.
CodesC1 andC2 areequivalent (denotedC1 ~C2) if one code can be obtained from the other via the following two transformations:[5]
Equivalent codes have the same minimum distance.
The generator matrices of equivalent codes can be obtained from one another via the followingelementary operations:[6]
Thus, we can performGaussian elimination onG. Indeed, this allows us to assume that the generator matrix is in the standard form. More precisely, for any matrixG we can find aninvertible matrixU such that, whereG and generate equivalent codes.
Because the Hamming code is a linear code, it can be written compactly in terms of matrices as follows. The transmitted codeword is obtained from the source sequence by a linear operation,where is thegenerator matrix of the code... I have assumed that and are column vectors. If instead they are row vectors, then this equation is replaced by... I find it easier to relate to the right-multiplication (...) than the left-multiplication (...). Many coding theory texts use the left-multiplying conventions (...), however. ...The rows of the generator matrix can be viewed as defining the basis vectors.
{{cite book}}: CS1 maint: multiple names: authors list (link)