Spectrometer can determine chemical composition through its measure of spectrums. The common spectrometer used in analytical chemistry is Mass spectrometry. In a mass spectrometer, a small amount of sample is ionized and converted to gaseous ions, where they are separated and analyzed according to their mass-to-charge ratios.
NMR Spectroscopy involves exciting a NMR-active sample and then measuring the effects of this magnetic excitation. From this, the bonds present in a sample can be determined.