(N/A) The conductivity of a material is given by $\sigma = \frac{n e^{2} \tau}{m}$.
Resistivity $\rho$ is the reciprocal of conductivity,so $\rho = \frac{1}{\sigma} = \frac{m}{n e^{2} \tau}$.
Since $m$ (mass of electron) and $e$ (charge of electron) are constants,$\rho \propto \frac{1}{n}$ and $\rho \propto \frac{1}{\tau}$.
Thus,resistivity is inversely proportional to the number density $(n)$ and the relaxation time $(\tau)$.
In metals,as temperature increases,the average speed of electrons increases,which leads to more frequent collisions,causing the relaxation time $(\tau)$ to decrease. Since $n$ is nearly independent of temperature in metals,the decrease in $\tau$ causes the resistivity $(\rho)$ to increase.
In semiconductors and insulators,the number density $(n)$ increases significantly with temperature due to the thermal excitation of charge carriers. This increase in $n$ dominates over the change in $\tau$,causing the resistivity $(\rho)$ to decrease as temperature increases.