Gravity Lab

Guides › Galaxy collisions

When galaxies collide

Galaxies with hundreds of billions of stars pass through each other, and hardly any of the stars ever touch.

Collisions without crashes

Galaxies collide all the time on cosmic timescales. Our own Milky Way is still absorbing the remains of smaller galaxies it has swallowed. Yet when two galaxies merge, almost no stars hit each other. Stars are tiny compared with the gaps between them. If the Sun were a grain of sand, its nearest neighbour would be another grain more than ten kilometres away. Two galaxies pass through each other like two clouds of dust.

What gravity does change is the shape of each galaxy. The stars are pulled into long, curving tidal tails and bridges of stars stretching between the two galaxies. You can see these in real photographs of colliding pairs such as the Antennae Galaxies and the Mice.

The Toomres' insight

In 1972, the brothers Alar and Juri Toomre explained those shapes with a simple model that ran on the computers of the time. Each galaxy's mass pulls on the other as a whole, and the individual stars are treated as tracers that feel both galaxies' gravity but not each other's. Because stars almost never interact one-on-one, this approximation gets the shapes right. Gravity Lab's galaxy collider is built the same way.

Dark matter, and why galaxies merge

The Toomres' model left one thing out. Most of a galaxy's mass isn't in its stars. It's in a huge, invisible halo of dark matter, much larger than the visible disk. As one galaxy moves through another's halo, its gravity gathers a wake of dark matter behind it, and that wake pulls it back. This effect is called dynamical friction, first described by Subrahmanyan Chandrasekhar in 1943.

Dynamical friction is what turns a fly-by into a merger. Each close pass drains a little orbital energy. The galaxies swing apart, fall back together, and pass again, closer each time, until their cores sink into one. Gravity Lab models each halo as a Hernquist profile, a mathematical shape that matches simulated dark-matter halos well, and applies Chandrasekhar's drag as the galaxies move through each other.

The Milky Way and Andromeda

The Andromeda Galaxy is about 2.5 million light-years away and approaching us at roughly 110 kilometres per second. For years the standard forecast, based on Hubble measurements, was a head-on merger in about 4.5 billion years. Newer studies that also include the gravity of neighbouring galaxies such as Triangulum and the Large Magellanic Cloud are less certain. They put the chance of a merger within the next ten billion years at about even. The outcome depends sensitively on Andromeda's sideways motion, which is hard to measure.

That uncertainty is exactly what the collider lets you explore. It starts from Andromeda's measured position and velocity, and you can change them:

If the galaxies do merge, the result is often nicknamed Milkomeda. Over the following billion years, the tangled spiral disks settle into one large elliptical galaxy, and the two central black holes sink together and eventually merge.

What happens to the Sun?

Almost certainly nothing dramatic. The chance of another star hitting the Sun, or even passing close enough to disturb the planets, is tiny. The Sun's orbit around the galaxy would change, though. It might be thrown into the outskirts of the merged galaxy, or onto a long looping path through it. The collider tracks where the Solar System ends up. (The Sun itself will be swelling into a red giant over roughly the same timescale, which matters far more to the Earth.)

Make your own collision

In Sandbox Mode, you can add spiral galaxies, dwarf galaxies and giant ellipticals, then drag them and throw them at each other. Try a slow, close pass between two spirals to raise the longest tidal tails. Then try the same encounter with one galaxy spinning the other way and compare the results.