Galaxies in the universe come in all shapes and sizes. Some are giant spheres of stars many times larger than the Milky Way. Others are flattened disks, with pancakelike stellar swirls orbiting a central bulge. But others still, including our own, are arrangements of stars that dance in spirals around their center. Astronomers have long puzzled over how these spirals form, and a number of theories have been proposed. Now new observations are revealing the galactic-scale magnetic fields associated with these spirals, providing what may be vital clues to their formation.

In a paper posted on the preprint server and accepted for publication in the Astrophysical Journal, a team of astronomers performed observations from NASA’s Stratospheric Observatory for Infrared Astronomy (SOFIA), a telescope that files on a modified Boeing jet, to observe a galaxy called M77 with a new instrument called the High-Resolution Airborne Wideband Camera–Plus (HAWC+). Although M77 is some 47 million light-years from Earth, the team was able to use SOFIA’s far-infrared capabilities to observe the its magnetic field, finding it closely correlated with the galaxy’s star-filled spiral arms.

“The region between stars in our galaxy and in other galaxies is full of dust,” says Terry Jones of the University of Minnesota, one of the co-authors of the paper. “That dust absorbs the light from the stars, and it warms up and radiates in the far infrared. If you line all those up in the same direction, it acts like a weak polarizer, like a pair of [polarized] sunglasses. How do you line up all the [dust]? Well, that’s what the magnetic field does. The polarization of the light from this dust tells us the direction of the magnetic field.”

SOFIA was able to produce its stunning visualization of M77 thanks to its unique ability to fly high in the atmosphere, above layers of water vapor that would otherwise absorb the faint far-infrared signature emitted from dust in distant galaxies. “That was really not very possible before,” Jones says. “This is a new way to map or make pictures of other galaxies in polarized light in the far infrared. You can’t do it from the ground, because the atmosphere absorbs everything, and previous instruments weren’t sensitive enough.”

This study, the researchers say, is the first time astronomers have mapped another galaxy’s magnetic field in far-infrared light. That achievement is significant, notes Bruce Draine of Princeton University, who was not involved in the work, because that light is “almost entirely radiated by dust grains.” Although the dust particles themselves are too small to see, their large-scale alignment causes them to radiate more brightly, revealing their distribution across the entirety of M77.

How M77 and other galaxies get their spirals remains an open question in astronomy, although it is believed gravity has a major part to play. In one predominant model known as the density wave theory, denser regions of a galaxy rotate more slowly than their surroundings, meaning that the stars within them essentially bunch up into the spiral arms that we can observe from afar. And this effect may shape the magnetic field in a galaxy, rather than vice versa. “The magnetic field looks like it’s along for the ride,” Jones says. “In other words, the magnetic field itself is not telling us where the spiral arms should be; the spiral arms are telling us where the magnetic field points.”

Ronald Drimmel of the Astrophysical Observatory of of Turin in Italy, who was also not involved in the new study, says the existence of galaxy-spanning magnetic fields is “not a surprise.” But SOFIA’s revelation of very distinct large-scale patterns is novel and important. “It’s showing that the magnetic field in these galaxies isn’t just turbulent or random,” he says. “It’s not obvious that the magnetic field should be ordered in this regular way over large scales. So that is interesting”—and potentially relevant for solving the mystery of why some galaxies have a spiral shape while others do not.

Many galaxies are thought to get their shape through collisions with other galaxies. But the relative rarity of such cosmic collisions, in comparison with the prevalence of spiral galaxies, may demand a broader theory to explain the cosmic swirls. “Our theories of spiral structure are incomplete,” Draine says. “In some galaxies, it develops in a much more pronounced way than others. And exactly what determines whether the galaxy is going to have this very pronounced structure or less [discernible] spiral structure is not always clear.”

To get to the bottom of this question, studies that follow this latest SOFIA research will need to be conducted in higher resolution, says George Helou of the California Institute of Technology, who was not involved in that recent paper. Such high-resolution observations could show how a galaxy’s gas is compressed and shaped throughout the galaxy’s life. “We have a good working theory, spiral density wave theory, that was proposed six decades ago that seems to pass all the tests,” Helou says. “But it has many parameters that play into it. If I gave you all the parameters that we know about the disk of a galaxy, there isn’t a simple way for you to derive what the spirals should look like. We still have many aspects that we need to understand better.”

We have seen before, thanks to SOFIA, that wind emitted from a galaxy is aligned with its magnetic field. But this recent study gives us a whole new look into what role magnetic fields play inside galaxies—or at least, what shape they are formed into by the galaxies themselves. And, Jones says, there are tantalizing potential observations that can be made with SOFIA in the future that can give us a better handle on galactic shapes than ever before. “We can find them crashing into one another, and we haven’t observed that yet with this technique,” he says. “We haven’t measured the magnetic field geometry of [galaxies without spiral arms] yet either. So this is just the tip of the iceberg.”