Showing the plot of the variation of resistivity:
(i) For Conductor

(ii) For Semiconductors

\(p = \frac {m}{ne^2r}\)
where, p = resistivity.
Conductors: For conductors, the number density n of free electrons is almost independent of temperature.
As the temperature increase, the thermal speed of electrons increases and also the amplitude of vibration of the metal ions increases, the free electrons collide more frequently with the metal ions.
The mean collision time \(\tau\) decrease.
Hence, resistivity increases.
Semiconductors: In the case of semiconductors as the temperature is increased the number of free electron increases and relaxation time decreases. The increase in number density is predominant compared to the decrease in relaxation time.
Therefore resistivity decreases with increase in temperature.