The universe measures flat, yet it could still loop back on itself
Draw a giant triangle across space and add up its angles. Measurements so far say they total 180 degrees, meaning space is flat to within a fraction of a percent. That settles the curvature, but not the overall shape: a flat universe could still be infinite, or closed like the surface of a doughnut.
Cosmologists split the question in two. Local geometry concerns curvature, which general relativity ties to the gravity of matter and energy. Global topology concerns the overall form: whether space is finite or infinite, and whether it is simply connected like a sphere or multiply connected like a torus. Relativity is built on differential geometry and can only describe the local picture, and an endless variety of global shapes satisfy Einstein's equations. A three-dimensional torus, for example, has zero curvature everywhere yet is finite.
Curvature comes in three flavours. In flat space a triangle's angles add to 180 degrees and Pythagoras holds. With positive curvature, like Earth's surface, they exceed it; a triangle from the equator to a pole has at least two right angles. With negative curvature, like a saddle or mountain pass, they fall short.
Physicists test this in two ways. One compares the universe's average density with the critical density needed for flatness, measured at about 9.47 times ten to the minus 27 kilograms per cubic metre. Final Planck results released in 2018 put the curvature parameter at 0.0007 plus or minus 0.0019, consistent with flatness. The other is geometric: the BOOMERanG experiment measured angles in the cosmic microwave background and found triangles summing to 180 degrees within error. Together with WMAP, these observations pin the observable universe as flat to within 0.4 percent, though not the sign of any tiny curvature.
The catch is reach. We can see a roughly spherical region about 46 billion light-years in radius, and only back to the microwave background, emitted around 370,000 years after the Big Bang. The whole universe is generally thought to be larger. If part of it is small and closed, light could wrap around, producing repeated images of the same distant object or matching patterns in the microwave glow.
Source: Shape of the universe