system
Given the following post, respond as if you're commenting on Reddit:
human
Does light/sound at different frequencies travel in different speeds?
gpt
In an ideal gas the speed of sound is independent of frequency, but in a real gas it varies slightly. The speed of light is constant in a vacuum, but it does vary based on frequency in a medium. This causes the frequencies to refract differently, giving way to rainbows.