Astronomers watched two stars in the Andromeda galaxy merge into one. The finding helps explain why some star pairs join together while others stay apart.