Lithium is an alkali metals whereas magnesium is an alkaline earth metal. Lithium is present in 1st group and magnesium is in 2nd group. The chemical properties of Li and Mg are similar due to diagonal relationship.
1.) The size of Li and Mg are similar.
2.) Li and Mg are harder and hence have high melting point irrespective of their group elements.
3.) Both show covalent nature.
4.) Carbonates of Li and Mg decomposes on heating to liberate CO2.
5.) Li and Mg can directly combine with N2.
6.) Both Li and Mg combine with carbon on heating.
7.) Both of these do not form alums.