In the compound potassium nitrate (KNO3), the atoms within the nitrate ion are held together with COVALENT bonding, and the potassium ion and nitrate ion are held together by IONIC bonding.
A covalent bond, also called a molecular bond, is a chemical bond that involves the sharing of electron pairs between atoms. These electron pairs are known as shared pairs or bonding pairs. Covalent bond is formed between two non-metals.
Ionic bonds form when one atom gives up one or more electrons to another atom. It is the complete transfer of valence electron(s) between oppositely charged atoms. Ionic bond is formed between metal (electropositive element) and non-metal(electronegative element)
In nitrate ions the Nitrogen (N) and Oxygen (O) both are non-metals and it involves the sharing of electron pairs between N and O atoms, so the bonding in Nitrate () ion is covalent bonding.
In potassium nitrate , Potassium (K) is a metal and Nitrate () ion is non-metal and it involves the complete transfer of valence electron between oppositely charged atoms (K+) and (). So the bonding between Potassium and Nitrate is Ionic bonding.
NOTE : Bonding between Non-metals is Covalent bonding.
Bonding between Metal and Non-metals is Ionic bonding.