Is matrix transpose a linear transformation?

The operation that transposes "all" matrices is, itself, not a linear transformation, because linear transformations are only defined on vector spaces.

Also, I do not understand what the matrix $A=M^TM^{-1}$ is supposed to be, especially since $M$ need not be invertible. Your understanding here seems to be lacking...

However:

The operation $\mathcal T_n: \mathbb R^{n\times n}\to\mathbb R^{n\times n}$, defined by $$\mathcal T_n: A\mapsto A^T$$

is a linear transformation. However, it is an operation that maps a $n^2$ dimiensional space into itself, meaning that the matrix representing it will have $n^2$ columns and $n^2$ rows!


The vector space of $n\times n$ matrices is $n^2$-dimensional, hence the matrix representation of the (indeed) linear map $X\mapsto X^T$ would have to be $n^2\times n^2$ (and you better rearrange/interprete the given $n\times n$ matrices into $n^2\times 1$ column vectors).


In addition to the other answers, you certainly have a matrix representation of transpose if you treat $n\times n$ matrices as large vectors ($n^2\times 1$ vector). So that you will have to translate for example a matrix $M=[m_{ij}]_{ij}$ into $(m_{11},\dots,m_{n1},\cdots,m_{1n},\dots,m_{nn})^T$. The transpose sending $m_{ij}$ to $m_{ji}$ is simply the matrix: $$ \begin{pmatrix} \overbrace{1~0~\cdots~0}^{n} \\ & 1~0~\cdots~0 \\ && \ddots\\ &&&1~0~\cdots~0 \\ 0~1~\cdots~0 \\ & 0~1~\cdots~0 \\ && \ddots\\ &&&0~1~\cdots~0 \\ \vdots&\vdots&&\vdots\\ 0~\cdots~0~1 \\ & 0~\cdots~0~1 \\ && \ddots\\ &&&0~\cdots~0~1 \\ \end{pmatrix} $$