Magnetic resonance spectroscopy (MRS) differs from MRI in that MRS provides metabolic and chemical information about tissues, while MRI provides detailed anatomical images. MRS analyzes the concentration of specific molecules, offering insights into tissue composition and pathology, whereas MRI focuses on structural imaging.