The Andromeda Galaxy (IPA: /ænˈdrɒmɪdə/), also known as Messier 31, M31, or NGC 224 and originally the Andromeda Nebula (see below), is a barred spiral galaxy approximately 2.5 million light-years (770 kiloparsecs) 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 Ethiopian (or Phoenician) princess who was the wife of Perseus in Greek mythology.
In Greek mythology, Andromeda (/ænˈdrɒmɪdə/; Greek: Ἀνδρομέδα) is the daughter of the king of Aethiopia, Cepheus, and his wife, Cassiopeia. When Cassiopeia boasts that she is more beautiful than the Nereids, Poseidon sends the sea monster Cetus to ravage the coast of Aethiopia as divine punishment. Andromeda is chained to a rock as a sacrifice to sate the monster, but is saved from death by Perseus, who marries her and takes her to Greece to reign as his queen.