$f:p\mapsto \frac{A(p)}{|A(p)|}$ is a diffeomorphism from $\mathbb{S}^2$ to $\mathbb{S}^2$ Let $A$ be an invertible matrix and $f:\mathbb{S}^2\to\mathbb{S}^2$ with $f(p)=\frac{A(p)}{|A(p)|}$.
I'm trying to prove the fact that $f$ is a diffeomorphism.
It is obvious that $g:p\mapsto\frac{A^{-1}(p)}{|A^{-1}(p)|}$ is the inverse of $f$, so $f$ is a bijection.
So I'm left prove that $(df)_p$ is bijective for each $p$.
Here what's bugging me: take for example $A=I_{3\times 3}$ and consider $f$ as a restriction of the function $\phi:\mathbb{R}^3\to\mathbb{S}^2$ with $\phi(p)=\frac{p}{|p|}$. Then $(d\phi)_{(x,y,z)}$ is equal to:
\begin{bmatrix}
    \frac{y^2+z^2}{(x^2+y^2+z^2)^{3/2}}& \frac{-xy}{(x^2+y^2+z^2)^{3/2}} & \frac{-xz}{(x^2+y^2+z^2)^{3/2}} \\
    \frac{-xy}{(x^2+y^2+z^2)^{3/2}} &  \frac{x^2+z^2}{(x^2+y^2+z^2)^{3/2}} & \frac{-yz}{(x^2+y^2+z^2)^{3/2}} \\
    \frac{-xz}{(x^2+y^2+z^2)^{3/2}} & \frac{-yz}{(x^2+y^2+z^2)^{3/2}} & \frac{x^2+y^2}{(x^2+y^2+z^2)^{3/2}}
\end{bmatrix}
which has determinant $0$ for every $(x,y,z)$. 
How can that be a diffeomorphism? What's going on?
 A: It seems like you are considering $\phi$ as a map from $\mathbb{R}^3$ to $\mathbb{R}^3$. That's not a diffeomorphism so there's no contradiction.
If you really want to bash this out directly then you need to include the coordinates. So you should compose $\phi$ with the stereographic projection $\sigma$, which at $(0,...,0,1)$ looks like $$\sigma : (x_1,...,x_n,x_{n+1}) \mapsto \frac{1}{1 - x_{n+1}}(x_1,...,x_n),$$ and work out the Jacobian of $\sigma \circ \phi \circ \sigma^{-1}$ as a map from $\mathbb{R}^2$ to $\mathbb{R}^2$.
The direct way would be to argue that $g$ is differentiable since it has the same form as $f$.
A: We can write $f$ as the composition of the maps $$\mathbb S^2\overset{A} {\longrightarrow} \mathbb R^3 \overset{\pi}{\longrightarrow}\mathbb S^2$$
where $\pi(x) = x/|x|$ is normalization. Thus the derivative of $f$ at a point $p$ can be expressed as the composition of linear maps $df_p = d\pi_{Ap} \circ A$. Note that $d \pi_p$ is just the orthogonal projection $T_p \mathbb R^3 \to T_p \mathbb S^2.$
Take a non-zero vector $v \in T_p \mathbb S^2$, which means $v \cdot p =0$. By the observations above, the only way that $df_p (v) = d\pi_{Ap} (Av)$ can be zero is if $Av$ is parallel to $Ap$; but by invertibility of $A$ this would imply $v$ is parallel to $p$, contradicting $v \cdot p = 0$. Thus $df_p$ is injective.
