I want to find $T_{I_n} \ f$ where the map is $\ f : X \mapsto X^2$ with $X\in SL_n(\mathbb{R})$.
By definition of the linear tangent map : $T_{I_n}\ f : T_{I_n}SL_n (\mathbb{R})\to T_{f(I_n)}SL_n(\mathbb{R})$.
But here notice that $f(I_n)=I_n^2=I_n$ and $\ f : SL_n(\mathbb{R})\to SL_n (\mathbb{R})$ because if $\det (X)=1$ then $\det(X^2)=(\det(X))^2=1$.
Now I want to determine $T_{I_n}SL_n (\mathbb{R})$. So I consider the $\mathcal{C}^{\infty}$-map $g: X \mapsto \det(X)-1$ for $X\in SL_n(\mathbb{R})$.
Using the basis of elementary matrix and differentiability theory I find : for $H \in \mathcal{M}_n(\mathbb{R})$ $Dg(X).H=Tr(X^{-1}H).$ Notice that it's a submanifold of $\mathcal{M}_n(\mathbb{R})$ where the dimension is $n^2-1$ (the codim is $1$ by definition of $g$). Indeed the derivative is surjective (we can chose for instance $H=X\neq 0$ and the derivative does not vanish) so $g$ is a submersion.
Now we link this argument to the tangent space. For $X$ the tangent space is : $\ker Dg(X).H=Tr(X^{-1}H)=0$. So for $I_n$ it is $T_{I_n}SL_n(\mathbb{R})=\{H \in \mathcal{M}_n(\mathbb{R})\ / \ Tr(H)=0\}=\mathfrak{sl}(\mathbb{R})$.
So I have to find : $T_{I_n}\ f : \mathfrak{sl}(\mathbb{R}) \to \mathfrak{sl}(\mathbb{R})$. Now I use the argument of drawing a curve on the manifold. I have to build $\gamma : 0\in L\subset \mathbb{R} \to SL_n (\mathbb{R})$ where $\gamma(0)=I_n \in SL_n(\mathbb{R})$. Then if I chose $\gamma(t)=I_n+tX$, $t\in L$, I get $\gamma'(0)=X\in SL_n(\mathbb{R})$. But is $\gamma(t)\in SL_n(\mathbb{R})$ for all $t\in L$ ? Or maybe I have to use the set $\mathfrak{sl}(\mathbb{R})$ ? I think I'm confused with the domains of maps.
To conclude I have to use the equivalence class of curves such that : $T_{I_n} \ f (\overline{\gamma(t)})=\overline{f(\gamma(t))}$.
Thanks in advance !
You are right about the tangent space, which is the Lie algebra $\mathfrak{sl}_n(\mathbb{R})$ consisting of matrices with vanishing trace. For the differential, you don't really have to write specific paths (though it could perhaps be a good exercise). Rather, you can use the Leibniz rule. Let $v\in\mathfrak{sl}_n(\mathbb{R})$, and let $\gamma:(-\epsilon,\epsilon)\to SL_n(\mathbb{R})$ with $\gamma(0)=id,\dot{\gamma}(0)=v$. Then$$\left.\frac{d}{dt}\right|_{t=0}\gamma(t)^2=\dot{\gamma}(0)\gamma(0)+\gamma(0)\dot{\gamma}(0)=2v.$$