The second ionization energy of Mg is larger than the first because it always takes more energy to remove an electron from a positively charged ion than from a neutral atom.
Likewise, why is the first ionisation energy of beryllium greater than lithium? Beryllium (Group II) has an extra electron and proton compared with lithium. The extra electron goes into the same 2s orbital. The increase in ionisation energy (I.E.) Similarly, the I.E. of Oxygen is less than that of Nitrogen because the extra electron is shielded by the half-filled 2p orbital.
Also to know, why does Li have a larger second ionization energy than be?
This is because of the increase in the nuclear charge due to addition of electrons . Now it forms Be which is unstable , so to get stable (Be ) the second electron should be removed , so we need less energy to remove that electron and therefore its second ionization is more that Li.
Is first ionization energy greater than second?
The energy to remove one electron from a neutral atom is called the first ionization energy, and the energy required to remove the second electron is called the second ionization energy. The second ionization energy is, generally, greater than the first ionization energy.