How is nitrogen prepared in the laboratory? Write the chemical equations of the reactions involved.

An aqueous solution of ammonium chloride is treated with sodium nitrite.
NH4CI(aq)+NaNO2(aq)N2(g)+2H2O(l)+NaNI(aq)NO and HNO3 are produced in small amounts. These are impurities that can be removed on passing nitrogen gas through aqueous sulphuric acid, containing potassium dichromate.