Why is $ds^2=0$ along the path of a light ray in any spacetime, in any reference frame, specifically non-inertial? In the Minkowski spacetime of special relativity it is apparent that along the path of a light ray $ds^2=0$ in any inertial reference frame given the Lorentz transformations and the invariance of $ds^2$. However this does not seem so apparent to me in the context of a curved spacetime given all reference frames, to my knowledge, are non-inertial. I have seen this taken to be fact in the context of curved spacetimes and have not came across justification for it yet. 
QUESTION: Is there a rigorous mathematical proof that $ds^2=0$ along the path of a light ray, in any spacetime, in any reference frame, or is this an axiomatic fact? 
Note: I assume this can be proven mathematically somehow and would be very interested in what the proof/logic is behind it. Also, the only curved spacetime I'm sufficiently familiar with is that described by the Schwarzschild metric. 
 A: So, in general, a coordinate transformation involves giving each coordinate $x$ as a function of the new coordinates $x^{\prime}$:
$$x^{\prime\mu} = f^{\mu}(x^{\nu})$$
This gives a general relationship:
$$ds^{2} = g_{\mu\nu}dx^{\mu}dx^{\nu} = g_{\mu \nu}\left(\frac{dx^{\mu}}{dx^{\prime\alpha}}dx^{\prime \alpha}\right)\left(\frac{dx^{\nu}}{dx^{\prime\beta}}dx^{\prime \beta}\right) = g_{\alpha \beta}^{\prime}dx^{\prime \alpha} dx^{\prime \beta}$$
Where we can transform the old inner product defined by $g$ into a new inner product defined by $g^{\prime}$.  So, if $ds^{2}=0$ in our old reference frame, then it is necessarily zero in our new reference frame.  You can argue that the formalism is cooked to make this true, and you'd be right, but that's what the underlying mathematics of general and special relativity describe.
A: If you want a really rigorous proof, then the answer is that it is in fact not true that light rays have $ds^2 = 0$, because in a curved spacetime there is no general notion of a light ray.
What you would have to do is solve Maxwell's equations in a curved background; assuming that the typical length scale of the field (so the wavelength) is much smaller than the length scale of spacetime curvature you get something like the wave equation, and you can pretend your wave is a light ray. If you do this it turns out that the wave four-vector $k^\mu$ of this wave/ray must be null ($k_\mu k^\mu = 0$), which is the same as saying that $ds^2 = 0$ along the ray. For some insight into the subtleties of this, see for example this post.
However, there is another way of getting at this if you're willing to accept that in special relativity there is such a thing as a light ray. The argument rests on the fact that every manifold is locally flat; to put in physics words, in a curved spacetime you can choose coordinates near a point so that the metric is that of SR to first order, and is exactly the Minkowiski metric at your chosen point. You simply say that in these particular coordinates $ds^2 = 0$, and since $ds^2$ is a scalar, it will be zero no matter what system of coordinates.

There is a conceptual distinction which can be made here, which is that of speed of light vs. the speed of causality. The latter is the maximum speed at which things can travel, and almost by definition the maximum speed paths are those with $ds^2=0$; this is because the very structure of relativity enforces this speed limit. It just so happens that light travels at this maximum speed (particle physicists will mention the masslessness of the photon at this point), but there's no fundamental reason it must do so.
