In the early 20th century, astronomers Henry Russell and Ejnar Hertzsprung constructed a diagram called the Hertzsprung-Russell diagram (HR diagram) that compares the luminosity and surface temperature of stars. The HR diagram serves as an important tool for astronomers to classify stars and reveal relationships between stars by showing them at different ages and stages of evolution. It classifies stars into groups based on their surface temperatures from hottest, blue-white group O stars to coolest, red group M stars.