interesting geodesic simulation: https://michaelmoroz.github.io/TracingGeodesics/

Planck units

$$ \hbar=c=G=k_B=1 $$

Smooth, expanding universe

Metric

A metric converts observer-dependent coordinates into invariants. It is obviously dependent on the coordinates being used. For example, in non-relativistic situations, distance is an invariant. So the metric for Cartesian coordinates would be $dl^2=\Sigma_{i,j=1,2}\,g_{ij}dx^idx^j$ , where $g_{ij} = \delta_{ij}$ which is the Kronecker delta function

$$ g_{ij}=\delta_{ij}=\begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix} $$

By Einstein’s convention, the sum is often left out of the equation to yield $ds^2=g_{ij}dx^idx^j$

Latin letters are used for summing 1-3, and greek letters are used for 0-3.

For Minkowski space-time (special relativity), the invariant is called proper time:

$$ ds^2= \eta_{\mu \nu}dx^{\mu}dx^{\nu} $$

where

$$ \eta_{\mu\nu}=\begin{pmatrix}-1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1\end{pmatrix} $$

If $ds^2>0$, events are separated by a time-like interval (meaning they are in each other’s light cones), otherwise they are separated by a space-like interval. If $ds^2=0$, then the events are simultaneous. For an expanding universe, the scale factor has to included to form the Friedmann-Lemaitre-Robertson-Walker (FLRW) metric for a flat/Euclidean universe:

$$ g_{\mu\nu}=\begin{pmatrix}-1 & 0 & 0 & 0 \\ 0 & a^2(t) & 0 & 0 \\ 0 & 0 & a^2(t) & 0 \\ 0 & 0 & 0 & a^2(t)\end{pmatrix} $$