Let $V = \mathbb R^n$, and $Q : V\times V\to \mathbb R$ be a symmetric and positive definite bilinear form. I define $SO(n)$ to be $$ SO(n) := \left\{ A \in SL_n(\mathbb R) ~|~ A^T A = I_n \right\}. $$ Fulton and Harris claim, in page 96 of their book on Representation Theory, that the subgroup of $SL_n(\mathbb R)$ preserving $Q$ is $SO(n)$. It isn't clear to me that this is true, and I would like to prove it.
Fixing a basis for $V$, we get that $Q$ is given by a symmetric, positive definite matrix $M$ and we wish to prove that
$$ SO(n) \cong \left\{ A \in SL_n(\mathbb R) ~|~ A^T M A = M \right\}. $$
We may assume $M$ is diagonal since every real symmetric matrix is diagonalizable.
Here's what I have so far:
Write $A = (a_{ij})$ and $M = \mathrm{diag}(\lambda_1, \ldots, \lambda_n)$ with $\lambda_i > 0$ for all $1 \leq i \leq n.$ Then $A^TMA = M$ gives us the following system of equations:
$$\sum_{i} \left(A^T\right)_{si} \left(MA\right)_{it} = \left(M\right)_{st}$$ $$ \iff \sum_i a_{is} \lambda_i a_{it} = \lambda_s \delta_{st}, $$ for all $1 \leq s,t \leq n$. So the entries $a_{ij}$ of $A$ satisfy the equations we obtain above.
I would like to construct a map $\varphi$ which takes any such $A$ to $\varphi(A) \in SO(n)$, i.e whose entries $\tilde a_{ij}$ satisfy $$ \sum_i \tilde a_{is} \tilde a_{it} = \delta_{st}, $$ for all $1\leq s,t \leq n$, and then eventually argue that $\varphi$ is an isomorphism. I don't see how I can construct such a $\varphi$, any advice?