When an element combines with another element by losing and gaining electrons to form a compound, its valency is called electrovalency.
Electrovalency in nitrogen :
Nitrogen atom has atomic number . Thus, the number of electrons in a Nitrogen atom are .
The electronic configuration of Nitrogen is .
In order to acquire eight electrons in the outermost shell i.e. to attain nearest noble gas configuration, Nitrogen atom gains electrons in the outermost shell.
This leads to formation of Nitride ion having three units of negative charges .