Cosmology (physical cosmology, to be precise) is the scientific study of the structure and evolution of the universe as a whole.

Modern cosmology took off in the 1920s. Albert Einstein published his general theory of relativity in 1916. Before Einstein, time and space were more or less considered an eternal and unchanging stage on which events played out. General relativity revealed that the time and space are in a sense mixed together, and that the structure of this spacetime both affects and is affected by the motion of mass in the universe.

In the 1920s Edwin Hubble proved that the "spiral nebulas" known in the sky are actually far outside our own galaxy, and must therefore be entire other galaxies rather than some kind of interstellar matter clouds in our own. The galaxies in every direction also look similar (statistically), suggesting that the universe is isotropic and homogeneous (similar in its contents and laws of physics in every direction). The assumption of an isotropic and homogeneous universe is known as the cosmological principle, and is the main axiom of physical cosmology. If it were not true, and distant parts of the universe could be radically different in terms of structure or physical laws, we would be unable to reason about the universe as a whole, based on the physics we know.

It was also noticed that other galaxies move away from us. It turns out that the farther away a galaxy is, the faster it is moving away. This relationship between distance and velocity is known as Hubble's law. Since every distant galaxy, in every direction, moves away from us, the simplest explanation is that the universe as a whole is expanding, making the galaxies move away from each other. Nearby galaxies do not move away since the local galaxy group is bound by gravity strong enough to resist drifting apart due to the expansion, but other galaxy groups move away.

Einstein's equations, when applied to an entire universe did not permit a stable solution, but only a growing or shrinking one. Einstein originally thought this a flaw and added an ad hoc term in the equations to counter it. After the expansion of the universe was discovered, the term was removed and Einstein called it "his biggest mistake".

If the universe is expanding, it must have been smaller in the past, all the way down to a single point. This theory became known (at first derisively) as the Big Bang theory, as the early universe must have been very hot.

The alternative was the steady state theory, in which the universe was thought to be expansing, but new matter forming "to fill in the gaps", as it were. In this case the universe could have been expanding eternally both in the past and future without ever having been compressed into a small volume, and never really changing.

As looking into the distance also means looking into the past, if the big bang theory were true, we would eventually see into the small and hot early universe if we looked far enough. In a sense, this is what we do, when we observe the cosmic microwave background (CMB). This is radiation which was left all over the universe when it finally became transparent in its early days (see below).

As distances in the universe expand, electromagnetic waves travelling through the universe stretch out, becoming less energetic. Visible light shifts into the redder end of the visible spectrum. Because of this the effect is known as cosmic redshift (there are other causes for redshift).

The CMB was originally thermal radiation emitted by the very hot plasma which filled the young universe. When the universe cooled down and became transparent to this radiation, it continued on, filling the universe in every direction, redshifting into longer wavelengths until now it is detected as millimetre-scale microwaves.

The CMB is strong evidence for the Big Bang as opposed to the steady state theory. Combined with other evidence, the steady state theory is now abandoned.

In the late 1990s, it was discovered that the expansion of the universe is actually accelerating. This was somewhat unexpected as it requires some kind of previously unknown effect which counters the force of gravitation slowing down the expansion. This has led to the cosmological constant being added back into Einstein's equations, this time in a way that makes the solution universe expand in an accelerating way.

Rough timeline of the universe

Here I present a timeline of some significant events in the history of the universe so far. Many things are omitted, see e.g. this article for a more detailed timeline.