A Byte of PhysicsLogo

Lorentz transformations

Lorentz transformations map the coordinates of the same event between inertial frames moving relative to one another. They do not move the event or change the physics; they change the coordinate record used to describe it. Unlike a Galilean update, changing frames mixes position and time.

Think like a programmer

Represent an event as an immutable { position, time } record in metres and seconds. A boost is a pure function that returns a new record. Test it two ways: the spacetime interval must match before and after a boost, and applying the opposite boost must reconstruct the original event within floating-point tolerance.

Model checklist

Inputs
An event position x in m, time t in s, relative frame speed v in m/s, and c in m/s.
State
One event coordinate record and the derived Lorentz factor γ.
Rule
Apply the one-dimensional boost equations with one consistent sign convention.
Output
Coordinates x′ and t′ in the moving frame.
Check
c²Δt² − Δx² is preserved; boost by v then −v round-trips an event.

For a frame moving at +v along the x axis,

\[x'=\gamma(x-vt),\qquad t'=\gamma\left(t-\frac{vx}{c^2}\right),\qquad \gamma=\frac{1}{\sqrt{1-v^2/c^2}}\]

The invariant interval for two events is

\[s^2=c^2(\Delta t)^2-(\Delta x)^2\]
function lorentzBoost({ position, time }: Event, speed: number): Event {
  const gamma = lorentzFactor(speed);
  return {
    position: gamma * (position - speed * time),
    time: gamma * (time - (speed * position) / SPEED_OF_LIGHT ** 2),
  };
}

For example, take an event at x = 3c m and t = 5 s, then boost at 0.6c. The coordinates change, but the interval from the origin remains the same. A test that only checks one transformed coordinate can miss a sign error; an interval test plus a forward-and-reverse round trip checks the whole contract.

Try this experiment

Prediction: A boost can change the order of spatially separated events, but it cannot change a timelike interval into a spacelike one.

Write two event records and calculate their interval. Apply a 0.6c boost, then an opposite boost. Predict which values must return exactly in the mathematical model and which will return only within floating-point tolerance in code.

Where this model breaks

This is a one-dimensional special-relativity boost between inertial frames. It omits y and z coordinates, acceleration, gravity and curved spacetime, clock synchronization procedures, measurement uncertainty, and finite signal bandwidth. At speeds extremely close to c, γ and cancellation require careful numerical scaling.

Summary

Treat a Lorentz transform as a reversible coordinate mapping with interval and round-trip tests. Keep its units and sign convention visible; then the code makes relativity's change of simultaneity concrete without pretending the coordinates are physical objects.

Glossary

Self-check

  1. Which two coordinates does a Lorentz boost mix?
  2. What invariant catches a sign error in a boost?
  3. What operation should undo a boost by +v?

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 Lorentz Transformations, 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 Lorentz Transformations 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 Lorentz Transformations into a test

Implement Lorentz coordinate mappings with inverse and spacetime-interval regression tests.

  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: