The concepts of Distance on a 2D curved space are here extended to a 3D space that *might* be curved.
We can start with the generic infinitesimal distance in a static 3D universe, but this time in spherical coordinates instead of polar coordinates.
\(\theta\) is shown in Figure 9.2, but here we are 3D beings, positioned on \(O\) (the center of the sphere) and the point \(O\) is tangent to a 4D-sphere.
In our 3D space, a generic infinitesimal displacement will correspond to the following distance in spherical coordinates:

$$ds_s^2=dx^2+dy^2+dz^2=dr^2+r^2(d\theta^2+\sin^2{\theta}d\phi^2).$$

Like the 2D creature before, we now have to assume an abstract dimension which we cannot visualize easily.
Let’s call the fourth dimension \(w\), then the general change in coordinates in the *full* four dimensional space will be:

$$ds_s^2=dr^2+r^2(d\theta^2+\sin^2{\theta}d\phi^2)+dw^2.$$

But we can only work on a 3D curved space, so following exactly the same steps and conventions as our 2D friend, we arrive at:

$$ds_s^2={dr^2\over 1-Kr^2}+r^2(d\theta^2+\sin^2{\theta}d\phi^2).$$

In a non-static universe (with a scale factor a(t)), the distance can be written as:

$$ds^2=c^2dt^2-a^2(t)[d\chi^2+r^2(d\theta^2+\sin^2{\theta}d\phi^2)].$$

JavaScript license information

GNU Astronomy Utilities 0.20 manual, April 2023.