The spiral galaxy M81.
A galaxy is a large system of stars, along with interstellar material and (at least in some cases) dark matter, that is held together by mutual gravitational attraction. There are three basic types: the spiral galaxy, the elliptical galaxy, and the irregular galaxy, with masses ranging from about 100,000 solar masses in the case of the smallest dwarfs to several trillion solar masses in the case of the largest ellipticals. A lenticular galaxy is midway in form between a spiral and an elliptical. Galaxies range in size from the smallest dwarf galaxies only a few hundred light-years across with just a few million stars, through normal galaxies like our own Milky Way Galaxy, with a few hundred billion stars, to giant ellipticals spanning over hundreds of thousands of light-years and containing several trillion stars.
Various schemes have been devised to categorize galaxies (see galaxy classification).
Galaxies may be solitary, or in small groups like our Local Group, or in larger clusters of galaxies. In rich clusters of galaxies (those with many members within a relatively compact region), the brightest systems tend to be ellipticals and lenticulars, with spirals making up only 5 to 10% of the population. However, the proportion of spirals in these clusters was probably higher in the past, galaxy cannibalism and galaxy mergers having turned them into the more amorphous types. In low-density environments, spirals account for about 80% of the bright galaxy count.
Some galaxies display unusual activity in their cores associated with active galactic nuclei.