Definition: Given a scientific question, generate a correct answer to it.
Input: What type of waves carry energy through matter or space as vibrating electric and magnetic fields?
Output:
electromagnetic waves