When is a flow geodesic and how to construct the connection from it

Note: I've decided that this answer should be rearranged a bit so that it clearly separates the discussion of the basic properties of the tangent bundle from the discussion of the formulae associated to a connection. The content is the same, but I hope it's clearer.

The standard way to discuss the geometry of connections and geodesic flow 'invariantly' (by which, I assume you mean 'without reference to coordinates') is to exploit the underlying geometric features of the tangent bundle $\pi:TM\to M$. There are three that are important here:

First, because $TM$ is a vector bundle over $M$, there is a flow associated with scalar multiplication, $S_t(w) = e^tw$ for $w\in TM$, and this is the flow of a unique vector field $R$ on $TM$.

Second, since each diffeomorphism $\phi:M\to M$ canonically induces a diffeomorphism $\phi':TM\to TM$, each differentiable vector field $X$ on $M$ induces a vector field $X'$ on $TM$, known as the tangential prolongation of $X$. The assignment $X\mapsto X'$ is a Lie algebra homomorphism and $X$ is $\pi$-related to $X'$.

Third, because $T_{\pi(w)}M\subset TM$ is a vector space, there is a canonical isomorphism $\iota_w:T_{\pi(w)}M\to T_w(T_{\pi(w)}M)$ for each $w\in TM$. Set $$ \nu_w = \iota_w\circ\pi'(w): T_w(TM)\to T_w(T_{\pi(w)}M)\subset T_w(TM). $$ Then $\nu:T(TM)\to T(TM)$ is a canonically defined nilpotent linear endomorphism of the vector bundle $T(TM)$ whose kernel and image are $\ker(\pi')=V\subset T(TM)$, i.e., the so-called vertical bundle.

Now consider a torsion-free linear connection $\Gamma$ on $TM$ and its associated geodesic flow vector field $G$.

First of all, one can verify (using the formulae given in the question and the above definitions) that $G$ satisfies the two conditions $$ \nu(G) = R\qquad\text{and}\qquad [R,G] = G. $$ (As usual, $[,]$ denotes the Lie bracket of vector fields on $TM$.)

Conversely, by Euler's Theorem, if a smooth vector field $G$ on $TM$ satisfies these two conditions, then it is the geodesic flow vector field of a torsion-free affine connection $\Gamma$ on $TM$, as the coordinate formulae show.

One can go further and see how $G$ and the connection define each other without using coordinates:

Recall that a connection $\Gamma$ on $TM$ can be thought of as a choice of a splitting $T(TM) = V \oplus H$, where $V=\ker (\pi')\subset TM$ and $H$ is the so-called 'horizontal space' of the connection, so that $\pi'(w):H_w\to T_{\pi(w)}M$ is an isomorphism for each $w\in TM$. In particular, every vector field $X$ on $M$ has a unique horizontal lift $X^H$, which is the unique section of $H$ on $TM$ that is $\pi$-related to $X$.

The canonical map $\nu:T(TM)\to V$ restricts to define an isomorphism of bundles $\nu:H\to V$, and $G$ is the unique section of $H$ that satisfies $\nu(G) = R$. This is how $H$ determines $G$.

To recover $H$ from $G$, one has the identity $$ X' - \bigl[\,G,\,\nu(X')\,\bigr] = 2\,X^H. $$ Thus, the knowledge of $G$ suffices to determine $X^H$ for all vector fields $X$ on $M$, which, of course, determines $H$. (Note that, because $\nu(X')$ does not depend on derivatives of $X$, the left hand side of the above equation would be at most first order in $X$, but, as the above formula shows, it is actually of order $0$ in $X$.)

Even more, an explicit formula for the covariant derivative associated to the connection can be written as follows: Recall that, if $X$ is a differentiable vector field on $M$ and $w\in TM$ is given, then the connection $\Gamma$ defines a unique element $\nabla_wX\in T_{\pi(w)}M$. Using the canonical isomorphism $\iota_w:T_{\pi(w)}M\to T_w(T_{\pi(w)}M)$, one can thus regard $\nabla_wX$ canonically as an element of $T_w(T_{\pi(w)}M) = V_w$ for each $w\in TM$, thereby defining a section $\nabla X$ of the vertical bundle $V\subset T(TM)$ over $TM$. One then has the identity $$ \nabla X = X' - X^H = \tfrac12\bigl(\,X' + [G,\nu(X')]\,\bigr), $$ valid for all differentiable vector fields $X$ on $M$.


Here is a geometric way that turns out to be equivalent to Robert's answer (i.e., to the Klein-Grifone-Foulon approach to connections associated to a second order ordinary differential equation of a manifold).

Let $\phi_t : TM\setminus 0 \rightarrow TM\setminus 0$ be the (local) flow of the second order equation, and let $D\phi_t : T(TM\setminus 0) \rightarrow T(TM\setminus 0)$ be its differential, which is also a flow.

In order to define a complement to the vertical space $V_{v_x}$ at the point $v_x \in TM\setminus 0$, consider the three subspaces

$L(0) = V_{v_x}$, $L(t) := D\phi_{-t}V_{\phi_t(v_x)}$, and $L(2t) := D\phi_{-2t}V_{\phi_{2t}(v_x)}.$

These are three $n = \dim(M)$ dimensional subspaces in the $2n$-dimensional vector space $T_{v_x}(TM \setminus 0)$ and they are pairwise transversal if $t$ is close to zero. Now consider the harmonic conjugate (i.e., as in standard projective geometry) of this triplet: the image of $L(t)$ under the reflection that is minus the indentity on $L(0)$ and the identity on $L(2t)$. As $t$ tends to zero this harmonic conjugate gives you the complement to the vertical space (i.e., the horizonal subspace of the connection).