What happens to the resistance of a wire if it is heated up?

Either one can be true depending on the material. In metals, the electrons don't need any additional energy to move, so the main effect of temperature is to cause the atoms to vibrate more, which interferes with the motion of the electrons, increasing the resistance.

On the other hand, in a semiconductor, the electrons do need to gain some non-zero amount of energy before they can start moving at all. In this case, raising the temperature does decrease the resistance for the reason you state.

On wikipedia it says:

Near room temperature, the resistivity of metals typically increases as temperature is increased, while the resistivity of semiconductors typically decreases as temperature is increased. The resistivity of insulators and electrolytes may increase or decrease depending on the system.

You can read more about these effects on wikipedia here and here.


The problem with assuming that "hotter" free electrons in a metal convey more current is that their motion is random in direction and so they do not contribute to the electric current as there is no net drift of charge.
Their average velocity due to their thermal motion is zero.

The application of an electric field accelerates the free electrons and so they gain kinetic energy and now the free electrons have a net velocity along the conductor, hence this motion constitutes a movement of charges in a particular direction - an electric current.

However the free electrons collide with the lattice ions and transfer energy to the lattice ions which now have a greater kinetic energy - the temperature goes up as there has been ohmic heating.

So the free electrons have an average velocity along the wire called the drift velocity.
The drift velocity is order of magnitude 1 mm/s whereas the speed of the free electrons due to their thermal motion is order of magnitude 100 km/s.

With more kinetic energy the lattice ions vibrate more and thus there is a greater probability of the drifting free electrons colliding with them - the resistance has increased.

For a metal as the temperature increases its resistance increases because of the lattice ions vibrating more at higher temperatures.

For a lot of semiconductors and insulators raising the temperature increases the number of charge carriers and so the resistance decreases with increased temperature