In classical mechanics, can the Lagrangian be thought of as a metric? I know that there are some other discussions on this on physics stack exchange, but the other day I was playing with the expression for the Lagrangian and thinking about it's connection with relativity and I thought I may have come up with something.
The principle of stationary action states that the functional
$$S(f) = \int_{t_0}^{t_1} L(q(t), q'(t), t) = \int_{t_0}^{t_1} \frac{1}{2}mq'(t)^2 - P(q(t), q'(t), t)$$
should be stationary. (where $q(t) = (q_x(t), q_y(t), q_z(t))$ is the path traveled in space parametrized by time $t$, and $P(\cdot, \cdot, \cdot)$ is the potential energy of the system)
and if we assume that we have a conservative field, then the potential is only dependent on position and time. So then we can simplify it to -
$$S(q) = \int_{t_0}^{t_1} \frac{1}{2}mq'(t)^2 - P(q(t), t)$$
Here is what I think I discovered - If we define $w(t) = (t, q(t))$, then -
$$S(q) = \int_{t_0}^{t_1} \frac{1}{2}w'(t)\begin{bmatrix}-2P(w)&0&0&0\\0&m&0&0\\0&0&m&0\\0&0&0&m\end{bmatrix}w'(t)$$
But now this looks like the equation for the length of a worldline passing through spacetime!
Is this somehow wrong, or can we actually look at classical mechanics as geodesics moving through spacetime with the metric shown above?
 A: Partly yes, and partly no! This is a neat idea, but your particular realization of it doesn't work. The reason is because your expression is not properly coordinate invariant.
For example, the action for a relativistic point particle with path $x^\mu(\tau)$ is
$$S = \int \sqrt{g_{\mu\nu}\frac{dx^\mu}{d\tau} \frac{dx^\nu}{d\tau}} d\tau.$$
If we rescale the $\tau$ coordinate, the action stays the same, as it should since $\tau$ is merely an arbitrary parameter; the $d\tau$ factors clearly cancel. But in your case there is no square root; instead your kinetic term is something like
$$S = \int \frac12 \frac{dq^i}{d\tau} g_{ij} \frac{dq^j}{d\tau} \, d\tau, \quad g_{ij} = m \delta_{ij}.$$
Here the $d\tau$'s don't cancel out, so the action changes if you rescale $\tau$. You only get the right answer in the special case $\tau = t$, which is what you used. This action is essentially derived from the relativistic one by Taylor expanding, which ruins the geometrical meaning. 
However, it is true that Newtonian, non-relativisitic physics can be formulated geometrically! The formalism is called Newton-Cartan theory. Since we're working nonrelativistically there's no reason to unify space and time. Instead, we postulate an absolute time and an absolute space, with a metric $g_{ij}$. We then define a connection compatible with this metric, and the particle paths are geodesics with respect to this connection.
