Qualitative analysis is used to identify the cations and anions present in an unknown chemical substance. Cations such as sodium, calcium, and ammonium can be identified using sodium hydroxide and ammonia solutions. Anions like chloride, nitrate, and sulfate can be identified through chemical tests involving silver nitrate, sodium hydroxide with aluminum foil, and barium chloride solutions respectively. These tests produce characteristic precipitates or gas emissions to reveal the ions present. Dilute nitric acid is first added to remove any interfering carbonate ions.