When an atom gains or loses an electron, it undergoes a process known as ionization, which can result in the formation of an ion.

If an atom gains an electron, it becomes negatively charged and forms a negative ion, also known as an anion. Anions are typically larger than their corresponding neutral atoms due to the increased electron-electron repulsion.

If an atom loses an electron, it becomes positively charged and forms a positive ion, also known as a cation. Cations are typically smaller than their corresponding neutral atoms due to the loss of an electron and the resulting decrease in electron-electron repulsion.

The process of gaining or losing an electron can be represented using the following notation:

A + e⁻ → A⁻ (anion formation)
A – e⁻ → A⁺ (cation formation)

Here, A represents the element’s atomic symbol undergoing ionization, and e⁻ represents an electron. The symbol “+” or “-” indicates the charge on the resulting ion.