In the experiment where electrons are sent one by one through a slit on a screen behind which there is an electron detector, the electron is said to have a definite position at the time it crosses the slit (which can be made very narrow to make $\Delta x$ as small as we like) so it must have a large uncertainty in momentum which is why the electron must diffract. Now is it not possible to measure the time taken by the electron to reach the detector wall and thus compute its momentum? How does the diffraction process make determining its momentum harder? If I know the position of the point which lights up in the detector wall and the time taken by the electron to reach there from the slit I can easily calculate $p_x, p_y$. Does this not violate the uncertainty relation if my slit is arbitrarily small.?
[Physics] How is the uncertainty principle protected for a single electron diffraction
diffractionelectronsheisenberg-uncertainty-principlequantum mechanics
Related Solutions
Diffraction and the HUP are related because they have the same mathematical description.
The Fourier transform to the canonical commutation relationship and the Heisenberg uncertainty principle. The FT is the unitary (norm and inner product preserving, i.e. probability-preserving) transformation between position co-ordinates and momentum co-ordinates, and it can be shown that, given any pair of quantum observables $\hat{X}$ and $\hat{P}$ that fulfill the canonical commutation relationship $X\,P-P\,X=i\,\hbar\,\mathrm{id}$, the transformation between co-ordinates wherein $\hat{X}$ and $\hat{P}$ are simple multiplication operators is precisely the Fourier transform. I show how this must be true in this answer here. This leads to the Heisenberg inequality through the pure mathematical properties of the FT as I discuss in this answer here and here. A special case observation that summarises the behaviour intuitively is that a function and its FT cannot both have compact support (domain wherein they are nonzero): if you confine a wavefunction (i.e. quantum state) to a small range of positions, its Fourier transform is the same quantum state written in momentum co-ordinates, so the spread over momentums increases as you confine the positions more and more.
The analogy with diffraction is direct. Huygens's principle, or whatever method you want to use to explain diffraction is explained in detail in my answer here, this one here, this one here, or here. But a summary is this. A plane wave running orthogonal to a plane means that the phase on that plane is uniform. AS the wave tilts, its phase variation on the plane is of the form $\exp(i\,\vec{k}\,\cdot\,\vec{x})$, where $\vec{k}$ is the wavevector and $\vec{x}$ the transverse position on the plane. So, to find out what spread of directions you have in a light wave, you take its Fourier transform over the plane. The Fourier transform at point $k_x,\,k_y$ is simply the superposition weight of the plane wave component with direction defined by $k_x,\,k_y$. The more spread out in Fourier space a wave is, the wider the spread of propagation directions are important, and the more swiftly it will diffract. So a wavelength size pinhole in a screen means that the spread of directions will be wide, simply by dent of the Fourier transform uncertainty product. Indeed, for small diffraction angles, $\sqrt{k_x^2+k_y^2}/k \approx \theta$, where $\theta$ is the angle the plane wave component makes with the normal to the plane. Indeed the basic uncertainty product for FTs shows that $\Delta x\,\Delta k_x = \Delta x\,\Delta \theta\,k \geq \frac{1}{2}$ where $\Delta x$ is the slit width and $\Delta \theta $ the angular spread of diffracted light.
Strictly speking, the physics of diffraction cannot be explained as the HUP (i.e. as arising from the canonical commutation relationships) because there is no position observable $\hat{X}$ for the photon, so you can't think of $\Delta\,x\,\Delta p$. There are most certainly pairs of canonically commuting observables: for example the same components of the electric field and magnetic field observable for the second quantised electromagnetic field are conjugate observables. The reason HUP descriptions work is the mathematical analogy I have described above.
The uncertainty principle is a simple consequence of the idea that quantum mechanical operators do not necessarily commute.
In quantum mechanics, you find that the state which describes a state of definite value of an observable $A$ is not the state which describes a state of definite value for an observable $B$ if the commutator of both observables $[A,B]$ is not zero. (Formally, the two operators are not simultaneously diagonalizable.)
You just write down the definition of the standard deviation of the operator $A$ on a state $\psi$, $$ \sigma_A(\psi) = \sqrt{\langle A^2\rangle_\psi - \langle A\rangle^2_\psi}$$ where $\langle\dot{}\rangle_\psi$ is the expectation value in the state $\psi$ and with a bit of algebraic manipulation (done e.g. on Wikipedia) we find that $$ \sigma_A(\psi)\sigma_B(\psi)\ge \frac{1}{2}\lvert \langle[A,B]\rangle_\psi\lvert$$
Now, the standard deviation (or "uncertainty") of an observable on a state tells you how much the state "fluctuates" between different values of the observable. The standard deviation is, for instance, zero for eigenstates of the observable, since you always just measure the one eigenvalue that state has.
Plugging in the canonical commutation relation $$ [x,p] = \mathrm{i}\hbar$$ yields the "famous" version of the uncertainty relation, namely $$ \sigma_x\sigma_p\ge \frac{\hbar}{2}$$ but there is nothing special about position and momentum in this respect - every other operator pair likewise fulfills such an uncertainty relation.
It is, in my opinion, crucial to note that the uncertainty principle does not rely on any conception of "particles" or "waves". In particular, it also holds in finite-dimensional quantum systems (like a particle with spin that is somehow confined to a point) for observables like spin or angular momentum which have nothing to do with anything one might call "wavenature". The principle is just a consequence of the basic assumption of quantum mechanics that observables are well-modeled by operators on a Hilbert space.
The reason how "waves" enter is that the uncertainty relation for $x$ and $p$ is precisely that of the "widths" of functions in Fourier conjugate variables, and the Fourier relationship we are most familiar with is that between position and momentum space. That the canonical commutation relations are equivalent to such a description by Fourier conjugate variables is the content of the Stone-von Neumann theorem.
However, it is the description by commutation relations and not that by Fourier conjugacy that generalizes to all quantum states and all operators. Therefore, it is the commutation relation between the operators that should be seen as the origin of their quantum mechanical uncertainty relations.
Best Answer
The problem discussed here is about the duality of wave/particle. The physics of an electron is quantum mechanics, and the duality wave-particle is crucial. In fact, an electron is neither a particle(sphere) neither a wave. In the double slit experiment, the electron can be considered as a particle when the detector perturb the system, or like a wave without the detector perturbing the system.
If the electron is behaving like a particle, it will NOT have an interference pattern, and passing like a sphere through only one in the holes. But when the electron is not perturbed with a measurement, it will behave like a wave PASSING through all holes. More here(https://en.wikipedia.org/wiki/Double-slit_experiment)
An interesting question is the scale of the measurement(perturbation). We expect that an infinitesimal perturbation to change a little bit the behavior of the system, and a smaller perturbation to change drastically the behavior of the system destroying the wave behavior. But in fact even a smaller perturbation destroy the wave nature of the particle.