Proving invariance of $ds^2$ from the invariance of the speed of light I've started today the book of Landau and Lifshitz Vol.2: The Classical Theory of Fields $\S 2$. They start from the invariance of the speed of light, express it as the fact that $$c^2(\Delta t)^2-(\Delta x)^2-(\Delta y)^2-(\Delta z)^2=0$$ is preserved when we change inertial frame, so they consider $$ds^2=c^2dt^2-dx^2-dy^2-dz^2,$$ and say

We have observed that if $ds=0$ in one frame then $ds'=0$ in another frame. But $ds$ and $ds'$ are infinitesimal of the same order. So it follows that $ds^2$ and $ds'^2$ have to be proportional that is $ds^2=ads'^2$... 

and he goes on to prove that $a=1$.
How to translate this argument in a rigorous one? I'm really interested in this, both to understand this deduction and also to be able in future to make similar ones.
 A: In general, uniform motion in one reference frame implies uniform motion in a different reference frame. Suppose that frame $K'$ is moving at a constant velocity $\mathbf{v}$ relative to frame $K$. The transformation from frame $K$ to $K'$ must be linear, so it must be true that
$$ ds'^2=a\,ds^2\tag{1}$$
where $a$ depends on the relative motion of $K$ and $K'$, but not on the 4-coordinates themselves1! We are pretty much left with $a\to a(\mathbf{v})$ (this means $a$ is a function of the velocity vector $\mathbf{v}$).
But $\mathbf{v}$ introduces a direction to the transformation, which means that the orientation of the two frames would matter. But since $ds^2$ depends on the quadratic components, then we must have that $a\to a(v)$ ($a$ is a function of the velocity's magnitude).
Now comes the fun part: the inverse transformation is obtained from the forward transformation by changing the sign of the velocity vector. Thus, we see that
$$ ds^2=a(v)\,ds'^2\tag{2}$$
Comparing (1) and (2), 
$$
ds^2=a(v)ds'^2=\frac{ds'^2}{a(v)}$$
and clearly the only way for this to occur is $a(v)=1$.

