The Andromeda Galaxy is the Milky Way's sister galaxy. It is located 2 million light years away from Earth. The Andromeda Galaxy has more stars than the Milky Way, a total of about 1 trillion, in comparison to our 200 - 400 billion. However, recent measurements suggest that the Milky Way may in fact be more massive, with a larger dark matter halo. Mass estimates for the Andromeda Galaxy are in the neighborhood of 7.1 × 1011 solar masses.
It used to be thought that the Andromeda Galaxy and the Milky Way are inevitably going to collide in a long period of time. This is no longer thought to be the case, although the collision could happen. If it does, it will occur in five billion years. For the solar system, located in the galactic arms, this would not be a very extreme event — star density in the local neighborhood would roughly double. Stellar collisions would remain rare, although the collision of the supermassive black holes located in the galactic cores could release a huge amount of energy.
The Andromeda Galaxy and the Milky Way Galaxy are the largest galaxies in the Local Group, which contains about 30 galaxies total, most of them dwarf galaxies. Both these galaxies have a barred spiral structure, and the center of mass for the Local Group lies between them, which is why both galaxies are accelerating towards each other.
Prior to 1925, when Edwin Hubble proved that the Andromeda object was another galaxy using Cepheid variable stars, Andromeda was called the Great Andromeda Nebulae. The Andromeda Galaxy is one of the most distant objects that can be seen with the naked eye — the Triangulum Galaxy being the most distant, at 3 million light years — and has been on star charts since the year 905, when it was observed and noted by the Persian astronomer Abd Al-Rahman Al Sufi. Originally, it was referred to as "the Little Cloud." The Andromeda Galaxy is named after the constellation in which it can be found, Andromeda.