I am trying to show that if $A$ and $B$ are orthonormal bases of a real finite dimensional vector space $V$ and $P$ is the change of basis matrix between $A$ and $B$ then $\det(P) = \pm 1$. Here is my progress:
When working on this problem, I discovered the following fact: If $G_B$ denotes the Gram matrix of the inner product relative to $B$ and $G_A$ denotes the Gram matrix of the inner product relative to $A$ then the Gram matrices and the transition matrix $P$ are related through $$ G_B = P^T G_A P. $$
The original claim is then a corollary of this fact: $$ G_B = P^T G_A P \implies \det(G_B) = \det(P^T) \det(G_A) \det(P) \implies \det(P) = \pm 1 $$ where I have used basic properties of the determinant and the fact that the determinant of the Gram matrix relative to an orthonormal basis is $1$.
So, I think this proves the original claim but I am now stuck with proving the more general claim that $G_B = P^T G_A P$. What would be a good way to approach this?