Why Energy of is smaller than π2px and π2py in case of O2 but it is opposite in case of N2.

To answer this question, we need to understand the molecular orbital (MO) diagram for oxygen (O2) and nitrogen (N2). The MO diagram illustrates the formation and relative energies of molecular orbitals in a diatomic molecule.

In the case of O2, the molecular orbitals are formed by the overlap of atomic orbitals from the oxygen atoms. The π2px and π2py molecular orbitals are derived from the side-by-side overlap of the two atomic p orbitals along the x and y axes, respectively. These orbitals are higher in energy compared to the σ2pz molecular orbital, which is formed by the head-to-head overlap along the z-axis.

The reason why the energy of π2px and π2py orbitals is smaller than the energy of σ2pz in O2 is due to the lower overlap between atomic orbitals along the x and y axes. The side-by-side overlap of atomic orbitals along these axes is less efficient, resulting in weaker bonding interactions and higher energy levels.

On the other hand, in the case of N2, the situation is different. The nitrogen atom has two unpaired electrons in its atomic p orbitals, which results in the formation of three molecular orbitals: σ2pz, π2px, and π2py. However, the energy ordering in N2 is reversed compared to O2.

The reason for this difference lies in the relative atomic sizes and energies of oxygen and nitrogen atoms. Nitrogen atoms are smaller than oxygen atoms, which leads to stronger overlap and bonding interactions along the x and y axes in N2. As a result, the π2px and π2py molecular orbitals have lower energies compared to σ2pz in nitrogen.

In summary, the difference in energy ordering between O2 and N2 is due to the different atomic sizes and resulting overlap efficiencies between the p atomic orbitals. This difference in energy levels ultimately affects the electronic structure and stability of the molecules.