system
Given the following post, respond as if you're commenting on Reddit:
human
Parallels between Coulombs law and Law of Gravitation? 

Our physics teacher was explaining how they're basically the same equation, except with that charge and mass switch places, and the constant changes. 

What i don't understand is why they behave this way, can someone give an explanation?
gpt
Both phenomena are the effects that a source has when these effects spread out into three dimensions. For Coulomb's law the source is electric charge, for Newton's law of gravity the source is mass. If something spreads out equally in all directions in three dimensions, you have a sphere. The surface area of a sphere is proportional to its radius *r* squared, so as you go further out from the source the effect gets weaker by a factor of 1/*r^2*, since the effect has to spread itself out equally over the entire surface of the sphere. 

If you do electromagnetism and gravity in two dimensions, the relevant shape is a circle, whose circumference is proportional to *r*, so you get 1/*r* laws etc. 

The constants change because our conventional units (metres, Newtons, Coulombs etc) are arbitrary definitions, so we need to convert between the two. It's like if you've got one thing in metres per second, and another in miles per hour, you need to change the constant in front of one of them in order to compare.