Equivalent definitions of equivalence between linear codes, why is it? 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} &amp; &amp; \\
    &amp; \ddots &amp; \\
    &amp; &amp; \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 &quot;fitting&quot; 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} &amp;= \begin{bmatrix} 1 &amp; 1 &amp; 1\\0&amp;1&amp;-1 \end{bmatrix}
&amp; G_{2} &amp;= \begin{bmatrix} -1 &amp; -1 &amp; -1\\0&amp;1&amp;-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$.
This is better; I don't think of SPLAG as an introductory text, but he makes the corret distinction. Not the full linear group:

This is mysterious Wikipedia repeats the business about just two operations but then describes the correct things on the matrices.
I have one or two books that include codes, I will need to check. The books may or may not include arbitrary finite fields...
A few pages in Lattices and Codes by Wolgang Ebeling. I have the second edition. He quite definitely defines generator matrix in terms of a basis of the linear subspace. Thus, despite confusing wording, the third operation is permitted,  replacing a column by its sum with a different column.
Maybe someone here has taught codes...