Work Step by Step
When you push the string straight down onto a fret, you effectively shorten its length, and the corresponding wavelength of the standing waves. The wave speed on the string doesn’t change, because the tension and linear mass density are unaffected. We know that $v = \lambda f$, so if the wave speed v remains constant, shortening the wavelength must increase the oscillation frequency. This corresponds to a higher pitch note.