Curved space often refers to a spatial geometry which is not "flat", where a flat space is described by Euclidean geometry. Curved spaces can generally be described by Riemannian geometry though some simple cases can be described in other ways. Curved spaces play an essential role in general relativity, where gravity is often visualized as curved space. The Friedmann–Lemaître–Robertson–Walker metric is a curved metric which forms the current foundation for the description of the expansion of space and shape of the universe. Simple two-dimensional example A very familiar example of a curved space is the surface of a sphere. While to our familiar outlook the sphere looks three-dimensional, if an object is constrained to lie on the surface, it only has two dimensions that it can move in. The surface of a sphere can be completely described by two dimensions since no matter how rough the surface may appear to be, it is still only a surface, which is the two-dimensional outside border of a volume. Even the surface of the Earth, which is fractal in complexity, is still only a two-dimensional boundary along the outside of a volume. Embedding One of the defining characteristics of a curved space is its departure from the Pythagorean theorem. In a curved space . The Pythagorean relationship can often be restored by describing the space with an extra dimension. Suppose we have a non-euclidean three-dimensional space with coordinates . Because it is not flat . But if we now describe the three-dimensional space with four dimensions () we can choose coordinates such that . Note that the coordinate is not the same as the coordinate . For the choice of the 4D coordinates to be valid descriptors of the original 3D space it must have the same number of degrees of freedom. Since four coordinates have four degrees of freedom it must have a constraint placed on it. We can choose a constraint such that Pythagorean theorem holds in the new 4D space. That is . The constant can be positive or negative. For convenience we can choose the constant to be where now is positive and . We can now use this constraint to eliminate the artificial fourth coordinate . The differential of the constraining equation is leading to . Plugging into the original equation gives . This form is usually not particularly appealing and so a coordinate transform is often applied: