Say I'm working in the space of linear transformations from $\mathbb R^n$ to $\mathbb R^n$ and I've picked a basis so I can identify with any operator a component matrix in $\mathbb R^{n\times n}$. Transposing an operator swaps components $(i,j)$ and $(j,i)$. In this setting, the transpose operation is itself a linear map from $\mathbb R^{n\times n}$ to $\mathbb R^{n\times n}$.

What does the transpose operator's component representation look like for, say, $n=2$ or $n=3$? Not what does it do when applied, but in what space does it live and what are its actual components?

How does one speak about applying this representation to a matrix? Say $T$ is the transpose representation and I'm applying it to a matrix $A$ to get $TA=A^{T}$. What is precise way to discuss this linear algebra operation in the context of the component representations of both tensors?

Big bonus points for the two lines of Mathematica or Sage to demonstrate the mechanics.