Solution:
Key idea: A metal hydroxide is a strong base when it ionises readily in water to give hydroxide ions, MOH→M++OH−. This is easier when the M–O bond is weak, that is, when the metal ion is large, has a low charge and comes from a metal of low ionisation enthalpy.
Step 1 — State the comparison. The alkali metal hydroxides (NaOH, KOH, …) are all strong bases, highly soluble and fully ionised. The alkaline earth metal hydroxides are weaker bases: in the same period, Mg(OH)2 is a much weaker base than NaOH, and Ca(OH)2 is weaker than KOH. Within each group basicity increases down the group.
Step 2 — Explain with size and charge. An alkaline earth metal ion (M2+) is smaller than the alkali metal ion of the same period and carries a double charge, and the alkaline earth metals have higher ionisation enthalpies. The M2+ ion therefore holds the hydroxide ions more strongly, the M–O bonds are stronger (more covalent), and the hydroxide ionises and dissolves less, giving fewer hydroxide ions in solution.
Therefore, the alkali metal hydroxides are more basic than the alkaline earth metal hydroxides of the same period, because the smaller, doubly charged alkaline earth ions (from metals of higher ionisation enthalpy) bind the hydroxide ions more strongly, so their hydroxides ionise less.