Differential and Rank of $XAX^{-1}-A$ I have a map: $F_{A} (X) :GL\left(2n,\mathbb{R}\right) \longrightarrow\mathbb{\mathfrak{M}_{\mathit{2n\times2n}}\left(\mathbb{R}\right)}$
such as \begin{eqnarray}
 & F_{A}(X) & =XAX^{-1}-A
\end{eqnarray}
where $X\in GL(2n,\mathbb{R})$ and $A=\left(\begin{array}{cc}
0 & -I_{n}\\
I_{n} & 0
\end{array}\right)$
And I need to find the rank of this map

I tried to develop in for $n=1$ just to see what's going. 
What I obtained
$$F_{A}(X)= \frac{1}{\det X} \left(\begin{array}{cc}
X_{1} & X_{2}\\
X_{3} & X_{4}
\end{array}\right) \left(\begin{array}{cc}
0 & -I_{n}\\
I_{n} & 0
\end{array}\right)\left(\begin{array}{cc}
-X_{4} & +X_{2}\\
+X_{3} & -X_{1}
\end{array}\right)-\left(\begin{array}{cc}
0 & -I_{n}\\
I_{n} & 0
\end{array}\right)$$
$$F_{A}(X)=\frac{1}{\det X}\left(\begin{array}{cc}
\left(-X_{1}X_{3}-X_{2}X_{4}\right) & \left(X_{1}X_{1}+X_{2}X_{2}\right)\\
\left(-X_{3}X_{3}-X_{4}X_{4}\right) & \left(X_{3}X_{1}+X_{4}X_{2}\right)
\end{array}\right)-\left(\begin{array}{cc}
0 & -I_{n}\\
I_{n} & 0
\end{array}\right)$$
but I'm quite stuck. I could go on with brute force and resolve the $n=1$ case, but I'm pretty sure that since it seems a really natural application there should be a known formalism or even a known formula where this kind of things are evident. Can You give me an hint?
 A: Let us compute $dF(X)$ using directional derivatives: for $M\in\mathbb R^{2n\times 2n}$ we have
$$
dF(X)M=\lim_{t\to0}\frac{F(X+tM)-F(X)}{t}=\lim_{t\to0}\frac{(X+tM)A(X+tM)^{-1}-XAX^{-1}}{t}.
$$
Now for $|t|$ small we can use the expression
$$
(X+tM)^{-1}=X^{-1}-tX^{-1}MX^{-1}+t^2P,
$$
so that
$$
(X+tM)A(X+tM)^{-1}-XAX^{-1}=t\big(MAX^{-1}-XAX^{-1}MX^{-1}\big)+t^2Q,
$$
and we conclude the limit above is
$$
dF(X)M=MAX^{-1}-XAX^{-1}MX^{-1}.
$$
Awful as it is, we can use that expression to find out the rank. Indeed,we first look at the kernel of $dF(X)$. It consists of all matrices such that
$$
MAX^{-1}=XAX^{-1}MX^{-1}
$$
Multiplying by $X^{-1}$ on the left and $X$ on the right, this is equivalent to
$$
(X^{-1}M)A=A(X^{-1}M).
$$
We conclude that $M\mapsto N=X^{-1}M$ gives an isomorphism from the kernel onto the space $E$ of matrices $N$ commuting with $A$. All in all we obtain
$$
\text{rank }dF(X)=4n^2-\dim\ker df(X)=4n^2-\dim E. 
$$
Finally, after some computations one sees that $E$ consists of all matrices of the form
$$
N=\left(\begin{array}{cc}
G&H\\-H&G
\end{array}\right),
$$
and consequently $E$ has dimension $2n^2$. Hence in the end:
$$
\text{rank }dF(X)=2n^2.
$$
