When is the sign of inner products preserved? I'm interested in the following question:

Let $E$ be a real Euclidian space. What are the linear transformations $f$ of 
  $E$ that preserve the sign of inner products? That is, for all vectors $x$ 
  and $y$,
  $$ x \cdot y > 0 \iff f(x)\cdot f(y) > 0.$$

One can solve this by using polar decomposition and diagonalization, but I am looking for a more geometric proof. Any idea?
 A: If vectors begin perpendicular, they end up perpendicular.  So only rotations, reflections and multiples of those.
If $x.y=0$, then $x.-y=0$, so neither $f(x).f(y)$ nor $f(x).f(-y)$ is positive, so $f(x).f(y)=0$.
So the standard basis ends up as an orthogonal set of vectors.  
Combine $f$ with a rotation/reflection $g$ that rotates multiples of $fe_i$ back to multiples of $e_i$, so that $gfe_i=\lambda_ie_i$.  That is, all the standard vectors are now eigenvectors of $gf$, with real $\lambda_i$
Let $e_i$ and $e_j$ be any two of the vectors.
$$(e_i+e_j).(e_i-e_j)=|e_i|^2-|e_j|^2=0\\
f(e_i+e_j).f(e_i-e_j)=0=|f(e_i)|^2-|f(e_j)|^2\\=|gf(e_i)|^2-|gf(e_j)|^2=\lambda_i^2-\lambda_j^2$$
So $gf$ has all eigenvalues of equal absolute value.
Apply a rotation/reflection $h$ for which $he_i=e_i$ if $\lambda_i>0$ and $he_i=-e_i$ if $\lambda_i<0$.  Then $hgfe_i=|\lambda_i|e_i$.  Then $hgf$ is a multiple of the identity.  So $f$ is a multiple of $g^{-1}h^{-1}$, that is a multiple of a rotation/reflection.
A: The linear maps in question form a subgroup $G$ of $\mathrm{GL}(\mathbb{R}^n)$. To see that $G \subseteq \mathrm{GL}(\mathbb{R}^n)$ notice that for every $f \in G$ and $x \in \mathbb{R}^n$ with $x \neq 0$ we have $x \cdot x > 0$ and thus $f(x) \cdot f(x) > 0$, so $f$ is injective and therefore bijective. The axioms of a subgroup can easily be verified. Notice that $O(\mathbb{R}^n) \subseteq G$.
For all $f \in G$ and $x,y \in \mathbb{R}^n$ we also have
\begin{equation}
 x \cdot y < 0
 \Leftrightarrow x \cdot (-y) > 0
 \Leftrightarrow f(x) \cdot f(-y) > 0
 \Leftrightarrow f(x) \cdot f(y) < 0
\end{equation}
and therefore also $x \cdot y = 0 \Leftrightarrow f(x) \cdot f(y) = 0$.
We claim that every $f \in G$ can be written as $f = \lambda g$ with $g \in O(\mathbb{R}^n)$ and $\lambda \in \mathbb{R}^\times$. To show this we set $\lambda_i := f(e_i) \cdot f(e_i) > 0$ for $i=1,\dotsc,n$ and define $h \colon \mathbb{R}^n \to \mathbb{R}^n$ to be the linear map defined by $h(e_i) = \sqrt{\lambda_i} e_i$ for $i=1,\dotsc,n$. It is clear that $h$ is an isomorphism and we set $g := f h^{-1}$. To see that $g \in O(\mathbb{R}^n)$ notice that for all $i,j=1,\dotsc,n$
\begin{equation}
 g(e_i) \cdot g(e_j)
 = \frac{f(e_i) \cdot f(e_j)}{\sqrt{\lambda_i \lambda_j}}
 = \delta_{ij} \frac{\lambda_i}{\sqrt{\lambda_i \lambda_j}}
 = \delta_{ij}
 = e_i \cdot e_j.
\end{equation}
All that's left to show is that $\lambda_1 = \dotsc = \lambda_n$ and thus $h$ is just given by multiplication with a (non-zero) scalar. To see this first notice that $h = g^{-1} f \in G$.  For all $i,j=1,\dotsc,n$ we have $v_1 := e_i + e_j$ and $v_2 := e_i - e_j$ with $v_1 \cdot v_2 = 0$ and thus
\begin{equation}
 0
= h(v_1) \cdot h(v_2)
= (\sqrt{\lambda_i} e_i + \sqrt{\lambda_j} e_j) \cdot (\sqrt{\lambda_i} e_i - \sqrt{\lambda_j} e_j)
= \lambda_i - \lambda_j.
\end{equation}
It is now clear that $G \cong O(\mathbb{R}^n) \times \mathbb{R}^n$.
