spacetime
A real(istic) time simulator.
spacetime
attempts to model time propagation of clocks across the Earth-Moon
system. It focuses on how network topology and time synchronization evolve in a
growing lunar ecosystem, evaluating both centralized and decentralized
Positioning, Navigation, and Timing (PNT) service network configurations.
This book serves as documentation for the spacetime
project and a guide to the
fundamental concepts that it seeks to model.
Research papers are available in the research-papers section.
If you find a mistake or have a suggestion, please open an issue and let me know about it!
Intuitions for Relativity
This section builds intuitions about relativity and spacetime.
Einstein’s theory of relativity describes how space and time are related based on the logical consequences of two core postulates:
- The laws of physics are the same in all inertial reference frames.
- The speed of light is the same in all inertial reference frames and is not affected by the speed of its source.
Demystifying Terms
The term inertial reference frame simply refers to a frame of reference where all objects follow Newton’s first law of motion:
Objects at rest remain at rest, and objects in motion remain in motion at a constant velocity in a straight line, unless acted upon by an external force.
For example, the inside of a car moving along a road at constant velocity and the inside of a stationary house are inertial reference frames.
The special in special relativity refers to the fact that it is a special case of general relativity: situations when objects are moving at constant velocities in a vacuum. When the theory is extended to follow what happens when objects accelerate, it is called general relativity.
From here on out, we will not worry about distinguishing between special or general relativity. They describe the same phenomena.
Here we will ignore the effects of light passing through a medium for the sake of brevity, but know that the physics still holds. This video provides an excellent intuition about how the speed of light can be constant and also how light moves “slower” through a medium.
TLDW; The “true” speed of light is still constant in any medium. The “slower” speed is a sort of illusion caused by “phase kicks” between the light and the medium as electromagnetic waves propagate through the medium.
Having the right mindset
When learning about relativity, it is important to approach the problem from a scientific perspective. The only way to learn about the universe is to make predictions and then test those predictions with measurements.
It is unsatisfying to say “let’s just accept that this is true” but, that’s part of the genius behind Einstein’s work. Einstein asks “What would happen if this is actually true?” Then he follows the logic to see the consequences of that truth and considers what must happen in order for our observations to be consistent with that truth.
Scientists have used this approach to make predictions about the universe for centuries. The predictions are then tested with measurements. If the measurements match the predictions, then we have evidence that suggests the prediction is true. Why is it true? We don’t know. Science cannot answer that question.
Every test science has invented to test relativity is true has shown that the observation matches the predictions made from following Einstein’s theory. We have to accept that we don’t know why because we can’t test which answer might be correct. It is an unanswerable question right now. Maybe someday there will be an invention that lets us know more about the universe but right now this is as far as we get.
More resources
Here are some excellent videos to get started:
The textbook
OpenStax has multiple textbooks with sections on relativity:
In the coming chapters we’ll see how relativity affects equations of motion for events measured between inertial reference frames. The majority of this work is based on the Relativity chapter in OpenStax University Physics Volume 3. We’ll be using the same notation and examples as the OpenStax book, but I’ll be adding some additional commentary and examples to help solidify the concepts.
Special Relativity
To begin, we develop some intuitions around the consequences of the speed of light being constant and that all velocities are measured relative to some frame of reference (aka, relativity).
To narrow the scope and really dial in our understanding of the fundamentals, consider the special case where all objects are moving at constant velocity, far from any gravity well (aka, special relativity). This is where Einstein started, too.
Let’s follow the logic and see where it takes us.
Einstein’s postulates
Einstein began with two postulates (source):
- The laws of physics are the same in all inertial reference frames.
- Light travels in a vacuum with the same speed in any direction in all inertial frames.
The “laws of physics” in our analysis are then only those that satisfy the first postulate. This also means that there is no “special” inertial reference frame with special properties. There is no “rest frame” or “absolute space”, only motion of one frame relative to another.
The second postulate states that the speed of light has the same definite speed for any observer, regardless of the motion of the source.
So, like Einstein, we will try our best to forget about what we think we know and instead focus on the consequences of the postulates.
Special Relativity
Inertial reference frames
The first key insight is to approach the problem with the understanding that motion is relative to the inertial reference frame of the observer.
An inertial reference frame is a frame of reference in which a body at rest remains at rest and a body in motion moves at a constant speed in a straight line unless acted upon by an outside force. (source)
In other words, in an inertial reference frame attached to an object that is not accelerating, it is impossible to tell if the object is at rest or moving at a constant velocity.
A blue dot is floating in interstellar space. The only object in sight is a red dot. The red dot is moving at a constant angular velocity around the blue dot.
Problem: Is the blue dot moving around the red dot, or is the red dot moving around the blue dot?
Solution: Trick question—the physics works the same way in both cases!
The speed of light is constant
The distance a photon travels in a given amount of time is constant in every inertial reference frame.
This statement is more complicated than it seems, but that’s a tale for another time.
- is defined as the distance traveled by a photon in 1 second.
- is not a measurement, it is a scientific constant. In fact, the definition of the meter is derived from the distance that light travels in seconds.
- Science has accepted that this value, , is what we have decided to call the speed of light.
It is key to pin the definition of this way because as we will see later, distance and time are not absolute, they are relative. The time or distance can change depending on the observer’s reference frame, but distance traveled by a photon divided by elapsed time is always .
Special Relativity
Time Dilation
The time experienced by an observer in its inertial frame is called its proper time. Something interesting happens when we compare the proper time of a body at rest to the proper time of a body in motion within the same inertial frame that teaches us an important lesson about the nature of time.
Time intervals have different values when measured in different inertial frames.
Time dilation is the lengthening of the time interval between two events for an observer in an inertial frame that is moving with respect to the rest frame of the events (in which the events occur at the same location).
The proper time interval between two events is the time interval measured by an observer for whom both events occur at the same location.
(source)
Consider a “light clock” that consists of a photon that bounces between two mirrors set a distance apart. We count one “tick” of the clock when the photon makes one full round trip. Since the speed of light is constant in all inertial reference frames, an observer will always observe the photon moving at the speed of light, , regardless of the motion of its source.
An astronaut observes a photon in the light clock on a spaceship moving at a constant velocity, , relative to the Earth. An astronomer on Earth also observes the same photon in the light clock. Both observers measure the time it takes for the photon to make one full round trip.
- The astronaut observes the photon moving at exactly the speed of light, .
- The astronomer observes the photon moving at exactly the speed of light, .
- The astronaut and astronomer disagree on the time it takes for the photon to
make one full round trip in the light clock.
- The astronaut observes the photon completing one round trip in .
- The astronomer observes the photon completing one round trip in .
Problem: Whose round-trip duration measurement is correct?
Solution: The astronaut and astronomer are both correct! It’s not a trick question, this time—we can solve it with 8th-grade math and disciplined logic.
In the astronaut’s inertial frame:
- The photon moves at speed .
- The light clock is at rest so the photon travels the distance between the mirrors in the time it takes to complete one round trip. This is our intuitive understanding of time in the everyday sense.
- The time it takes for the photon to make one full round trip is .
In the astronomer’s inertial frame:
- The photon moves at speed .
- The light clock is moving relative to the astronomer so the photon travels a
longer distance in the time it takes to make one full round trip in the clock.
- The photon travels sideways a distance in addition to the distance it travels up and down between the mirrors.
- Despite moving additional distance in this reference frame compared to the astronaut’s frame, the photon travels at speed in both reference frames.
- This means that in the astronaut’s frame, the photon travels more distance while moving at the same speed.
- The only way this can be true is if the elapsed time experienced by the astronaut, , is longer than the elapsed time experienced by the astronomer, , when observing the same photon in the astronomer’s reference frame.
We see here that both of Einstein’s postulates are satisfied, and we have not violated any laws of physics. Yet two observers measured the photon taking different durations to make the same trip in space. How can this be?
Remember that physics and science do not describe the truth, they describe math and logical axioms that are consistent with the observed data. As counterintuitive as it may be, special relativity overwhelmingly agrees with scientific observations.
In the astronomer’s reference frame, the photon moves across more space over the course of one “tick” of the clock. The only way the speed of the photon, , can be the same in all reference frames and yet travel across more distance in one reference frame than in another is if the elapsed time experienced by a moving object, , “dilates” compared to the elapsed time experienced by an observer at rest in the reference frame, .
Therefore, the time dilation equation is:
Special Relativity
Length Contraction
The relative speed between two inertial reference frames, , is the same in both frames. Think about the astronaut and astronomer in the light clock example from the previous chapter.
- The astronaut observes the astronomer moving at a constant speed, .
- The astronomer observes the astronaut moving at a constant speed, .
- The astronomer observes the elapsed time on the astronaut’s clock, , to be dilated by the Lorentz factor, .
Remember the definition of velocity, . Since we know that the time interval is dilated by the Lorentz factor, , then the distance traveled by the astronaut, , must also be stretched by to keep the velocity constant.
For any velocity less than the speed of light, , the length contraction factor is less than 1, meaning the length of the object in the moving frame is shorter than the length of the object in the stationary frame.
General Relativity
Now let’s bring our understanding of relative to the general case where there could be a gravity well nearby (aka general relativity).
General Relativity is a theory of gravity that describes how gravity affects the curvature of spacetime. It builds on the principles of Special Relativity, following the natural consequences of the constancy of the speed of light further and leading to the emergence of gravity and the idea that space and time are not independent axes, but rather our reference frames are composed of a continuous spacetime.
Curved time creates gravity
Reframing our understanding of gravity
In Newtonian physics, gravity is a force that pulls objects together. On Earth, this would look like a uniform force acting on all objects pulling them towards the ground. But our exploration of Einstein’s postulate on inertial reference frames showed us that we can “flip” our reference frame and the physics are the same By this definition it is impossible to tell if you are at rest or in motion. So taking that to the extreme, maybe you are at rest and the Earth is accelerating upwards towards you!
Now consider a photon. It travels in a straight line in space. In the reference frame where Earth is accelerating upwards, after a moment the photon is still traveling in a straight line but the ground is closer to it. More time passes and eventually the ground intersects the photon’s path. From the perspective of the Earth, it looks like the photon is bending towards the ground!
Video: Gravity bends light even though it has no mass
Now let’s get a laser and trace the path of its photons in the Earth’s reference frame. We observe that the photons are bent towards the ground, like before.
This time let’s measure the path of a photon at the top of the beam and at the bottom. To us, it appears that the photon at the top takes a longer path to reach the ground compared to the bottom photon. Our special relativity intuitions remind us that the speed of light is constant, so time must be slower for the top photon compared to the bottom photon. This is called gravitational time dilation.
I find this explanation profoundly unsatisfying. We can do better.
Geometric explanation
A more intuitive way to think about it is to think about it geometrically.
I don’t have the time or skills to make a beautiful animation for this, but the following video does an excellent job of explaining it:
Video: Gravity comes from time curving space
Curved spacetime
A key insight that will help us later is to understand that this definition holds true even if we morph the reference frame. So on the grid, an object would still move from point A to point B with respect to the reference frame. This is what we mean when we say that curved—all objects move along straight lines unless acted upon by a force, but the grid itself is getting morphed by gravity.
Video: Curved spacetime changes trajectories of light and matter
Intuitions for Timekeeping
Network Topology
Lunar Positioning, Navigation, and Timing
Applying Relativity to Vector Math
Now that we’ve come to grips with the fundamental concepts and intuitions of relativity, we can start applying these concepts to vector math.
So far we’ve seen how the speed of light postulate leads to time dilation and length contraction, but we’ve only scratched the surface of the implications of special relativity.
For example, momentum and energy. Momentum, , and kinetic energy, , are both conserved quantities in Newtonian mechanics. Pay close attention and you’ll see that both of these quantities depend on the velocity of the object—relativity will affect these quantities too!
This rabbit hole goes deep, eventually leading to the classic equation and more, but we’ll only cover the fundamentals and specific applications of relativity that relate to timekeeping and navigation in deep space.
Special relativity
Coordinate transformations between inertial reference frames
An event, , is a location and time coordinate relative to an inertial reference frame, . For simplicity, we’ll abbreviate the time derivatives as and . I’ve written it out below, expanded out into the , , and spatial components to remind us that these are vectors in 3D space.
But what if we want to define the same event relative to a moving reference frame, ?
Galilean Transformations
Suppose is moving with respect to at velocity .
In Newtonian mechanics, the transformation between two inertial reference frames is given by the Galilean transformations. This is the same thing you might have done in high school physics or an engineering course.
The underlying assumption here is that time is the same for observers in and . So the we can simply differentiate the position vector to get the velocity and acceleration vectors for the event in the moving reference frame.
Observers in and will measure the same acceleration for the event. Because mass is unchanged by the transformation, the force measured by the observers will be the same and Newton’s laws hold. All is well and you get an in physics class.
Testing against Einstein’s postulates
Let’s see if Einstein’s postulate that the speed of light is the same for all inertial reference frames holds when applying the a Galilean transformation.
We can test this by calculating the speed of a photon in and .
This is not true, so the Galilean transformation violates the speed of light postulate!
The issue comes from the assumption that time is the same for observers in and , which we know from the previous chapter is not true. In most cases, the relative motion is much smaller than the speed of light, , so the Galilean transformation is a good approximation. But if is significant compared to or we want to be very precise over long distances, we need a more accurate transformation that accounts for the effects of relativity.
Lorentz Boosts
Good news, someone already figured this out! The Lorentz transformations are a set of equations that describe how to transform coordinates between two inertial reference frames that are in relative motion and are consistent with the speed of light postulate.
Shorthand for this operation is to call it a Lorentz boost (source).
Recall our previous example with the astronaut and the astronomer. Let’s say the astronomer’s frame of reference is and the astronaut’s frame of reference is , moving at velocity relative to and the axis is the direction of motion.
The astronomer observes the origin of at time to have a displacement . The astronomer also observes the displacement of a photon in the astronaut’s light clock from the origin of as .
The origin of is moving at velocity relative to . An event occurs at coordinate in and at coordinate in .
- The displacement of the origin of is .
- The displacement of the event in is .
- THe displacement of the event in is the displacement of plus the displacement after accounting for relativity.
Problem: What is the displacement of the event in ?
Solution: In previous chapters we derived the time dilation and length contraction equations that relate the time and distance between two inertial reference frames. Let’s apply them here to transform between and .
therefore
Vectorized Lorentz Boosts
Wikipedia has a great explanation of how to apply a Lorentz boost to a vector.