system
Given the following post, respond as if you're commenting on Reddit:
human
Newtons second law of gravity and coulomb's law for electricity are almost the same. Why can electricity attract and repel, while gravity can only attract? Are we confident gravity doesnt repel anywhere in the universe?
gpt
The reason they look so similar is because of geometry. The laws dictate the force (electromagnetic or gravitational) felt by a particle at a particular distance. The particle can be located at any location above, below, or to the side so we can see that there is a sphere of equal potential surrounding the first particle. The force felt then is determined by the force per unit area, or flux. 

The area is the surface area of a sphere which grows as (4)(pi)(r^2). The 4 pi is built into the constants in the front, leaving the r^2 on the bottom. This leads to a formula that looks very similar for gravity and electromagnetism. Anything that expands as a sphere falls off with the same r^2 term. For instance the intensity of sound, light, or even the intensity of an explosion all fall of as 1/r^2 .

So why is electromagnetism attractive and repulsive and gravity not? Well, electric charge can be either positive or negative which flips the sign of Coulomb’s law. In order to make gravity repulsive, you would need a negative mass which we are pretty sure does not exist by our laws of physics. Thus, we are in turn pretty sure that gravity is a purely attractive force.