The Andromeda Galaxy (IPA: ), also known as Messier 31, M31, or NGC 224 and originally the Andromeda Nebula, is a barred spiral galaxy with the diameter of about approximately from Earth and the nearest large galaxy to the Milky Way. The galaxy's name stems from the area of Earth's sky in which it appears, the constellation of Andromeda, which itself is named after the princess who was the wife of Perseus in Greek mythology. The virial mass of the Andromeda Galaxy is of the same order of magnitude as that of the Milky Way, at . The mass of either galaxy is difficult to estimate with any accuracy, but it was long thought that the Andromeda Galaxy is more massive than the Milky Way by a margin of some 25% to 50%. This has been called into question by early 21st-century studies indicating a possibly lower mass for the Andromeda Galaxy and a higher mass for the Milky Way. The Andromeda Galaxy has a diameter of about , making it the largest member of the Local Group in terms of extension. The Milky Way and Andromeda galaxies are expected to collide in around 4–5 billion years, merging to potentially form a giant elliptical galaxy or a large lenticular galaxy. With an apparent magnitude of 3.4, the Andromeda Galaxy is among the brightest of the Messier objects, and is visible to the naked eye from Earth on moonless nights, even when viewed from areas with moderate light pollution. Observation history Andromeda has been visible to the naked eye, given dark skies, throughout history; as such, it cannot be said to have been "discovered" by any one individual. Around the year 964, the Persian astronomer Abd al-Rahman al-Sufi was the first to formally describe the Andromeda Galaxy. He referred to it in his Book of Fixed Stars as a "nebulous smear" or "small cloud". Star charts of that period labeled it as the Little Cloud. In 1612, the German astronomer Simon Marius gave an early description of the Andromeda Galaxy based on telescopic observations. Pierre Louis Maupertuis conjectured in 1745 that the blurry spot was an island universe. In 1764, Charles Messier cataloged Andromeda as object M31 and incorrectly credited Marius as the discoverer despite its being visible to the naked eye. In 1785, the astronomer William Herschel noted a faint reddish hue in the core region of Andromeda. He believed