In my General Relativity course, we had argued that even in a curved metric space, light follows a trajectory that obeys $ds^2 = 0$. The reasoning we were given is as follows:
The line element in any metric tensor $g_{\mu\nu}$ is $$ds^2 = d\overline{x}^T g_{\mu\nu} d\overline{x}.$$
If the metric is symmetric, then it can be diagonalised by an orthogonal transformation $Q$ at every point. So if $\overline{x} = Q\overline{x'}$, then
$$ds^2 = d\overline{x'}^T g'_{\mu\nu} d\overline{x'},$$
where $g'$ is diagonal. If the eigenvalues ordered from top to bottom are $\lambda_i$, then we subject our space to a scaling transformation $$x'_i = \frac{x''_i}{\sqrt{|\lambda_i|}},$$ so that all our eigenvalues become $+1$ or $-1$ depending on their initial sign.
If our original metric was Lorentzian, then the result of our transformations is the Minkowski metric at the point.
We then argued that since $ds^2 = 0$ for light in the Minkowski metric and $ds^2$ is invariant under transformations, it must be so at every point in our original metric as well. I don't understand how the line element $ds^2$ is invariant under scaling transformations. Is it invariant under disproportionate scaling of coordinates?
If not, how do we prove that $ds^2 = 0$ for light in all metrics?