Yes, it is true, both mass spectrometry and infrared spectroscopy involve interaction of molecules with electromagnetic waves. ;Mass spectrometry method is used to determine the mass of a substance while infrared spectroscopy is used to determine the functional groups in molecules. Both methods involve the analysis of electromagnetic light interaction with molecules.