# Does gravity affects electromagnetic waves? Or electromagnetism affects gravity?

I'm confused about the relationship of electromagnetism and gravity, or are they even related?

It has been said the electromagnetic field produces a gravitational field, and so, there is no gravity if there's no electromagnetism.

I'm new to this topic, I don't understand things without imagining them nor how do they even exist.

• It has been said the electromagnetic field produces a gravitational field. It’s too small to be detected except in systems like neutron stars and black holes. Jan 29 at 0:50
• so, there is no gravity if there's no electromagnetism This is flawed logic. Jan 29 at 0:51
• The OP originally posted this on Worldbuilding, but it was decided that Physics was a better match (so the old question was closed). On the old question, in a comment, they referred to sciencedirect.com/science/article/pii/… as the source of this question. Jan 29 at 6:11
• Both. Electromagnetic field energy gravitates just as much as e.g. strong force field energy. If that wasn't the case, then the equivalence principle wouldn't hold. We are not aware of any violations as of now. Jan 29 at 7:08

In Newtonian physics, electromagnetism and gravity are distinct entities with no connection. However, in general relativity, there's a bit of a connection to be had. In all physics, mass is associated with gravity. In simple Newtonian physics, the mass of a system is simply the sum of the mass of its particles. In relativity, mass works a bit different. The quantity that matters there is the energy-momentum tensor. It includes not only traditional mass (sometimes called "rest mass" in relativity), but also energy such as that stored in fields. Any field. Electromagnetism is such a field, so any system which has electromagnetic fields present also has some mass:

The rest mass of a composite system is not the sum of the rest masses of the parts, unless all the parts are at rest. The total mass of a composite system includes the kinetic energy and field energy in the system.

(emphasis mine)

Now it is this mass which is associated with gravity. So electromagnetic fields, which increase the rest mass of the composite system, produce gravity.