Question: are longitudinal waves mechanical or electromagnetic?
Answer: Longitudinal waves occur when the oscillations are parallel to the direction of propagation. While mechanical waves can be both transverse and longitudinal, all electromagnetic waves are transverse. Sound, for example, is a longitudinal wave.