# How is the equation for de Broglie wavelength actually derived?

I have seen the equation for de Broglie wavelength derived through equating Einstein's $$E=mc^{2}$$, and Planck's $$E=hf$$, using a substitution from $$c=f\lambda$$ to make things in terms of wavelength. From this the following result is derived: $$\lambda = \frac{h}{mc}$$ This makes sense to me under the assumption that such a wavelength exists. However, at this point a substitution is made for $$c$$ changing it to $$v$$. How is this valid? The speed of light is a specific velocity and in the case of Einstein's mass energy equivalence is important that it is such, and not just any velocity. Is there a good reason for this? And if not and this is just meant to be a dumbed down version to give to high school students, does anyone have a correct way of arriving at the desired result?