# How to define gradient of an affine connection

I heard somewhere (and just read on a physics forum) that the gradient of a smooth function $f$ on a manifold $M$ can be defined when $M$ is equipped with an affine connection on its tangent bundle, i.e. the Riemannian metric is not strictly necessary. Is this true? If so, how can this be done?

No, or at least not if you want to coincide with the usual gradient in the case where the connection is derived from a metric. To show this, just note that whenever $\nabla$ is the metric connection of $g$, it is also that of $2g$ (since $\nabla(2g) = 2\nabla g = 0$); but the latter metric will produce gradients with half the magnitude of the former.
It seems to me that any sensible definition of the gradient of a function will involve a linear 1-1 relationship to the differential; i.e. will have the structure of a vector bundle isomorphism $$\xi: TM \to {TM}^*.$$ This is almost exactly the same data as a metric: if we impose some positivity conditions (which boil down to "if you move for some short time in the direction $\nabla f=\xi^{-1}(df)$ then $f$ increases unless $df=0$") then given either of the two we can get to the other using the equation $g(u,v) = (\xi(u))(v)$.