Here's why:
* Speed of Light: All electromagnetic radiation, including gamma rays and infrared rays, travels at the speed of light in a vacuum. This speed is a fundamental constant, approximately 299,792,458 meters per second.
* Different Frequencies: While both are electromagnetic radiation, gamma rays and infrared rays have vastly different frequencies (and therefore wavelengths). Gamma rays have much higher frequencies and shorter wavelengths than infrared rays.
* Speed vs. Frequency: The speed of light in a vacuum is independent of its frequency.
So, while gamma rays and infrared rays have different energies and properties, they travel at the same speed through the vacuum of space.