system
Given the following post, respond as if you're commenting on Reddit:
human
I've heard that light and gravity both travel at the speed of C (causality). How exactly did they measure the speed of gravity?
gpt
Electromagnetic waves (in vacuum) and gravitational waves that are emitted by a source are predicted to travel at c. We’ve recently been able to detect gravitational waves thanks to LIGO/Virgo. In particular, one paper managed to confirm this by using a binary neutron star merger event. The single event emitted electromagnetic and gravitational radiation, meaning that you can detect both separately. If the electromagnetic radiation and gravitational radiation arrive at nearly the same time, then that shows the gravitational radiation must travel at nearly the same speed since the source is extremely far away. 

If, on the other hand, you have an event that only emits gravitational waves, then you can approximately calculate the speed by comparing its arrival time between different points on Earth. However, this will be less accurate than the former method, as you would need multiple detectors to make a precise measurement and gravitational wave detection is state of the art.

For reference, we have good theoretical reasons why gravitational waves should move at the speed of light. The equations of general relativity have been fairly well tested and you can use the equations to derive what the speed of gravitational waves must be, so many physicists were fairly confident of this even before rigorous detection. You can also argue from causality etc., but keep in mind that it can be shown precisely and mathematically.