In the case of Magnesium and Calcium, Calcium has a lower ionization energy than Magnesium. This means that it is easier to remove an electron from Calcium than it is from Magnesium.
Magnesium has 12 protons in its nucleus, while Calcium has 20 protons. The increased number of protons in Calcium creates a stronger attractive force between the nucleus and the electrons, making it more difficult to remove an electron from Calcium.
Additionally, the electrons in Magnesium are arranged in three electron shells, while the electrons in Calcium are arranged in four electron shells. The electron in the outermost shell of Calcium is further away from the nucleus than the electron in the outermost shell of Magnesium. This increased distance reduces the attractive force between the nucleus and the outermost electron in Calcium, making it easier to remove.
Therefore, due to the increased nuclear charge and the increased distance of the outermost electron from the nucleus, it is easier to remove an electron from Calcium than from Magnesium.