A galaxy is a gravitationally bound system of stars, stellar remnants, interstellar gas, dust, and dark matter. The word galaxy is derived from the Greek galaxias , literally “milky”, a reference to the Milky Way. Galaxies range in size from dwarfs with just a few hundred million (108) stars to giants with one hundred trillion (1014) stars, each orbiting its galaxy’s center of mass.

Many galaxies are thought to have black holes at their active centers. The Milky Way’s central black hole, known as Sagittarius A*, has a mass four million times greater than the Sun.As of March 2016, GN-z11 is the oldest and most distant observed galaxy with a comoving distance of 32 billion light-years from Earth, and observed as it existed just 400 million years after the Big Bang.

Recent estimates of the number of galaxies in the observable universe range from 200 billion (2×1011) to 2 trillion (2×1012) or more, containing more stars than all the grains of sand on planet Earth.Most of the galaxies are 1,000 to 100,000 parsecs in diameter and separated by distances on the order of millions of parsecs (or megaparsecs).

The space between galaxies is filled with a tenuous gas having an average density of less than one atom per cubic meter. The majority of galaxies are gravitationally organized into groups, clusters, and superclusters. At the largest scale, these associations are generally arranged into sheets and filaments surrounded by immense voids.

The Greek philosopher Democritus (450–370 BCE) proposed that the bright band on the night sky known as the Milky Way might consist of distant stars.Aristotle (384–322 BCE), however, believed the Milky Way to be caused by “the ignition of the fiery exhalation of some stars that were large, numerous and close together” and that the “ignition takes place in the upper part of the atmosphere, in the region of the World that is continuous with the heavenly motions.” The Neoplatonist philosopher Olympiodorus the Younger (c. 495–570 CE) was critical of this view, arguing that if the Milky Way is sublunary (situated between Earth and the Moon) it should appear different at different times and places on Earth, and that it should have parallax, which it does not. In his view, the Milky Way is celestial.Actual proof of the Milky Way consisting of many stars came in 1610 when the Italian astronomer Galileo Galilei used a telescope to study the Milky Way and discovered that it is composed of a huge number of faint stars.A few galaxies outside the Milky Way are visible in the night sky to the unaided eye. In the 10th century, the Persian astronomer Al-Sufi made the earliest recorded identification of the Andromeda Galaxy, describing it as a “small cloud”.

The first project to describe the shape of the Milky Way and the position of the Sun was undertaken by William Herschel in 1785 by counting the number of stars in different regions of the sky. He produced a diagram of the shape of the galaxy with the Solar System close to the center. Using a refined approach, Kapteyn in 1920 arrived at the picture of a small (diameter about 15 kiloparsecs) ellipsoid galaxy with the Sun close to the center. A different method by Harlow Shapley based on the cataloguing of globular clusters led to a radically different picture: a flat disk with diameter approximately 70 kiloparsecs and the Sun far from the center.

129 galaxies are known to exist within 3.59 megaparsecs (11.7 million light-years) of the Solar System, in ascending order of distance.Andromeda Galaxy is the nearest major galaxy to the Milky Way and was often referred to as the Great Andromeda Nebula in older texts. It received its name from the area of the sky in which it appears, the constellation of Andromeda, which was named after the mythological princess Andromeda.

Andromeda is approximately 220,000 light years across, and it is the largest galaxy of the Local Group, which also contains the Milky Way, the Triangulum Galaxy, and other smaller galaxies. Despite earlier findings that suggested that the Milky Way contains more dark matter and could be the largest in the grouping . Around the year 964, the Persian astronomer Abd al-Rahman al-Sufi described the Andromeda Galaxy, in his Book of Fixed Stars as a “nebulous smear”.