Hello all. When light goes through one medium to another, its velocity and wavelength change but frequency remains the same. If the wavelength of light decreases, the length between two crests decreases, doesn't that mean there will be more wave hence frequency will have to increase? I tried to find an animation that explains it, but couldn't find one. The other question is, when light is affected by gravity, this time its frequency and wavelength change, but its velocity remains the same. Well, light is not directly by gravity but its spacetime path is curved. Since we know E=hf, and in that case f changes thus light's energy also changes. How can its energy change when there's no force acting upon it? Why does sometime frequency change and sometimes velocity? Edit: Forgot to ask my last question. When measuring the frequency of light when it's under the effect of gravity, how do we know the device measuring the frequency is not affected by gravity?