Galaxies are already pretty huge, billions to trillions of stars whirling around a supermassive black hole. But that's not where their influence ends. A large, spherical halo of gas surrounds a galaxy, reaching vastly farther than the main population of stars, a bit like a galactic atmosphere.

Hubble observations of our nearest galactic neighbour, Andromeda, show just how huge these halos can get. According to a new analysis, the gaseous halos of Andromeda and the Milky Way are already touching across the 2.5-million-light-year space between the stellar discs.

If we could see Andromeda's halo in the night sky, it would appear to be over 100 times the apparent diameter of the full Moon.

010 andromeda haloImpression of Andromeda's halo. (NASA, ESA, J. DePasquale and E. Wheatley [STScI] and Z. Levay)

We can't see it, of course - not with our own eyes. But Hubble is not so limited. And its new survey of the Andromeda halo is helping us understand the galaxy's past, which in turn can help us understand how galaxies evolve.

"Understanding the huge halos of gas surrounding galaxies is immensely important," said astrophysicist Samantha Berek of Yale University.

"This reservoir of gas contains fuel for future star formation within the galaxy, as well as outflows from events such as supernovae. It's full of clues regarding the past and future evolution of the galaxy, and we're finally able to study it in great detail in our closest galactic neighbour."

The Andromeda galaxy is a lot like the Milky Way. They're both spiral galaxies. They're of similar size and mass. They both have relatively low star formation rates (although the Milky Way's is higher).

We can't easily interpret the Milky Way's halo, though, because, well, we're in it. So learning about Andromeda's halo may provide insights into the halo that surrounds our own galaxy.

A diffuse sphere of circumgalactic gas and plasma is pretty hard to see, so a team of researchers led by astrophysicist Nicolas Lehner of the University of Notre Dame turned to distant quasars.

These are galactic nuclei that are ravenously active, spewing vast amounts of radiation out into space as their supermassive black holes devour vast amounts of matter - some of the brightest objects in the Universe.

andromeda quasars(NASA, ESA, and E. Wheatley/STScI)

As the ultraviolet light of quasars close to Andromeda in the night sky travels through Andromeda's halo, some of it is absorbed by gases therein. By taking spectroscopic observations of this ultraviolet light using Hubble's Cosmic Origins Spectrograph, scientists can look for absorption features that reveal the presence of certain elements.

Previously, Lehman and his team used this method across six quasars to learn that Andromeda's halo was much, much larger than we had previously thought.

Now they have made the survey using 43 quasars, and were able to detect ionised gases of oxygen, silicon, and carbon in the space around Andromeda. By studying how this gas is distributed, they could not only map its extent, but discern a structure.

The researchers found that the halo extends between 1.3 and 1.85 million light-years from the galaxy. In this halo, they detected large amounts of the heavier elements that are forged during supernova explosions, then blasted out into space. And they found two distinct shells within the halo, one nested inside the other.

"We find the inner shell that extends to about a half million light-years is far more complex and dynamic," Lehner said. "The outer shell is smoother and hotter. This difference is a likely result from the impact of supernova activity in the galaxy's disc more directly affecting the inner halo."

Quasars have been used to probe the Milky Way's halo, but given how difficult the results are to interpret, the value of such an exercise has been limited. Now, however, the Andromeda data can be used to give context to the Milky Way data, and help us understand what we're seeing.

It can also help us perhaps better understand galactic mergers, the early stages of which are still quite mysterious. The Milky Way and Andromeda are headed for a merger in a few billion years, so it's interesting to learn that, through their halos, this merger may have already begun.

"This is truly a unique experiment because only with Andromeda do we have information on its halo along not only one or two sightlines, but over 40," Lehner said. "This is groundbreaking for capturing the complexity of a galaxy halo beyond our own Milky Way."

The research has been published in The Astrophysical Journal.