an ion () is an atom or molecule that has a net electrical charge. since the charge of the electron (considered negative by convention) is equal and opposite to that of the proton (considered positive by convention), the net charge of an ion is non-zero due to its total number of electrons being unequal to its total number of protons. a cation is a positively charged ion, with fewer electrons than protons, while an anion is negatively charged, with more electrons than protons. because of their opposite electric charges, cations and anions attract each other and readily form ionic compounds.