Something about the shape of a spiral galaxy looks almost perfect, like a cosmic carousel spinning in the dark. For centuries, scientists have gazed at these elegant structures and asked a simple-seeming question: how do they keep their shape?

The Whirlpool Galaxy, also called M51, was the first spiral ever identified, back in 1845. Astronomers back then had no idea what they were looking at. They thought M51 and similar objects were just spiral-shaped clouds of gas floating in space. It took until the early 1920s, when Edwin Hubble proved that distant "nebulae" were actually separate galaxies like our own Milky Way, before anyone understood what spirals really were.

Today, astronomers know of several hundred thousand spiral galaxies. They look simple, as if their arms should be easy to explain. But they are not. The stars and gas in a galaxy's arms appear to rotate around the center, yet the inner parts of a galaxy actually spin faster than the outer edges. That means in just a few hundred million years, the arms should wind up tighter and tighter until they disappear entirely.

Since spirals clearly do persist, scientists have searched for another explanation. One idea, called density wave theory, compares spiral arms to a traffic jam. The jam stays in place, but individual cars keep driving through it and out the other side. This explains some of what we see, but not everything. It cannot explain why spiral arms survive as long as they do, since physical forces should slow them down over time.

Now, new research is bringing us closer to answers. A team led by Beverly Smith, a professor at East Tennessee State University, has examined thousands of galaxies using data from the European Space Agency's Euclid space telescope. Euclid was launched two years ago to study how the universe expands, but its observations also let scientists peer billions of years into the past and clearly see the spiral arms of distant galaxies.

Smith and her colleagues compared spiral galaxies with two long arms to those with three or more arms. They found patterns that suggest arm number relates to a galaxy's mass and how concentrated its stars are at the center. The results were published in The Astrophysical Journal.

"Spiral galaxies are among the most recognizable objects in the universe, yet we've never fully understood why they develop different numbers of spiral arms," Smith said. "By studying thousands of galaxies, we're beginning to identify patterns that reveal how these systems formed and evolved over billions of years."

The research is only the beginning. Scientists now have a new tool, Euclid, that lets them study galaxies as they appeared up to 10 billion years ago. That gives researchers a chance to watch spiral galaxies change over time and maybe finally solve the mystery of why those beautiful arms last so long.