If electrons are flowing through a conductor, then we have a current. During my study, I’ve learnt that increasing the speed of electrons increases the current. If those electrons pass through some resistor, their speed will drop. Yet, I hear all the time that the current after the resistor is the exact same as it was before the resistor. How could it be the same if electron speed diminishes?
Why does the change in the speed of a moving electron not change the current?
First, let's consider an electron beam in a vacuum, such as in a cathode ray tube. In a cathode ray tube, there is a strong electric field between the cathode and anode. As a result, electrons accelerate as they travel from the cathode to anode. Because of this acceleration, the charge density (the number of electrons in a given volume) decreases as one moves from a region of lower speed to a region of higher speed. However, the current, i.e. the number of electrons passing by a point (actually passing through a surface perpendicular to the direction of motion) per unit time, will be the same regardless of where we measure that.
[One can use the analogy of cars passing through an area where they go slow (say a toll booth) and then accelerating. In a steady state, the rate of cars passing a point some distance from the toll booth will be the same as the rate of cars passing through the toll both. The acceleration changes the distance between the cars, i.e. the car density, but not the rate of cars passing by.]
Now let's consider current in a wire. When electrons move in a non-super-conducting wire, they will interact with the atoms in the wire in such a way as to randomize their motion. Think of this interaction as a physical collision, with the electrons ricocheting off in random directions. Random motion of electrons does not contribute to net current. Net conduction current, or less formally, just current, is the net motion of charges in a given direction. An electric field will cause a net motion of electrons in a given direction. However, the "collisions" of the electrons with the atoms in the wire will cause a net motion of electrons to decrease.
If conduction current (or less formally, just current) decreases as one moves along the wire, then electrons will accumulate at the point where that decrease is taking place. [Think of cars arriving at a traffic jam!]. The increase in charge density will result in an increase in an electric field. This electric field will decrease the flow of electrons into that area, and will increase the flow of electrons out of that area. In an extremely short time, a steady state will be reached where current is constant throughout the length of the wire and there is no change in charge density with time throughout the length of the wire.
Although the mechanism is very different, we arrive at the same result as the case of an electron beam in a vacuum. That is, in a wire, the current is constant throughout the wire even though the average speed of the electrons may be different in different places.
During my study, I’ve learnt that increasing the speed of electrons increases the current.
We need to unpack this. As is already demonstrated, the current in a circuit, either in a wire, or in a vacuum, is constant throughout the circuit. So, in one sense, the idea that
increasing the speed of electrons increases the current.
However, there is another sense in which it is right. If we increase the electromotive force applied to a circuit, (Less formally, "the voltage") the average velocity of electrons in direction of current (the drift velocity) will increase. At the same time, increasing the electromagnetic force applied to a circuit will (usually) result in more current flowing through that circuit. Indeed, when the electromagnetic force is 0, there is (generally) 0 current. So, when applied to a whole circuit,
increasing the speed of electrons increases the current.
is true, even though when applied to parts of a circuit, it is wrong.
I hear all the time that the current after the resistor is the exact same as it was before the resistor.
This is correct. (In steady state, which takes only an amazingly small time to establish).
How could it be the same if electron speed diminishes?
The drift velocity, (average electron velocity in the direction of current) is likely to be the same on both sides of a resistor, although it may be different within the resistor.
[As mentioned, an electric field tends to accelerate electrons in a given direction, while the "collisions" of the electrons with atoms in the wire (or resistor) tend to randomize the motions of electrons. To maintain a constant current along a circuit, the electric field must have the same strength at any two points that have the same resistivity and the same cross-sectional area. So, if the "collision" rate is the same (for example because the wires are made of the same material at the same temperature), and the electric field is the same, (because the current is the same and the wire thickness and resistivity are the same) then the drift velocity will also be the same.]
If I have done my math correctly, the relationship between current and drift velocity is given by the equation
$$I = \rho v A$$
where $I$ is the current in a conductor of cross-sectional area $A$. $\rho$ is the density of mobile charges in the conductor, and $v$ is the drift velocity of those mobile charges.
Given the above formula, in a circuit which has the same current uniformly throughout, it is possible for the drift velocity $v$ to increase when the cross-sectional area of the conductor $A$ decreases, or when the density of mobile charges $\rho$ decreases. Either or both of these effects may occur in a resistor. Hence, the drift velocity in a resistor may be higher than the drift velocity in the wires connected to that resistor.
The current can be the same before and after the resistor and still have dropped over time. You are comparing a change over time with a change over location.
The unrestricted, fast-moving electron will, in this rough model, slow down when reaching a resistor. All the electrons behind it will now have to slow down as well and "queue up".
When exiting the resistor, the electron continues with the speed it was slowed down to. The speed - the current - is now the same in front of as after the resistor.
There is no disconnect here. Current in must equal current out. This is called Kirchhoff's Current Law: If more current enters than exits each second, then charge would accumulate within the resistor - which clearly doesn't happen in steady state conditions. If more current exits than enters each second, then where would the extra exiting charge come from?
The fact that the resistor is present slows down the current overall, but that overall current still must be constant along any series-connected path since the steady state will be reached very quickly. Meaning, it must be constant across all locations, all points, but not necessarily constant in time.