The apparatus for analysing chemical composition by separating ions by their mass; the ions may be elements, isotopes, or molecular compounds. Positive ions (charged particles) of a substance are separated by an electromagnetic system, designed to focus particles of equal mass to a point where they can be detected. This permits accurate measurement of the relative concentrations of the various ionic masses present. A mass spectrometer can be used to identify compounds or to measure the relative abundance of compounds in a sample.