# Why and How does different depths of water affect the wavelength of a wave on such medium?

When a water wave passes through from a deep water to shallow water , refraction is said to occur due to it's decrease in wavelength and thus decrease in speed , based on the formula v=fλ. Question is , why should wavelength decrease in the first place?

The relation between the angular frequency $$\omega=2\pi f$$ and wavenumber $$k=2\pi /\lambda$$ for waves on shallow water is $$\omega = k \sqrt{gh},$$ where $$g$$ is the gravitational acceleration and $$h$$ the water depth. Since the frequency cannot change, a reduction in depth leads to an increase in $$k$$ and hence a shorter wavelength. To derive the $$\omega(k)$$ relation you need to set up and solve the equations of motion for the fluid. I don't know any easy short cut to this. Water waves are not simple things.
The formula $$v = f \lambda$$
$$\lambda = \frac{v}{f}.$$