[step:Construct the orthonormal frame reduction from a bundle metric]
Let $h$ be a smooth bundle metric on $E$. For each $p \in M$, define
\begin{align*}
Q_h(p) := \{\nu:\mathbb{R}^r \to E_p \mid \nu \text{ is a linear isomorphism and } h_p(\nu(a),\nu(b)) = a \cdot b \text{ for all } a,b \in \mathbb{R}^r\}.
\end{align*}
Define
\begin{align*}
Q_h := \bigcup_{p \in M} Q_h(p) \subset \operatorname{Fr}(E).
\end{align*}
The right action of $O(r)$ preserves $Q_h$. Indeed, if $\nu \in Q_h(p)$ and $A \in O(r)$, then for all $a,b \in \mathbb{R}^r$,
\begin{align*}
h_p((\nu \cdot A)(a),(\nu \cdot A)(b)) = h_p(\nu(Aa),\nu(Ab)) = Aa \cdot Ab = a \cdot b.
\end{align*}
Thus $\nu \cdot A \in Q_h(p)$.
The action is free because the right action on $\operatorname{Fr}(E)$ is free. It is transitive on each fiber $Q_h(p)$: if $\nu,\mu \in Q_h(p)$, define the [linear map](/page/Linear%20Map)
\begin{align*}
A:\mathbb{R}^r &\to \mathbb{R}^r
\end{align*}
by $A := \nu^{-1} \circ \mu$. Then $\mu = \nu \cdot A$, and for all $a,b \in \mathbb{R}^r$,
\begin{align*}
Aa \cdot Ab = h_p(\nu(Aa),\nu(Ab)) = h_p(\mu(a),\mu(b)) = a \cdot b.
\end{align*}
Hence $A \in O(r)$.
It remains to verify smooth local triviality. Let $U \subset M$ be an [open set](/page/Open%20Set) over which $E$ admits a smooth local frame $e_1,\dots,e_r:U \to E$. Apply the Gram-Schmidt construction fiberwise using the metric $h$. Explicitly, define smooth local sections $u_1,\dots,u_r:U \to E$ recursively by
\begin{align*}
u_1(p) := \frac{e_1(p)}{\sqrt{h_p(e_1(p),e_1(p))}}.
\end{align*}
For $k \ge 2$, define first
\begin{align*}
\widetilde u_k(p) := e_k(p) - \sum_{j=1}^{k-1} h_p(e_k(p),u_j(p))u_j(p),
\end{align*}
and then
\begin{align*}
u_k(p) := \frac{\widetilde u_k(p)}{\sqrt{h_p(\widetilde u_k(p),\widetilde u_k(p))}}.
\end{align*}
The denominators are positive because $e_1(p),\dots,e_r(p)$ are linearly independent and $h_p$ is positive definite. Since $h$ and the $e_i$ are smooth, each $u_k$ is smooth. For each $p \in U$, the vectors $u_1(p),\dots,u_r(p)$ form an $h_p$-[orthonormal basis](/page/Orthonormal%20Basis) of $E_p$.
Define a smooth map
\begin{align*}
\sigma:U &\to Q_h
\end{align*}
by requiring
\begin{align*}
\sigma(p)(a_1,\dots,a_r) := \sum_{i=1}^r a_i u_i(p).
\end{align*}
Then $\sigma$ is a smooth local section of $Q_h \to M$. The map
\begin{align*}
U \times O(r) &\to Q_h|_U
\end{align*}
given by
\begin{align*}
(p,A) &\mapsto \sigma(p)\cdot A
\end{align*}
is a bijection, and it is a diffeomorphism because it is the restriction of the standard frame-bundle trivialization determined by the smooth frame $u_1,\dots,u_r$. Therefore $Q_h$ is a smooth principal $O(r)$-subbundle of $\operatorname{Fr}(E)$.
[/step]