what is the difference between electron affinity and ionization energy?

ionization energy is the minimum energy (Kj/mol)required to remove an wlectron from a gaseous atom in its ground state.

affinity energy: the negative of the energy change that occurs when an electron is accepted by an atom in the gaseous state to form an anion