Is a faithful representation of the orthogonal group on a vector space equivalent to a choice of inner product?

Given an $n$-dimensional real vector space $V$, is a choice of faithful representation of the orthogonal group $O(n)$ on $V$ equivalent to a choice of inner product on $V$?

I think this should be true. Certainly a choice of inner product on $V$ determines a group $O(V)$ which is isomorphic to $O(n)$ via a choice of orthonormal basis on $V$. However, I am not sure how to define an inner product on $V$ using a given faithful representation of $O(n)$.


Fix a basis of $V$. Now you can represent each element of $O(n)$ as a matrix, and you can read the orthonormal bases from their columns.

More concretely, fix any $U\in O(n)$ (represented in $V$). Starting from a basis $v_1,\ldots,v_n$ of $V$, define $$ w_j=\sum_{k=1}^nU_{kj}v_k. $$ Then $w_1,\ldots,w_n$ will be an orthonormal basis. Now, given $x,y\in V$, we define $$ \langle x,y\rangle_U^{\phantom U}=\sum_{j=1}^nx_jy_j, $$ where $x=\sum_jx_jw_j$, $y=\sum_jy_jw_j$.