A spectator ion is a charged atom or group of atoms in a chemical reaction that does not undergo a chemical change or change state when the reaction takes place. In chemical reactions, compounds that contain ions are often dissolved in water, resulting in a state called aqueous ions. When two ionic compounds are dissolved into an aqueous state, or both are dissolved into the same solvent, their ions separate, so any ions that made up the first compound can interact with any ions from the second compound. It is not necessary for all ions to interact in this state, and if some ions do not interact, they usually remain dissolved in solution.
To determine the spectator ions in a reaction, the compounds that make up the reaction must be broken down into ions, if possible. Only ionic compounds can be broken down in this way, not molecules whose atoms are bonded together. For example, in a reaction between aqueous sodium hydroxide (NaOH) and aqueous hydrochloric acid (HCl), the two ionic compounds separate into their ions, namely sodium (Na), hydroxide (OH), hydrogen (H), and chlorine (Cl). The result of this reaction is that the hydrogen and hydroxide ions bond together, forming liquid water (H2O). Since neither the Na or the Cl ion was involved in the reaction, each one was a spectator ion.
Just as there can be multiple atoms that make up a spectator ion, there can be multiple types of spectator ions in a particular reaction. Not all reactions have spectator ions, but those that have many distinct types can be difficult to analyze using an equation. For that purpose, an equivalent reaction can be described using the net ionic equation. The net ionic equation is the reaction equation with all spectator ions removed from both sides. In cases where the spectator ion has no function on its own, this simplified equation can be used without losing significant information about the reaction.
In many reactions, a spectator ion does not have a secondary purpose and exists only because it was part of a reactant. Despite their lack of purpose in the reaction that generates them, spectator ions are sometimes used in other processes. A common use for free-floating spectator ions is to facilitate passage of materials through a membrane. They can also significantly change the electrical charge inside or outside a cell, which can impact how the cell functions or responds to stimuli. Considering these possible effects, the name "spectator ion" can be somewhat misleading, since the ions do have the potential to serve a purpose.