system
Given the following post, respond as if you're commenting on Reddit:
human
How does a hot object like metal or magma produce light?

From my understanding, something has to be changing chemically to produce light, but a glowing hot steel rod or magma produce light by just being physically hot. How does his work?
gpt
This effect is called blackbody radiation. One aspect of temperature is the random vibration of atoms. Sometimes this vibration results in an electron in the atom being bumped to a higher energy state, which also slightly cools the atom. When the electron falls back down to a lower energy state, it emits light at a specific wavelength depending on where it fell from and to. Wavelength determines energy and color.

The highest energy light that room temperature objects emit is infrared, or more red than red. The cells in your eyes are not able to detect this or any lower wavelength of light. As the temperature of an object increases, both the total amount of light and the maximum wavelength increase, and around 750K or 480 degrees C, visible red light is emitted. As the temperature increases further, light in the green and eventually blue is emitted. This is why a Tungsten light-bulb at 3000K looks white, all visible wavelengths are being emitted.