[guided]The role of the bundle metric constructed above is to turn the line spanned by $s$ into a complementary bundle in a canonical fibrewise way. The preceding step proves that $L_s\to M$ is a smooth rank-one subbundle with local frames whose first vector is $s$. Define
\begin{align*}
F:=L_s^\perp=\bigcup_{x\in M}F_x\subset E,
\qquad
F_x:=\{v\in E_x:g_x(v,s(x))=0\}.
\end{align*}
For each fixed $x\in M$, this is the kernel of the [linear map](/page/Linear%20Map) $\ell_x:E_x\to\mathbb R$ defined by $\ell_x(v)=g_x(v,s(x))$.
Because $s(x)\neq 0$ and $g_x$ is positive definite, $\ell_x(s(x))=g_x(s(x),s(x))>0$. Hence $\ell_x$ is nonzero, so its kernel has dimension $k-1$.
It remains to check smoothness, not just the fibrewise dimension. Fix $x_0\in M$. From the preceding step, write $s=\sum_{i=1}^k a_i e_i$ in a smooth local frame $e_1,\dots,e_k:U_0\to E|_{U_0}$ near $x_0$; since $s(x_0)\neq 0$, relabel so that $a_1(x_0)\neq 0$, then shrink to an open neighbourhood $U\subset U_0$ on which $a_1\neq 0$. On this $U$, replacing $e_1$ by $s$ gives a smooth local frame $f_1,\dots,f_k:U\to E|_U$ with $f_1=s|_U$. We now orthogonalize only the remaining frame vectors against $s$. For $2\le i\le k$, define $q_i:U\to E|_U$ by
\begin{align*}
q_i(x)=f_i(x)-\frac{g_x(f_i(x),s(x))}{g_x(s(x),s(x))}\,s(x).
\end{align*}
The numerator and denominator are smooth functions of $x$ because $g$, $f_i$, and $s$ are smooth. The denominator is everywhere positive because $s(x)\neq 0$, so $q_i$ is a smooth section.
The definition of $q_i$ subtracts exactly the component of $f_i$ in the $s$ direction. Computing with bilinearity gives
\begin{align*}
g_x(q_i(x),s(x))=g_x(f_i(x),s(x))-\frac{g_x(f_i(x),s(x))}{g_x(s(x),s(x))}g_x(s(x),s(x))=0.
\end{align*}
Thus $q_i(x)\in F_x$ for every $x\in U$.
We next prove that $q_2,\dots,q_k$ form a frame for $F|_U$. Let $v\in F_x$. Since $f_1(x),\dots,f_k(x)$ is a basis of $E_x$, there are unique scalars $b_1,\dots,b_k\in\mathbb R$ such that
\begin{align*}
v=\sum_{i=1}^k b_i f_i(x).
\end{align*}
The condition $v\in F_x$ says $g_x(v,s(x))=0$. Solving this equation for the coefficient in the $s(x)=f_1(x)$ direction gives exactly
\begin{align*}
v=\sum_{i=2}^k b_i q_i(x).
\end{align*}
So the $q_i(x)$ span $F_x$. If $\sum_{i=2}^k c_iq_i(x)=0$, then expanding the $q_i(x)$ in the frame $f_1(x),\dots,f_k(x)$ gives a linear relation whose coefficients on $f_i(x)$ for $i\ge 2$ are precisely $c_i$. Since the $f_i(x)$ form a basis, all $c_i=0$. Hence $q_2(x),\dots,q_k(x)$ are linearly independent. Therefore $q_2,\dots,q_k$ is a smooth local frame for $F|_U$, and $F\to M$ is a smooth vector bundle of rank $k-1$.[/guided]