Metric, torsion free connections on principal bundles

I hope this is not too elementary, but I have asked this question at the math.stack site, but I have obtained no answers.

Let $F(M)$ be the frame bundle of a $n$-dimensional differentiable manifold $M$, and let $H\subset TF(M)$ be a connection. A Riemannian metric on $M$ can be equivalently written as an equivariant function $f\colon F(M)\to S^2(\mathbb{R}^{n})$. How can one impose the metric compatibility and the torsion free condition on $H$ without using at all the picture on the tangent bundle $TM$?

Thanks.

I don't know what you mean by 'without using at all the picture on the tangent bundle $TM$', but here is how one normally does it:
First, one shows that there are canonical $1$-forms $\omega^i$ on $F(M)$ that are semibasic for the projection $\pi:F(M)\to M$ and that satisfy the equation $$\pi'(v) = \omega^i(v)\,e_i(f)$$ for all $v\in T_fF(M)$, where $f = (e_1,\ldots,e_n)\in F(M)$ is a frame.
Second one sees that the horizontal plane field $H$ associated to the Levi-Civita connection is characterized as the kernel of the unique (connection) $1$-forms $\theta^i_j$ on $F(M)$ that satisfy $$\mathrm{d}g_{ij} = g_{ik}\,\theta^k_j + g_{kj}\,\theta^k_i$$ where $g_{ij}(f) = \langle e_i,e_j\rangle$ (this is metric compatibility) and $$\mathrm{d}\omega^i = -\theta^i_j\wedge\omega^j$$ (this is the torsion-free condition). These are known as the (first) structure equations of Élie Cartan for the Levi-Civita connection.
Addendum: (Added at the request of the OP) The main point is that, for any connection $1$-form $\phi = (\phi^i_j)$ on $F(M)$, one will have equations of the form $$\mathrm{d}g_{ij} = g_{ik}\,\phi^k_j + g_{kj}\,\phi^k_i + g_{ijk}\,\omega^k$$ and $$\mathrm{d}\omega^i = -\phi^i_j\wedge\omega^j + \tfrac12h^i_{jk}\,\omega^j\wedge\omega^k$$ for some functions on $F(M)$ satisfying $g_{ijk} = g_{jik}$ and $h^i_{jk}=-h^i_{kj}$. (These are just consequences of the $\mathrm{GL}(n,\mathbb{R})$-equivariance of the matrix $g = (g_{ij})$ and the tautological definition of the $\omega^i$.) Now, any other connection $\theta = (\theta^i_j)$ will be expressible in the form $$\theta^i_j = \phi^i_j + p^i_{jk}\,\omega^k$$ for some functions $p^i_{jk}$ on $F(M)$. Then Cartan's structure equations for the Levi-Civita connection $\theta$ as listed above simply become the inhomogeneous linear system $$g_{il}\,p^l_{jk} + g_{jl}\,p^l_{ik} = g_{ijk} \quad\text{and}\quad p^i_{jk} - p^i_{kj} = h^i_{jk},$$ which, by the stated index symmetries, is the same number of independent equations as unknowns $p^{i}_{jk}$, namely $n^3$. By the usual symmetry/antisymmetry argument, the homogeneous equations have the unique solution $p^i_{jk} = 0$, so the inhomogeneous equations have a solution and it is unique. (Uniqueness implies the needed equivariance, so that the resulting $\theta$ does, indeed define a connection on $F(M)$.)
• Thanks Robert, as usual. How do you derive the metric compatibility condition? As I see it, the metric compatibility condition is $d<e_i,e_j> = < De_i,e_j> + <e_i,De_j>$, where $D:\Gamma(E)\to \Gamma(E\otimes T^{\ast}M)$ is the corresponding connection on the associated vector bundle, $\left\{ e_{i}\right\}$ is a local frame and $De_{i} = \theta_{ij} e_{j}$. Thus, this way of doing it uses the associated vector bundle $E$, and that is why I was saying that I didn't want to use the associated vector bundle picture. – Bilateral Apr 3 '15 at 22:59
• Dear Professor @RobertBryant, the functions $g_{ijk}$ seems to be related to the non-metricity of the connection. Does the construction in your addendum also hold for the metric on a vector bundle which is associated to a principal $G$-bundle? – Ayan Apr 27 '16 at 19:15