Relativity describes an occurrence as an event with both a position and a time coordinate. Different observers can disagree about the separate position difference and time difference between two events, yet agree about a particular combined quantity: the spacetime interval.
distance field: in spacetime, an interval is calculated from two events and a metric. Keep time in seconds and position in metres so c * Δt has the same unit as Δx before you subtract their squares.In one spatial dimension with the (+ −) convention,
The sign classifies the separation. s² > 0 is timelike: a slower-than-light traveler could connect the events. s² = 0 is lightlike: a light signal could connect them. s² < 0 is spacelike: no causal signal limited by c can connect them. This classification is more informative than asking whether the numbers “look close.”
function spacetimeInterval(first: Event, second: Event) {
const dt = second.time - first.time;
const dx = second.position - first.position;
return SPEED_OF_LIGHT ** 2 * dt ** 2 - dx ** 2;
}
If Δt = 5 s and Δx = 3c m, then s² = (25 − 9)c² m², which is positive. A 0.6c Lorentz boost changes both coordinate differences but should produce the same 16c² m² result up to floating-point tolerance. That is a better test than freezing expected transformed coordinates to many rounded digits.
Prediction: A boost can change Δx and Δt without changing whether an interval is timelike, lightlike, or spacelike.
Classify event pairs with(Δt, Δx) equal to (2 s, c m), (2 s, 2c m), and (2 s, 3c m). Predict the signs before calculating. Then describe which pair could be connected by a light signal.Spacetime geometry turns “where” and “when” into one typed event model. Calculate the interval with explicit units and sign convention, classify it, and use Lorentz-invariance tests whenever a coordinate transformation is involved.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Spacetime as Geometry, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Relativity, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Spacetime as Geometry as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Represent events as coordinate data and use invariant intervals as relativistic model checks.