I'm studying coding theory and we're facing the problem to tell when two given linear codes $C$ and $C'$ over $\mathbb F_q^n$ (some others call $\mathbb F_q^n$ as $GF(q)$ just in case you don't know one of the two notations) and this is our definition:
$\textbf{DEF}$: Let $C, C'\subseteq \mathbb F_q^n$ be two linear codes (i.e. vector subspaces of $\mathbb F_q^n$), then you say that $C$ and $C'$ are equivalent, and write that $C \approx C'$ if given $G_1$ and $G_2$, generator matrices of $C$ and $C'$ respectively, you can obtain $G_2$ starting from $G_1$ executing a finite number of the following operations:
- Swapping two any columns in $G_1$
- Replacing a column in $G_1$ with itself multiplied by a non-zero scalar $\lambda\in \mathbb F_q\setminus \{0_{\mathbb F_q}\}$
$----------------------------------$
Next we're showing (or trying to, thing that I don't understand) that this definition is equivalent to this second one:
$\textbf{DEF}$: Let $C, C'\subseteq \mathbb F_q^n$ be two linear codes, then you say that $C$ and $C'$ are equivalent, and write that $C \approx C'$ if given $G_1$ and $G_2$, generator matrices of $C$ and $C'$ respectively, $\exists\:P\in GP_N(\mathbb F_q)\;\lvert\; G_2 = G_1\cdot P$ $----------------------------------$
Here above $GP_N(\mathbb F_q)$ represents the group of generalized permutation matrices
Our teacher argumentates it this way: he says that the two aforementioned operations are the restriction to the columns of G of global operations over $\mathbb F_q^n$, i.e
- $\forall \sigma\in S_N\;\exists\;\phi_\sigma\:\colon \mathbb F_q^N\mapsto \mathbb F_q^N$ mapping $(x_1, x_2, \dots, x_N)$ to $(x_{\sigma^{-1}(1)}, x_{\sigma^{-1}(2)}, \dots, x_{\sigma^{-1}(N)})$ with $\phi_\sigma$ being a linear isomorphism. ($\leftarrow$ our teacher says this corresponds to swapping columns. Why????)
- $$\mathbb T_{\mathbb F_q}\colon=\bigg\{\begin{bmatrix} \lambda_{1} & & \\ & \ddots & \\ & & \lambda_{N} \end{bmatrix}\;\bigg\lvert\; \lambda_i\in\mathbb F_q\setminus \{0_{\mathbb F_q}\} \bigg\}\subseteq GL_N(\mathbb F_q)$$Even on this, how is this an operation? It makes more sense if I think of getting a vector $\underline{v}$ and computing $\underline{v}\cdot T$ with $T\in\mathbb T_{\mathbb F_q}$ which will give me the vector $(\lambda_1 v_1, \lambda_2 v_2, \dots, \lambda_N v_N)$ and therefore if I do it for a matrix $G$ with "fitting" dimensions I'll get the first column of $G$ multiplied by $\lambda_1$, the second by $\lambda_2$ and so on... am I correct? And in that case, is $N=n$?
Sorry for not being too short about it, my biggest problem is with the permutations part, we never worked with it in our classes (I attend computer engineering) except for counting how many permutations exists for a set of $N$ elements and how many of them have a given amount of fixed points... this is confusing me a lot. We don't have an algebra course and we're doing it in coding theory.


Your question 1: any permutation of columns can be obtained by repeatedly swapping columns. This is because the permutation group $S_{N}$ can be generated by involutions. So your professor should not be saying that this given permutation of columns represents a swapping of columns, but that it represents a series of column swaps.
Your question about $\mathbb{T}_{\mathbb{F}_{q}}$ I don't entirely understand. Yes this maps a vector $(v_{1},\ldots, v_{N}) \mapsto (\lambda_{1}v_{1}, \ldots, \lambda_{N}v_{N})$, so each entry has been multiplied by a scalar. If you want to do this same operation to all of the vectors, this corresponds to multiplying each column of the generator matrix by the appropriate scalar.
I would say the two statements you give about the generator matrices are clearly equivalent statements, but that this definition of code equivalence is not good. For example over $\mathbb{F}_{3}$, $$\begin{align*}G_{1} &= \begin{bmatrix} 1 & 1 & 1\\0&1&-1 \end{bmatrix} & G_{2} &= \begin{bmatrix} -1 & -1 & -1\\0&1&-1\end{bmatrix}\end{align*}$$ define the exact same code, but the codes would not be considered equivalent under your definition because the rules don't allow for row operations (which do not change the row space).
A proper definiton of code equivalence should also allow the elementary row operations, and then the final equivalence should be $C_{1} \sim C_{2}$ if there exists $A \in \mathrm{GL}_{k}(\mathbb{F})$, $P \in \mathrm{GP}_{N}(\mathbb{F})$ with $G_{2} = AG_{1}P$.