If the Universe is expanding and all galaxies are moving apart from one another, why is it that the Milky Way and Andromeda will one day collide?
Thanks for the great question! To get to the answer, we will need to look at which forces operate on small and large astronomical scales (distances). The two fundamental forces at play, in this case, are gravity and dark energy. Gravity is certainly the more familiar of the two, so let’s start there.
On the smaller scales of the universe, gravity is the dominant force. We see gravity in action every day on Earth when we jump or drop our beloved phones, and it is famously responsible for causing an apple to hit Sir Isaac Newton in the head. These Earthly scales are actually some of the smallest scales on which gravity dominates. On slightly larger scales, gravity is in charge of holding together the solar system, the Milky Way galaxy, and all of the nearby galaxies (known as the Local Group) including Andromeda. On scales much larger than the size of the Local Group, the gravitational attraction between two galaxy-sized objects becomes dramatically weaker (Newton’s Law of Universal Gravitation is an inverse square law), and dark energy takes over. So, what is dark energy?
In the late 1920s, Edwin Hubble determined that the universe is expanding at an accelerating rate. This was a key discovery that even altered Albert Einstein’s view of the universe (check out Einstein’s “biggest blunder”). Astronomers call the mysterious force driving the universe apart “dark energy” (NASA). Unfortunately, we don’t know very much about dark energy beyond that. Hopefully, work done at the University of Texas at Austin and McDonald Observatory using the Hobby-Eberly Telescope Dark Energy Experiment (HETDEX) will provide us with further insights in the coming years.
Returning to your question, galaxy collisions happen on relatively small scales in an astronomical sense. The strong gravitational attraction between the Milky Way and Andromeda wins out over the dark energy attempting to drive them apart, and will ultimately cause a collision to occur. But don’t lose any sleep over our inevitable collision with Andromeda, it won’t happen for a few billion years!