Write the mathematical relation for the resistivity of a material in terms of relaxation time, number density, mass and charge of charge carriers in it. Explain using this relation, why the resistivity of a metal increases and that of a semiconductor decreases with rise in temperature.