Final answer:
A gas molecule does not emit electromagnetic energy at the same wavelength when heated, but rather at a range of wavelengths based on temperature, leading to different colors emitted as the temperature changes. The emitted energy's intensity and average photon energy increase with temperature, shifting the peak of emission towards shorter wavelengths.
Step-by-step explanation:
When a gas molecule heats up, it does not necessarily emit electromagnetic radiation at the same wavelength. Instead, the energy of the emitted photons can cover a broad range of wavelengths. In the context of a gas such as hydrogen, the electrons within the atoms may be excited to higher energy levels and, upon transitioning back to lower energy states, will emit light of specific colors related to the energy difference between those levels. However, when considering a dense gas or solid object as a blackbody, the object emits photons at all wavelengths based on its temperature.
A higher temperature corresponds to higher energy emissions and can also lead to a change in the apparent color of the light emitted: as the temperature of an object increases, it emits light at shorter wavelengths and transitions from red to orange to yellow to white. This is evident when observing the glowing of an electrical stove element or the steel in a blast furnace. The intensity of this radiation also increases with temperature, as indicated by the height of the distribution curve.
Overall, an increase in temperature causes an increase in both the power emitted at all wavelengths and the average energy of the photons, leading to a shift in the peak of the emission towards shorter wavelengths. This is why hotter stars give off more energy at every wavelength than cooler stars.