1. Ionization - The sample is vaporized into a gas and then ionized by the ion source, usually by losing an electron to become a cation.
2. Acceleration - the ions are then accelerated through a potential difference.
3. Deflection - The ion beam passes through a magnetic field which bends the charged stream. Lighter components or components with more ionic charge will deflect in the field more than heavier or less charged components.
4. Detection - A detector counts the number of ions at different deflections. The data is plotted as a graph or spectrum of different masses.