The cation is K+.
Iodide (I-): Potassium reacts with iodide (derived from iodine) to form potassium iodide. The cation is K+, the anion is I-. The formula of the ionic compound formed from potassium cation and iodide is KI.
Cyanide (CN-): Potassium reacts with cyanide (derived from carbon and nitrogen) to form potassium cyanide. The cation is K+, the anion is CN-. The formula of the ionic compound formed from potassium cation and cyanide ion is KCN.
Nitrate (NO3-): Potassium reacts with nitrate (derived from nitrogen and oxygen) to form potassium nitrate. The cation is K+, the anion is NO3-. The formula of the ionic compound formed from potassium cation and nitrate ion is KNO3.
Sulfate (SO42-): Potassium reacts with sulfate (derived from sulfur and oxygen) to form potassium sulfate. The cation is K+, the anion is SO42-. The formula of the ionic compound formed from potassium cation and sulfate ion is K2SO4.
Hydrogen Phosphate (HPO42-): Potassium reacts with hydrogen phosphate (derived from hydrogen, phosphorus and oxygen) to form potassium hydrogen phosphate. The cation is K+, the anion is HPO42-. The formula of the ionic compound formed from potassium cation and hydrogen phosphate ion is KHPO4.
The cation is Mg2+.
Iodide (I-): Magnesium reacts with iodide (derived from iodine) to form magnesium iodide. The cation is Mg2+, the anion is I-. The formula of the ionic compound formed from magnesium cation and iodide is MgI2.
Cyanide (CN-): Magnesium reacts with cyanide (derived from carbon and nitrogen) to form magnesium cyanide. The cation is Mg2+, the anion is CN-. The formula of the ionic compound formed from magnesium cation and cyanide ion is Mg(CN)2.
Nitrate (NO3-): Magnesium reacts with nitrate (derived from nitrogen and oxygen) to form magnesium nitrate. The cation is Mg2+, the anion is NO3-. The formula of the ionic compound formed from magnesium cation and nitrate ion is Mg(NO3)2.
Sulfate (SO42-): Magnesium reacts with sulfate (derived from sulfur and oxygen) to form magnesium sulfate. The cation is Mg2+, the anion is SO42-. The formula of the ionic compound formed from magnesium cation and sulfate ion is MgSO4.
Hydrogen Phosphate (HPO42-): Magnesium reacts with hydrogen phosphate (derived from hydrogen, phosphorus and oxygen) to form magnesium hydrogen phosphate. The cation is Mg2+, the anion is HPO42-. The formula of the ionic compound formed from magnesium cation and hydrogen phosphate ion is MgHPO4.
The cation is Cr3+.
Iodide (I-): Chromium reacts with iodide (derived from iodine) to form chromium iodide. The cation is Cr3+, the anion is I-. The formula of the ionic compound formed from chromium cation and iodide is CrI3.
Cyanide (CN-): Chromium reacts with cyanide (derived from carbon and nitrogen) to form chromium (III) cyanide. The cation is Cr3+, the anion is CN-. The formula of the ionic compound formed from chromium cation and cyanide ion is Cr(CN)3.
Nitrate (NO3-): Chromium reacts with nitrate (derived from nitrogen and oxygen) to form chromium (III) nitrate. The cation is Cr3+, the anion is NO3-. The formula of the ionic compound formed from chromium cation and nitrate ion is Cr(NO3)3.
Sulfate (SO42-): Chromium reacts with sulfate (derived from sulfur and oxygen) to form chromium (III) sulfate. The cation is Cr3+, the anion is SO42-. The formula of the ionic compound formed from chromium cation and sulfate ion is Cr2(SO4)3.
Hydrogen Phosphate (HPO42-): Chromium reacts with hydrogen phosphate (derived from hydrogen, phosphorus and oxygen) to form chromium (III) hydrogen phosphate. The cation is Cr3+, the anion is HPO42-. The formula of the ionic compound formed from chromium cation and hydrogen phosphate ion is Cr2(HPO4)3.
The figure below shows the complete table by filling in the formula of the ionic compound from the cations and anions is,
Figure 1