The nitrates are inorganic compounds composed of one atom of nitrogen and three atoms of oxygen. The nitrogen atom is in the +5 oxidation state in the centre of a triangle formed by the three oxygen atoms. Nitrates are formed in nature by the decomposition of nitrogen compounds such as proteins or urea. In this decomposition, ammonia or ammonium is formed, respectively. In the presence of oxygen, this is oxidised by microorganisms of the nitrobacter type to nitric acid, which attacks any base (generally carbonates) in the medium, forming the corresponding nitrate.
Another source of formation is through nitrogen oxides that are generated in thunderstorm lightning discharges from nitrogen and oxygen in the air. Rainwater forms nitric acid, which attacks carbonates and other basic minerals to form the corresponding nitrates.
Ammonia forms the basis for the production of the nitrogen fertilisers. The most common nitrogen fertilisers are anhydrous ammonia, urea (produced from ammonia and carbon dioxide), ammonium nitrate (produced from ammonia and nitric acid), ammonium sulphate (made from ammonia and sulphuric acid) and calcium ammonium nitrate, or ammonium nitrate and limestone (the result of adding limestone to ammonium nitrate).