Do photons violate the uncertainty principle, given that they have a constant speed $c$ with no uncertainty? I have a very basic understanding of quantum physics, but as I understand it the uncertainty principle says that the more precisely you know a particle momentum and the less you know the particle's position.
But I wonder with the photon: given that the velocity is a constant $c$ so there is no uncertainty at all in the speed (and so in the momentum), does that mean for a photon that the uncertainty of the position is "infinite"?
 A: As explained in If photons have no mass, how can they have momentum?, it is impossible to assign photons a classical momentum $p=mv$, because their mass is zero.
Instead, the photon momentum is determined by its wavelength $\lambda$ via
$$
p = \frac h\lambda,
$$
where $h$ is Planck's constant. This means that the only way to have a completely determined momentum (i.e. $\Delta p=0$) is to have a completely determined wavelength, and that can only be done if the wavepacket has infinite extent (because, if it doesn't, what's the wavelength at the edge of the wavepacket). Thus, the photon momentum is fully compatible with the Heisenberg uncertainty principle.
A: There is an uncertainty in momentum!  Because, for a photon,
$$p = \frac{h}{\lambda} = \frac{h \nu}{c}$$
where $p$ is the magnitude of the momentum, $\lambda$ is the wavelength of the photon and equivalently $\nu$ is the frequency.
So even though photons travel at $c$, their momentum can be uncertain if their frequency is uncertain.
And this ties in exactly with the uncertainty principle: when looking at a wave, be it light, sound, or whatever, how accurately you can know the wavelength depends on how distributed in space (equivalently, in time) the wave is: a brief pulse of sound, say, doesn't have a well-defined frequency at all, while a sound that goes on for a very long time does (or may do).  So a photon has a well-defined frequency, and hence a well-defined momentum, only if it is very spread out in space, while a photon which is localised has an ill-defined frequency and hence an ill-defined momentum.
