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.



Metric, torsion free connections on principal bundles
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)$.) 


