A method of chemical analysis in which the substance to be analyzed is heated and placed in a vacuum. The resulting vapor is exposed to a beam of electrons that causes ionization to occur, either of the molecules or their fragments. The ions thus produced are accelerated by an electric impulse and then passed through a magnetic field, where they describe curved paths whose directions depend on the speed and mass-to-charge ratio of the ions. This has the effect of separating the ions according to their mass (electomagnetic separation). Because of their greater kinetic energy, the heavier ions describe a wider arc than the lighter ones and can be identified on this basis. The ions are collected in appropriate devices as they emerge from the magnetic field.