Defining invariant spacetime interval

So, my textbook goes about defining the invariant spacetime in the following way:

Consider two frames of references, S and S', with a relative speed to each other, coinciding at t=t'=0. At t=0, a light sparks from the origin of S, and therefore we get the following equation for the wavefront:

$(ct)^2 = x^2 + y^2 + z^2$.

We can do the same for S', so in the end we obtain

$(ct)^2 - x^2 - y^2 - z^2 = (ct')^2 - x'^2 - y'^2 - z'^2$.

Then my textbook defines the distance between these two events as

$\Delta S^2 := (c\Delta t)^2 - (\Delta x)^2 - (\Delta y)^2 - (\Delta z)^2$.

But here I'm getting confused. I'm assuming that we can say $\Delta x = x' - x$,

so that, if we take $y'=y$ and $z'=z$ for simplicity, we'd get

$\Delta S^2 = (S'-S)^2 = c^2\Delta(t'-t)^2 - (x'-x)^2$.

But this would not yield to our previous equation, because $(x'-x)^2 \neq x'^2 - x^2.$

So where am I making a mistake?

• It's meaningless to subtract x' and x, they are in different frames of reference, and would need to be translated to the same frame first, You have not been told thus far the relative speed of the frames, so cannot apply a lorentz transformation. That is not what the question wants. What's the next thing the question asks you to do? The 3rd equation might be "declarative" of the answer. – JMLCarter Jan 5 '17 at 22:25

You are misunderstanding, understandably, the meaning of $\Delta x$, etc. It, along with $\Delta t$, $\Delta y$, and $\Delta z$, represent the spacing between 2 specific events as described in the unprimed frame, not the spacing between a single event described in the two different frames. Consequently, $\Delta x \ne x-x'$. Rather $\Delta x = x_2-x_1$, and likewise for $y$, $z$, and $t$.
In your equation $(ct)^2-x^2-y^2-z^2=(ct')^2-x'^2-y'^2-z'^2$, you have already defined the two frames to be at the same position $(0,0,0)$ at $t=t'=0$ when the first event (emission of wavefront) occurs. The second event is the measurement of the space-time coordinates later. Another way to think of it is that $x$ and $x'$ are information about a single event, not two events.
What it should say is that, if you consider an inertial frame $S$ and two events, $E_1$ and $E_2$, then, in $S$ these events might have coordinates $t_1, x_1, y_1, z_1$ & $t_2, x_2, y_2, z_2$, then the invariant interval is $\Delta s^2 = (c(t_2-t_1))^2 - (x_2-x_1)^2 - (y_2-y_1)^2 - (z_2-z_1)^2$, and this interval is the same for the same two events in any inertial frame.
It's motivating this, I think. by noticing that $\Delta s^2 = 0$ for an event on the wavefront of a flash of light and the event where the flash of light happened, in any frame. But that's not quite enough, on its own, to justify the above claim.