Cations are positively charged ions with fewer electrons than protons. To partake in reaction, metals lose electrons to achieve a stable octet configuration. It has lost valence electrons and wold have a positive charge associated with it.
Potassium is a group 1 element. A metal.
Potassium has 1 valence electron so it loses the valence electron to form a stable octet.
A potassium ion has a positive charge and therefore cannot be an anion but is a cation.
The group number pretty much denotes the number of valence electrons.
Mg2+...because it loses 2 electron which is on its valence shell making it empty and making it have jst 2 shells. The radius calculated from d nucleus to the new valence shell is then smaller than that of Cl^- and k+