Inverting a generator matrix - Coding Theory The general question I have is, once Ive been given a generator matrix $G$ for some linear $[n,k]_q$ code (or alternatively the parity check matrix $H$), How can I invert this in order to find the inverse? i.e.
$$G \rightsquigarrow H \text{ or } H \rightsquigarrow G$$ 
I understand that for $q=2$ we can rearange columns of $G$ to give the standard form $G=(I_n|A)$ which is easily manipulated to $H=(-A^T|I_n)$. However once $q>2$ I dont understand how to solve the question. Below is an example question given:
$$G=
\begin{bmatrix}
1&1&1&0 \\
2&0&1&1
\end{bmatrix}
$$ 
Find the parity check matrix, $H$, in standard form.
 A: What field are you in? In order for you to obtain a parity-check matrix of that particular code, tranform $G$ to its RREF form and you're there. I assume you already know what to do next after that.
A: The answer given in the the course was, for linear codes, row operations to $G$ will generate an equivalent code.
A: Note that your generator matrix
$$G=
\begin{bmatrix}
1&1&1&0 \\
2&0&1&1
\end{bmatrix}
$$
has RREF which is 
$$G_{RREF}=
\begin{bmatrix}
1&0&2&2 \\ 
0&1&2&1
\end{bmatrix}
$$
assuming that we are in $F_3$. This particular matrix is also a generator matrix for that code (i.e. its row space will still generate all codewords $c\in C$), as you have only performed row operations on $G$. Note that the above matrix is already in standard form. Thus, a parity check matrix for that code is given by
$$H=
\begin{bmatrix}
1&1&1&0 \\
1&2&0&1
\end{bmatrix}
$$
PS: Notice how I used "a" instead of "the" to imply that the parity-check matrix (and even the generator matrix) of a code is sometimes not unique.
