Edwin Hubble and his take

Our modern picture of the universe dates back to 1924 when Edwin Hubble demonstrated that our galaxy was not the only one. There were many others with vast tracts of empty space between them. 

The apparent brightness of a star depends on two factors: how much light it radiates (luminosity), and how far it is from us. 

For nearby stars we can measure their apparent brightness and their distance, and so we can work out their luminosity. Conversely, if we knew the luminosity of stars in other galaxies, we could work out their distance by measuring their apparent brightness. 

Hubble noted that certain types of stars always have the same luminosity when they are near enough for us to measure; therefore, he argued, if we found such stars in another galaxy, we could assume they had the same luminosity - and so calculate the distance to that galaxy. 

We cannot see the size or shape of many stars. So how to tell different types of stars apart? For he vast majority of them there is only one characteristic feature that we can observe - the color of their light. 

Newton discovered that if light from the sun passes through a triangular-shaped piece of glass (prism), it breaks up into its component colours (its spectrum) as in a rainbow. 

By focusing a telescope on an individual star or galaxy, one can similarly observe the spectrum of the light from that star or galaxy. Different stars have different spectra, but the relative brightness of the different colours is always exactly what one would expect to find in the light emitted by an object that is glowing red hot. 

Moreover, we find that certain very specific colors are missing from stars’ spectra, and these missing colors may vary from star to star. Since we know that each chemical element absorbs a characteristic set of very specific colors, by matching these to those that are missing from a star’s spectrum, we can determine exactly which elements are present in the star’s atmosphere.