  The contributions of the covalent bond energies of various atom pairs to the
cohesive energy of MgB2 and AlB2 are analysed with a variant of our recently
developed energy-partitioning scheme for the density-functional total energy.
The covalent bond energies are strongest for the intralayer B-B pairs. In
contrast to the general belief, there is also a considerable covalent bonding
between the layers, mediated by the metal atom. The bond energies between the
various atom pairs are analysed in terms of orbital- and energy-resolved
contributions.
