Vector bundles can have transition functions on $O(k)$ I'm trying to prove that every smooth vector bundle $\pi:E\to M$ with rank $k$ can be given transition functions  $g_{\alpha\beta}: U_\alpha\cap U_\beta\to GL(k)$ having values on the orthogonal group $O(k)$.
I know that we can define a metric $<\cdot,\cdot>$ on
$E$ and I'm pretty sure I'm supposed to use it here, but I still don't know how. 
I've tried to take each of local trivialization $\phi_\alpha:\pi^{-1}(U_\alpha)\to U_\alpha \times \mathbb{R}^k$ and modify it a little so that $\phi_\alpha\circ \phi_\beta^{-1}$ would give rise to orthogonal transformations, but I got stuck, since we can have many  $\beta$s. Anyway, I couldn't find a way to use the global metric $<\cdot,\cdot>$, so I don't know where to go.
Any suggestions? 
 A: Show that on $E$ you can introduce an inner product. That is, there exists a family of $E_m$ for all $m$ such that for any two local lifts $v$, $w$
$$m \mapsto v(m), w(m)$$
is smooth. This uses a partition of unity. If $E$ is the tangent bundle of a manifold you get a Riemannian metric. 
As an observation, it is essential to consider positive definite inner products. If we wanted another signature it may not work ( translation: not all vector bundles can be reduced to $O(k-l,l)$).
Once you do that, around every $x_i \in M$ take  $U_i$ of $B$ and 
$(u_{i1}, \ldots, u_{ik})$ a frame of the bundle. We may further reduce $U_i$ to $V_i$ so that $(v_{i1}, \ldots, v_{ik})$ can be Gram-Schmidt reduced to an orthonormal frame $(v_{i1}, \ldots, v_{ik})$. These will be our local frames. The fiber coordinate change on $V_i \cap V_j$ are given by smooth maps 
$$V_i \cap V_i \ni m \mapsto g_{ij}(m) \in O(k)$$
A: I'll write a solution using my own words (credits to orangeskid):
For each trivialization $\phi_{\alpha}:\pi^{-1}(U_{\alpha})\to U_\alpha\times \mathbb{R}^k$, let $\{s^\alpha_1,...,s^\alpha_k\}$ be a smooth frame in $U_\alpha$. Using Gram-Schmidt if necessary, we may assume $\{s^\alpha_1,...,s^\alpha_k\}$ is orthonormal with respect to the inner product $\langle\cdot,\cdot\rangle_E$. If $\{e_1,...,e_k\}$ is the cannonical basis for $\mathbb{R}^k$ and $\phi_\alpha(s^\alpha_i(p))=(p,v^\alpha_i)$, there is a unique linear map $L_\alpha:\mathbb{R}^k\to\mathbb{R}^k$ with $L_\alpha(v^\alpha_i)=e_i$. 
Define a new trivialization $\psi_\alpha:=(id_{U_\alpha}\times L_\alpha)\circ\phi_\alpha$, which basically sends $s^\alpha_i(p)$ to $(p,e_i)$. That way, $\psi_\alpha\circ\psi_\beta^{-1}(p,v)=(p,M(v))$, where $M:=(\langle s^\alpha_i(p),s^\beta_j(p)\rangle_E)_{i,j}$, which is the change of basis from $\{s^\beta_1(p),...,s^\beta_k(p)\}$ to $\{s^\alpha_1(p),...,s^\alpha_k(p)\}$. Since both basis are orthonormal, $M\in O(k)$.$_\blacksquare$
