A special type of transformation for columns of a matrix so i was wondering if there exist some kind of transformation matrix like 'T' such that for matrix A, "AT" replaces some parts of two columns (not all entries). like this:
\begin{bmatrix}
1 & 4 & 1\\
2 & 5 & 3\\
1 & 6 & 2
\end{bmatrix}
which if it gets multiplied by T the result will be:
\begin{bmatrix}
1 & 4 & 1\\
2 & 3 & 5\\
1 & 2 & 6
\end{bmatrix}
as we can see some part of the third column has been replaced by column 2.
 A: There is a two-sided linear transformation that accomplishes your goal. Specifically, let $$E = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$$ be the matrix such that $EA$ isolates the first row of $A$ and nullifies the rest and let $$S = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{bmatrix}$$ be the matrix such that the second and third columns of $AS$ have been swapped compared with $A$. Then the matrix you seek can be computed as
$$ B = EA + (I-E)AS $$
where $I$ is the 3-by-3 identity matrix. It is clear that $A \rightarrow B(A)$ is a linear transformation.
A: The way I understand it is that you want one matrix $ T $ that does the same kind of thing (as you described) to any matrix $ A $.
There is no such matrix $ T $. One way you can view multiplying a matrix $ A $ by another matrix $ T $ on the right is performing a linear transformation on each row of $ A $. The important thing is that you perform the same transformation on each row of $ A $. Therefore, for example, if all rows of $ A $ were identical, then all rows of $ AT $ would have to be identical as well.
For example, let
$$
A = 
\begin{pmatrix}
1 & 2 \\
1 & 2
\end{pmatrix}
$$
and suppose we want to swich the bottom two elements of $ A $. There is no matrix $ T $ satisfying
$$
AT =
\begin{pmatrix}
1 & 2 \\
2 & 1
\end{pmatrix},
$$
because if $ AT $ is defined, both rows of $ AT $ are equal to (the row times matrix product)
$
\begin{pmatrix}
1 & 2
\end{pmatrix} T
$
and therefore equal to each other.
