A Byte of PhysicsLogo

Spacetime as geometry

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.

Think like a programmer

Use immutable event records with a declared coordinate convention. Avoid a bare 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.

Model checklist

Inputs
Two events `{ position, time }` in metres and seconds, plus vacuum light speed c.
State
Coordinate differences Δx and Δt between the same event pair.
Rule
Calculate c²Δt² − Δx² using one named metric sign convention.
Output
A signed interval value and its causal classification.
Check
A Lorentz boost changes coordinates but preserves the computed interval.

In one spatial dimension with the (+ −) convention,

\[s^2=c^2(\Delta t)^2-(\Delta x)^2\]

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.

Try this experiment

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.

Where this model breaks

This is flat spacetime in one spatial dimension. It omits transverse coordinates, curvature and gravity, acceleration, synchronization protocol, measurement uncertainty, and global coordinate issues. The sign convention can be reversed in other texts; code must name the chosen convention instead of comparing raw values across APIs.

Summary

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.

Glossary

Self-check

  1. Why is c multiplied by time before combining it with position?
  2. What sign identifies a spacelike interval in this convention?
  3. What must remain unchanged after a Lorentz boost?

Sources

Model contract

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})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

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.

Guided experiment

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.

Where this model breaks

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.

Summary

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.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Spacetime as Geometry into a test

Represent events as coordinate data and use invariant intervals as relativistic model checks.

  1. Name the inputs and units that the relativity model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: