Our Universe
Given all that, how do we know the universe as a whole is flat? One way is to look at the distribution of galaxies in the universe. One principle of cosmology is that on large enough scales the universe is homogeneous and isotropic. In other words, galaxies are distributed fairly evenly, and the universe looks pretty much the same in all directions. That isn’t true on the scale of galaxy clusters, but on a cosmic scale across billions of light years it seems to be true. If the universe wasn’t flat, then the light from distant galaxies would be distorted similar to gravitational lensing, but on a cosmic scale. We don’t see such an effect, so it seems the universe is flat. A more precise test of cosmic flatness uses the cosmic microwave background (CMB). From fluctuations in the CMB we can determine both the Hubble constant of the universe and the mass density. From these we can calculate the flatness of the universe. What we find is that to the limits of observation, the universe appears to be flat.
Although we know with high certainty that the universe is flat (or very, very close to flat), we still aren’t sure why it’s flat. It is sometimes referred to as the flatness problem, and it remains an unsolved mystery in cosmology.