Electrons exist in orbits around an atomic nucleus. The higher the orbit number, the greater the distance of the electrons from the nucleus. Atoms try to achieve a stable state similar to that of the noble gases or the inert elements in their outermost orbit by accepting or donating electrons. This property is called the atom’s valency.
TL;DR (Too Long; Didn't Read)
Some elements differ in their capacity to combine with other elements depending on the nature of the reaction; this property is called variable valency. For example, the iron in ferrous oxide exhibits a valency of +2, whereas in ferric oxide, it has a valency of +3.
Valency and Bonding
The electrons in the orbit closest to the nucleus are more tightly held as compared to those in the outer orbits. Atoms strive to achieve the electronic state similar to that of the inert gas to which it is closest in the periodic table. They do this by donating the excess electrons to another atom or by accepting electrons from another atom. When these valency electrons are donated or accepted, there is formation of an ionic bond between the participating atoms. When atoms share the valency electrons between themselves, it results in formation of a covalent bond.
Certain elements combine with other atoms, donating, accepting or sharing electrons in different proportions depending on the nature of the reaction. For example, iron combines with oxygen to form ferrous oxide as well as ferric oxide. In the formation of ferrous oxide, iron exhibits a valency of +2, whereas in ferric oxide, it has a valency of +3. This is termed variable valency.
Elements with Variable Valency
Transition metals nickel, copper, tin and iron exhibit variable valency. Nonmetals such as nitrogen and oxygen also show variable valency. The products formed as a result of reaction with the different valency atoms differ in their properties. For example, in the above example, ferrous oxide is nonmagnetic whereas ferric oxide has magnetic character. Similarly, hydrogen shows a valency of +2 in hydrogen peroxide and a valency of +1 in case of water; hydrogen peroxide is strongly acidic in nature, whereas water is neutral.
Representation of Variable Valency
It is a practice to indicate the valency of an element with variable valency by using the appropriate Roman numeral as a superscript placed next to the symbol of the element. For example, writing PVCl5 indicates that phosphorus has a valency of +5 in phosphorus pentachloride.