The solar system that encompasses the sun and its surrounding planets, including Earth, resides within the Milky Way galaxy. Prior to the discovery of dwarf galaxies that lie in proximity to the Milky Way, the spiral galaxy Andromeda was thought to be the closest to Earth at 2.2 million light years away. However, this distance is gradually decreasing as Andromeda is bound for a collision course with Milky Way, which is likely to occur in 5 billion years.
Modern astronomers have discovered several minor star systems that are closer to the Milky Way than Andromeda. The Canis Major Dwarf Galaxy is around 42,000 light years away from the center of the Milky Way. Other nearby galaxies include the Large and Small Magellanic clouds.Learn more about Planets