The shape of the universe is a subject of investigation within physical cosmology. Cosmologists and astronomers describe the geometry of the universe which includes both local geometry and global geometry. The shape of the universe is loosely termed topology, even though strictly speaking it goes beyond topology.
Introduction to the shape of the universe.
The shape of the universe can be determined by measuring the average density of matter within it, assuming that all matter is evenly distributed, rather than the distortions caused by 'dense' objects such as galaxies. This assumption is justified by the observations that, while the universe is "weakly" inhomogeneous and anisotropic (see the large-scale structure of the cosmos), it is on average homogeneous and isotropic.
Considerations of the geometry of the universe can be split into two parts; the local geometry relates to the Observable universe, while the global geometry relates to the universe as a whole - including that which we can't measure.
Local geometry and the shape of the universe.
The local geometry is the geometry describing the observable universe. Many astronomical observations, such as those from supernovae and the Cosmic Microwave Background radiation, show the observable universe to be homogeneous and isotropic and infer it to be accelerating. In General relativity, this is modelled by the Friedmann-Lemaître-Robertson-Walker (FLRW) model. This model, which can be represented by the Friedmann equations, provides a local geometry of the universe based on the mathematics of Fluid dynamics, i.e. it models the matter within the universe as a perfect fluid. Although stars and structures of mass can be introduced into an "almost FLRW" model, a strictly FLRW model is used to approximate the local geometry of the observable universe.
Spatial curvature and the shape of the universe.
The homogeneous and isotropic universe allows for a spatial geometry with a constant curvature. One aspect of local geometry to emerge from General Relativity and the FLRW model is that the density parameter, Omega (O), is related to the curvature of space. Omega is the average density of the universe divided by the critical energy density, i.e. that required for the universe to be flat (zero curvature). The curvature of space is a mathematical description of whether or not the Pythagorean theorem is valid for spatial coordinates. In the latter case, it provides an alternative formula for expressing local relationships between distances.
If the curvature is zero, then O = 1, and the Pythagorean theorem is correct. If O > 1, there is positive curvature, and if O < 1 there is negative curvature; in either of these cases, the Pythagorean theorem is invalid (but discrepancies are only detectable in triangles whose sides' lengths are of cosmological scale). If you measure the circumferences of circles of steadilly larger diameters and divide the former by the latter, all three geometries give the value p for small enough diameters but the ratio departs from p for larger diameters unless O = 1. For O > 1 (the sphere, see diagram) the ratio falls below p: indeed, a great circle on a sphere has circumference only twice its diameter. For O < 1 the ratio rises above p.
Astronomical measurements of both matter-energy density of the universe and spacetime intervals using supernova events constrain the spatial curvature to be very close to zero, although they do not constrain its sign. This means that although the local geometries are generated by the Theory of Relativity based on spacetime intervals, we can approximate it to the familiar geometries of three spatial dimensions.
Local geometries and the shape of the universe.
There are three categories for the possible spatial geometries of constant curvature, depending on the sign of the curvature. If the curvature is exactly zero, then the local geometry is flat; if it is positive, then the local geometry is spherical, and if it is negative than the local geometry is hyperbolic.
If the observable universe is spatially "nearly flat", then a simplification can be made whereby the dynamic, accelerating dimension of the geometry can be separated and omitted by invoking comoving coordinates. Comoving coordinates, from a single frame of reference, leave a static geometry of three spatial dimensions.
Under the assumption that the universe is homogeneous and isotropic, the curvature of the observable universe, or the local geometry, is described by one of the three "primitive" geometries:
Even if the universe is not exactly spatially flat, the spatial curvature is close enough to zero to place the radius at approximately the horizon of the observable universe or beyond.
Global geometry and the shape of the universe.
Global geometry covers the geometry, in particular the topology, of the whole universe - both the observable universe and beyond. While the local geometry does not determine the global geometry completely, it does limit the possibilities, particularly a geometry of a constant curvature. For a flat spatial geometry, the scale of any properties of the topology is arbitrary and may or may not be directly detectable. For spherical and hyperbolic spatial geometries, the probability of detection of the topology by direct observation depends on the spatial curvature. Using the radius of curvature as a scale, a small curvature of the local geometry, with a corresponding scale greater than the observable horizon, makes the topology difficult to detect. A spherical geometry may well have a radius of curvature that can be detected. In a hyperbolic geometry the radius scale is unlikely to be within the observable horizon.
Two strongly overlapping investigations within the study of global geometry are:
Compactness of the global shape
A compact space is a general topological definition that encompasses the more applicable notion of a bounded metric space. In cosmological models, it requires either one or both of: the space has positive curvature (like a sphere), and/or it is "multiply connected", or more strictly non-simply connected.
If the 3-manifold of a spatial section of the universe is compact then, as on a sphere, straight lines pointing in certain directions, when extended far enough in the same direction will reach the starting point and the space will have a definable "volume" or "scale". If the geometry of the universe is not compact, then it is infinite in extent with infinite paths of constant direction that, generally do not return and the space has no definable volume, such as the Euclidean plane.
If the spatial geometry is spherical, the topology is compact. Otherwise, for a flat or a hyperbolic spatial geometry, the topology can be either compact or infinite.
In a flat universe, all of the local curvature and local geometry is flat. In general it can be described by Euclidian space, however there are some spatial geometries which are flat and bounded in one or more directions. These include, in two dimensions, the cylinder and the torus. Similar spaces in three dimensions also exist.
A positively curved universe is described by spherical geometry, and can be thought of as a three-dimensional hypersphere.
One of the endeavors in the analysis of data from the Wilkinson Microwave Anisotropy Probe (WMAP) is to detect multiple "back-to-back" images of the distant universe in the cosmic microwave background radiation. Assuming the light has enough time since its origin to travel around a bounded universe, multiple images may be observed. While current results and analysis do not rule out a bounded topology, if the universe is bounded then the spatial curvature is small, just as the spatial curvature of the surface of the Earth is small compared to a horizon of a thousand kilometers or so.
Based on analyses of the WMAP data, cosmologists during 2004-2006 focused on the Poincaré dodecahedral space (PDS), but also considered horn topologies to be compatible with the data.
A hyperbolic universe (frequently but confusingly called "open") is described by hyperbolic geometry, and can be thought of as something like a three-dimensional equivalent of an infinitely extended saddle shape. For hyperbolic local geometry, many of the possible three-dimensional spaces are informally called horn topologies.
The ultimate fate of an open universe is that it will continue to expand forever, ending in a Heat Death, a Big Freeze or a Big Rip.