Which is hotter - a red star or a blue star? Why?

I know it's the blue star, but I don't know why...

The radiation emitted by a star is to a good approximation thermal radiation. This then implies that the spectrum will be the Planck spectrum. The higher the temperature, the shorter the wavelength at which the emitted power will peak.

To determine which star is hotter - a red star or a blue star - we need to understand the relationship between a star's temperature and its color. This relationship is described by the concept of stellar classification, which categorizes stars based on their surface temperature.

Stars emit light at different wavelengths, and the color of light corresponds to its wavelength. Cooler stars emit light primarily in longer wavelengths, such as red or orange, while hotter stars emit light in shorter wavelengths, such as blue or white.

The relationship between a star's surface temperature and its color is described by Wien's displacement law. This law states that the wavelength at which a star emits the most light is inversely proportional to its temperature. In other words, hotter stars peak at shorter wavelengths, while cooler stars peak at longer wavelengths.

Based on this information, we can conclude that a blue star is hotter than a red star because blue corresponds to shorter wavelengths of light. The shorter the wavelength, the higher the energy of the photons, indicating a higher surface temperature.

Therefore, to determine which star is hotter, we examine their colors and compare them using the knowledge of stellar classification and Wien's displacement law. In this case, since blue stars have shorter wavelengths and emit higher energy photons, they are hotter than red stars.