Here's why:
* Frequency is a fundamental property of the light wave itself, determined by the source of the light. It represents the number of wave crests passing a point per second.
* Speed of light changes as it enters a different medium. This is because the light interacts with the atoms in the medium, slowing it down.
* Wavelength changes to compensate for the change in speed. The relationship between speed, frequency, and wavelength is: speed = frequency x wavelength.
So, while the speed and wavelength change, the frequency remains constant as the light transitions between media.