From the position of an element in a particular group of the periodic table, one can infer its valency. The valency of a representative element is usually given by the number of electrons in the outermost orbital and /or equal to eight minus the number of outermost electrons. For example, alkali metals (group 1) having one outermost electron are monovalent and alkali earth metals (group 2) having two outermost electrons are bivalent. Halogens (group 17) with seven outermost electrons are monovalent (eight minus number of outermost electrons). There are, however, some exceptions to this rule.
Periodic Trends in Valence of Elements as shown by the Formulas of Their Compounds
The first element of each of the groups namely lithium, beryllium, boron differs in many respects from the other members of their respective group. For example behaviour of lithium is more similar to that of magnesium. This kind of similarity in properties of certain elements which are placed diagonally across in the periodic table is known as diagonal relationship. Diagonal relationships occur because of the directions in the trends of various properties as you move across or down the periodic table.