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