The first ionization potential of Al is smaller than that of Mg because
Al has one unpaired electron in p-orbital
What are the factors which affects ionization potential??
Atomic radius
(a) Atomic radius: The values of ionization potential of an element decreases as its atomic radius increases. This is because the electrostatic force of attraction between the nucleus and the outermost electron decreases as the distance between them increases. So the energy required for the removal of the electron will comparatively be less
Ionization Potential α 1AtomicRadius
But Atomic radius (Al) < Atomic radius (Mg)
Zeff
(b) Effective nuclear charge: The greater the effective charge on the nucleus of an atom, the more difficult it would be to remove an electron from the atom because electrostatic force of attraction between the nucleus and the outermost electron increases. So greater energy will be required to remove the electron