I want to prove that $O(n)\cong SO(n)\rtimes O(1)$ as Lie groups.
I have the following result:
If $G,N,H$ are Lie groups, then $G\cong N\rtimes H$ iff there are Lie group homomorphisms $\phi:G\to H$ and $\psi:H\to G$ such that $\phi\circ\psi=\mathrm{Id}_H$ and $\ker\phi\cong N$.
Since $O(1)\cong C_2$, we can take $\phi=\det$, which is a Lie group homomorphism with kernel $SO(n)$.
But I am unsure how to find a suitable $\psi$. I thought about something like $\psi(x)=xI$, but then $\phi\circ\psi(x)=x^n$, so is not the identity map if $n$ is even. Can anyone suggest a $\psi$?
The embedding of $C_2$ into $O(n)$ maps $1$ to $I,$ and $-1$ to the diagonal matrix whose top diagonal element is $-1,$ and the other diagonal elements are $1.$