1. Allowing $a$ to depend on the coordinates would mean that space-time is not homogeneous.
A: It is nothing but a problem with real quadratic forms. You have a pair of vectors  $v,v' \in R^4$ with, respectively,  components $(\Delta t, \Delta x, \Delta y, \Delta z)$ and $(\Delta t', \Delta x', \Delta y', \Delta z')$. Actually these components describe the same vector in spacetime (describing the difference of events) but referring to two different reference frames.
Next you consider two quadratic forms $$ds^2(v,v)=
c^2\Delta t^2 - \Delta x^2 - \Delta y^2 -\Delta z^2$$ and $$ds'^2(v',v')=
c^2\Delta t'^2 - \Delta x'^2 - \Delta y'^2 -\Delta z'^2\:.$$
Since there is a linear transformation connecting the two reference frames (which will be proven to be the Lorentz transformation!) we also have $v'= Av$, where $A$ is some non-singular $4 \times 4$ real matrix independent from $v$, we can also write:
$$ds'^2(v',v')= ds'^2(Av,Av)$$
We finally know, from physics, that:
$$ds'^2(v',v') =0 \quad \mbox{if and only if}\quad ds^2(v,v) =0\:,$$
that is
$$ds'^2(Av,Av) =0 \quad \mbox{if and only if}\quad ds^2(v,v) =0\:.$$
In other words:
the quadratic forms $ds^2(\:,\:)$ and $ds'^2(A\cdot\:,A\cdot)$ have the same zeros.
A theorem of quadratic forms states that:
THEORM. Two  real quadratic forms on a real $n$ dimensional vector space, respectively associated to the symmetric matrix $$\eta = diag(1,-1, \ldots, -1)$$
and to the symmetric matrix $\eta'$, have the same zeros  if and only if they are proportional, i.e.,
$$\eta' = c \eta \quad \mbox{for some $c\in \mathbb R \setminus\{0\}$}\:.$$
Applying the result to our case we have that there is $a\neq 0$ with
$$ds^2(v,v)= ads'^2(Av,Av)\quad \mbox{for every $v\in R^4$}.$$
I do not have Landau's book, so I do not know how it is subsequently proved therein that $a=1$. I think that some physical symmetry argument is exploited in addition to the invariance of $c$.
ADDED REMARKS
1.
PROOF of the Theorem.
Due to the form of $\eta$, we have that $U^t\eta U =0$ if and only if $U_V^0 = \pm |V|$ and $U_V^{i}= V_{i}$ for $V \in \mathbb R^{n-1}$ and $i=1,\ldots,n-1$, where $|V| = \sqrt{V_1^2+\cdots+V_{n-1}^2}$. Our hypotheses on $\eta'$ can therefore be made explicit as follows.
$$U_V^t\eta'U_V=0 \quad \forall V \in \mathbb R^{n-1}\:.$$
In components (latin indices are summed from $1$ to $n-1$)
$$\eta'_{00}|V|^2 \pm \sum_i \eta'_{0i} |V| V_i + \sum_{ij} \eta'_{ij} V_iV_j=0\:.$$
We henceforth use the sign $+$, the other case can be treated similarly. It must be
$$\eta'_{00}|V|^2 + \sum_i \eta'_{0i} |V| V_i + \sum_{ij} \eta'_{ij} V_iV_j=0\quad \forall V \in \mathbb R^{n-1}\:.\tag{1}$$
Since (1) holds for $V$ and $-V$, we immediately have that
$$\sum_i \eta'_{0i} |V| V_i=0 \quad \forall V \in \mathbb R^{n-1}\:.$$
Arbitrariness of $V$ easily implies that $\eta'_{0i}=0$ for all $i=1,\ldots, n-1$.
(1) can be re-written as follows
$$\sum_{ij} (\eta'_{00}\delta_{ij}+\eta'_{ij}) V_iV_j=0\quad \forall V \in \mathbb R^{n-1}\:.\tag{2}$$
Since $\eta'_{ij}=\eta'_{ji}$, using $V=X+Y$ and next $V=X-Y$, (2) yields
$$\sum_{ij} (\eta'_{00}\delta_{ij}+\eta'_{ij}) X_iY_j=0\quad \forall X,Y \in \mathbb R^{n-1}\:.\tag{3}$$
In other words the matrix inside the scalar product above is the zero matrix,
$$\eta'_{00}\delta_{ij}+\eta'_{ij}=0\:. $$
Summing up
$$\eta'= \eta'_{00} diag (1, -1, \cdots, -1)\:.\tag{4}$$
Notice that $\eta'_{00}$ cannot vanish otherwise the zeros of $\eta'$ would fill the whole vector space, differently form the zeros of $\eta$, but we know that the set of zeros must coincide by hypotheses. (4) is the thesis if $c:= \eta'_{00}$. QED
2. Evidently, making use of Sylvester's theorem, the statement of the proved theorem implies an apparently stronger form of it  like this.
THEORM. Consider two  real quadratic forms on a real $n$ dimensional vector space, respectively associated to the symmetric matrices $\eta$ and $\eta'$, where $\eta$ has signature $+,-,\ldots, -$.
$\eta$ and $\eta'$ have the same zeros if and only if they are proportional
A: I don't find the arguments in the otherwise excellent text of Landau convincing, because the observer in K has to do  not with one, but in general two space directions, the one determined by the relative velocity $v$ and the one determined by the interval, so in $ds = a ds'$ we have in general $a = a(v,w)$ where $w$ is determined by the interval ds. We do have rotation invariance, but the angle between $v$ and $w$ cannot be supposed to be (we know it is not in general) the same as that seen by $K'$ in $ds'$, so we cannot apply the change of observer to prove that $a = 1$.
Even if we restrict to one dimension, we have that ds introduces an adimensional parameter given by $\frac{dx}{cdt}$ that we cannot exclude a priori does not enter into $a$, i.e., $a = a (v, \frac{dx}{cdt})$ and again this destroys the argument from inversion of point of view (because we cannot suppose, and in fact it is not true, that $\frac {dx'}{cdt'} = \frac{dx}{cdt}$.
On the other hand I think the easiest way to prove invariance of ds is to first prove, using simmetry arguments, that, supposing $v$ along the X axis, along the Y axis for t fixed we must have $t'$ fixed and $y' = y$. Then we have $c dt^2 - dx^2 = dy^2$ and also $c dt'^2 - dx'^2 = dy'^2 = dy^2$ from invariance of $c$, so $ds^2 = ds'^2$ for general $(dt, dx)$ intervals. The generalization to arbitrary timelike intervals is straightforward.
