J.R. S. answered 04/25/19
Ph.D. University Professor with 10+ years Tutoring Experience
Both Mg2+ and Al3+ are Lewis acids as they will accept a pair of electrons.
The acidity of the solution of the metal ion is related to its ability to attract a pair of electrons or to the charge on the metal ion. Thus, a solution of Mg2+ ions would have a higher pH (less acidic) than a similar solution of Al3+ ions.