How Galaxies Form and Evolve: From the First Stars to Today

Photo: Ndumiso Mvelase / Pexels
Look up on a clear night far from city lights and you are seeing a single galaxy — our Milky Way — a disk of roughly 200 to 400 billion stars, about 100,000 light-years across. Point almost any telescope toward a dark patch of sky and you will find more galaxies: the Hubble eXtreme Deep Field, a photograph taken over 23 days by the Hubble Space Telescope, showed approximately 5,500 galaxies in a patch of sky smaller than one-tenth the diameter of the full Moon. Extrapolating to the whole sky, astronomers estimate there are roughly 2 trillion galaxies in the observable universe. Understanding how these vast structures formed from the smooth, featureless gas of the early universe is one of the central achievements of modern astrophysics — and thanks to the James Webb Space Telescope, we are now watching it happen at the edge of the observable cosmos.
Key takeaways
- Galaxies formed from dark matter halos — the gravitational scaffolding that allowed ordinary matter to collapse and form stars
- The first galaxies appeared within a few hundred million years after the Big Bang; JWST has now detected galaxies from the universe's first few hundred million years
- Galaxies grow through both in-situ star formation and by merging with smaller galaxies; the Milky Way will merge with Andromeda in about 4.5 billion years
- Galaxy shape reflects evolutionary history: spirals are actively forming stars; ellipticals have mostly used up their gas and are "retired"
The Scaffolding: Dark Matter Halos
You cannot understand galaxy formation without dark matter. The ordinary matter — baryons, the protons and neutrons that make up stars, gas, and everything you can see — is only about 5% of the universe's total energy content. Dark matter, the invisible gravitating substance that does not interact with light, constitutes about 27%. And it was dark matter that built the first large structures.
In the early universe, dark matter was not perfectly smooth. Tiny density fluctuations — seeded by quantum processes during cosmic inflation — created regions slightly denser than average. Dark matter, feeling only gravity and no radiation pressure, began collapsing into these overdense regions faster than ordinary matter could. It formed what cosmologists call dark matter halos: roughly spherical, gravitationally bound clumps of invisible matter.
Once dark matter halos grew massive enough, their gravity trapped ordinary gas (mostly hydrogen and helium) that had been free-streaming through space. The gas fell into the halos, heated up, and eventually cooled by radiating energy — a process that led to the first stars. These first stars, called Population III stars, were almost certainly massive — perhaps hundreds of times the mass of our Sun — and burned brilliantly and briefly before exploding as supernovae. Their deaths enriched the surrounding gas with the first heavy elements beyond hydrogen and helium, setting the stage for the next generation of stars and, eventually, for the formation of planets.
The First Galaxies: What JWST Is Revealing
Before the James Webb Space Telescope, our view of the early universe was limited. The Hubble Space Telescope could reach back to galaxies existing about 400-500 million years after the Big Bang. JWST, with its infrared-optimized optics and 6.5-meter mirror, can see further and in finer detail — galaxies from the universe's first few hundred million years.
The early results from JWST, released from 2022 onward, have genuinely surprised astronomers. The telescope has found galaxies that are more massive, more structured, and more chemically evolved than theoretical models predicted they should be at such early times. Some of these galaxies, existing when the universe was only 300–600 million years old, have stellar masses comparable to galaxies that took billions of years to build in our theoretical models.
This does not mean the Big Bang theory is wrong — the models being challenged are models of galaxy formation, which are built on top of the Big Bang framework. But it does mean our understanding of how quickly early galaxies grew needs revision. The leading explanation involves more efficient star formation in the early universe — perhaps early galaxies converted their gas into stars at higher efficiency than galaxies do today.
Growth by Merger: The Hierarchical Model
Modern cosmology predicts that galaxies did not form as isolated islands. They formed in halos of all sizes and then grew through a process called hierarchical structure formation: small halos merged to form larger ones, galaxies merged to form larger galaxies, and groups of galaxies assembled into galaxy clusters.
The evidence for this merger-driven growth is all around us. The Milky Way has its own retinue of satellite galaxies — the Large and Small Magellanic Clouds are visible to the naked eye from the Southern Hemisphere — which are gravitationally bound and will eventually be absorbed. The Sagittarius Dwarf Galaxy is currently being torn apart and merged into the Milky Way, its stars strewn into long tidal streams that archaeologists of the galaxy trace with astrometric surveys like Gaia.
The most dramatic example visible to backyard astronomers is the Antennae Galaxies (NGC 4038/4039), two spiral galaxies in the process of colliding and merging, their gravitational interaction pulling out vast tidal tails of stars and triggering intense bursts of star formation. When galaxies merge, the gas clouds collide, compress, and form new stars at prodigious rates — these are starburst galaxies.
The Milky Way and the Andromeda Galaxy (M31) are approaching each other at about 110 kilometers per second. In approximately 4.5 billion years, they will begin to merge in a slow-motion cosmic collision that will take billions of years to complete. The result will be a large elliptical galaxy — sometimes nicknamed "Milkomeda" — with a different morphology than either parent. Our Sun will likely be flung to a new orbit in the merged galaxy; the probability of any individual stars colliding is tiny because the space between stars in both galaxies is enormous.
The Life Cycle of Galaxies: From Blue to Red
Galaxies exist in two broad populations, and understanding the transition between them is one of the central questions in galaxy evolution.
Blue, irregular, and spiral galaxies are actively forming new stars from cold gas. Hot young stars are blue and bright; where star formation is active, a galaxy glows blue-white. The Milky Way, at roughly one new star per year, is a relatively modest but still active star-forming galaxy.
Red, elliptical galaxies have "quenched" star formation — they have used up or expelled their cold gas and are now dominated by old, red stars. They are essentially retired. The transformation from star-forming to quenched is called galaxy quenching, and it can happen through several mechanisms: the supermassive black hole at the galaxy's center can become active (a quasar), heating and blowing out the cold gas that would otherwise form stars. Supernovae can do the same thing in smaller galaxies. And environmental effects — a galaxy falling through the hot gas of a cluster — can strip away its cold gas reservoir.
The distribution of galaxy colors in the local universe shows a clear bimodality: a "blue cloud" of star-forming galaxies and a "red sequence" of quenched ones, with relatively few galaxies in between (the "green valley"). This suggests quenching is relatively fast once it begins.
FAQ
What is the largest known galaxy? IC 1101, a supergiant elliptical galaxy at the center of the Abell 2029 cluster, is estimated to span about 6 million light-years — roughly 60 times the diameter of the Milky Way. It likely formed through many mergers over cosmic time.
How do we know dark matter exists if we can't see it? Dark matter's existence is inferred from multiple independent lines of evidence: the rotation curves of spiral galaxies (stars orbit too fast to be held by visible matter alone), gravitational lensing of background galaxies by galaxy clusters (the lensing is too strong for visible matter alone), the CMB power spectrum, and large-scale structure simulations that match observations only when dark matter is included.
Why does the Milky Way have a spiral structure? Spiral arms are density waves — regions of slightly higher density that propagate through the disk like ripples, compressing gas and triggering star formation. The brightness of spirals is largely a tracer of star formation, not permanent bands of stars. The pattern is maintained by the gravitational physics of differentially rotating disks.
Will the Sun survive the Milky Way-Andromeda merger? Almost certainly yes. Galactic mergers are not the destructive collisions they might appear — the vast spaces between individual stars mean that direct stellar collisions are extraordinarily rare. The Sun may be relocated to a very different orbit in the merged galaxy but will survive intact, along with any planets.
What is the Cosmic Web? The Cosmic Web is the large-scale structure of the universe: galaxies and galaxy clusters are not randomly distributed but are arranged in a vast network of filaments, sheets, and voids. This structure is the direct result of the dark matter halos forming along the overdense regions seeded by inflation. The filaments channel cold gas into galaxies and facilitate the flow of galaxies toward clusters.
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Neural Networks and Solar Storm Prediction: AI Watches the Sun to Protect Earth
A powerful solar storm could knock out global power grids and satellites. Neural networks are our early warning system against the Sun's most destructive outbursts.

AI and Astrobiology: Machine Learning in the Search for Life Beyond Earth
From Mars rock targeting to exoplanet spectra, AI is helping astrobiologists sort possible signs of life from chemistry that looks alive but is not. Here is what it does, what it has not done, and why the hardest step is still human.

What Is the Great Attractor? The Mysterious Force Pulling Our Galaxy
Something enormous is pulling the Milky Way, Andromeda, and thousands of other galaxies in one direction at roughly 600 km/s. For decades it hid behind the Milky Way's dust. What astronomers found when they looked was not what they expected.

How Many Galaxies Are in the Universe?
Astronomers' galaxy counts have swung from 100 billion to 2 trillion and back to hundreds of billions. Here's why the number keeps changing, and what it actually means.

Complete Space Guide 2026: Astronomy and Cosmology
Astronomy and cosmology explained: the Solar System, stars, black holes, galaxies, the Big Bang, exoplanets and how we observe, with a deep dive for each topic.

Deep Learning and Star-Galaxy Classification: Teaching Computers to Read the Sky
Deep learning systems now classify billions of celestial objects with superhuman accuracy, enabling sky surveys that would take human astronomers millennia to complete.