Let $f:\mathbb{R^{n\times n}\to \mathbb{R^{n\times n}}}$ with $f(A)=A^t,n\ge1$. Find the minimal polynomial of $f$.
My try:
The standard basis for the matrices in $\mathbb{R^{n\times n}}$ is the collection of matrices with $1$ in a position and $0s$ in all other positions: $A_{11}=\begin{bmatrix} 1&0&\dots&0\\0\\.\\.\\.\\0&0&\dots&0\end{bmatrix},A_{12}=\begin{bmatrix} 0&1&\dots&0\\0\\.\\.\\.\\0&0&\dots&0\end{bmatrix},$etc.
Now, for all $A_{ii}$ matrices: $f(A_{ii})=A_{ii}$ and for all $A_{ij}:f(A_{ij})=0,i\ne j$. Thus, the matrix representation of $f$ is: $A_f=\begin{bmatrix}A_{11}& \dots &0\\0&A_{22} \cdots&0 \\.\\.\\.\\0& \cdots&A_{nn}\end{bmatrix}$ and its minimal polynomial is the GCD of all $m_{A_{ii}}(x)$ minimal polynomials which are all equal to $(-x)^n(1-x)$ so, $m_{A_f}(x)=(-x)^n(1-x)$.
According to the textbook's answer, I'm terribly wrong. Any help?
Hint: $f^2(A) = A$. So, the minimal polynomial divides $x^2 - 1$.