When an EM wave goes into say a denser medium and its velocity is decreased how does its wavelength and frequency change? I read that the frequency remains constant but the wavelength changes. Is this true? If so does that mean the wave gets compressed when it enters a denser medium. Does the amplitude decrease too?