Cassiopeia was a boastful woman, and foolishly bragged that she was more beautiful than Juno, the queen of the gods, and the Nereids. In order to avenge the insult to his nymphs, Neptune sent a sea monster to ravage the Ethiopian coast. (Some accounts state that the constellation Cetus represents the sea monster, but a more common view of Cetus is that he is a peaceful whale.)
The horrified king consulted Ammon, the oracle of Jupiter, who said that Neptune could be appeased only by sacrificing Cassiopeia's beautiful virgin daughter, Andromeda, to the monster. Andromeda was duly chained to a rock on the coast, fully exposed to the monster. Fortunately for her, the hero Perseus happened to be flying by on his way back from killing the Gorgon Medusa
Perseus tells Andromeda's parents that he'll kill the monster if they agree to give him their daughter's hand in marriage. They of course give him their consent, and Perseus kills the monster. (His exact method of doing so varies in different versions of the myth. Ovid has Perseus stab the monster to death after a drawn-out, bloody battle, while other versions have the hero simply hold up the head of Medusa, turning the monster to stone.) Andromeda is freed, and the two joyously marry.
Andromeda is represented in the sky as the figure of a woman with her arms outstreched and chained at the