The rule that decides whether two charges pull together or push apart — and how hard. Set two point charges, the distance between them and the surrounding medium, and see the electrostatic force F = k·q₁·q₂/(εr·r²): opposite signs attract, like signs repel, with equal and opposite arrows on each charge. Read the force, the field at each charge and the potential energy live, and watch the operating point slide down the inverse-square F–r curve — moving the charges twice as far apart cuts the force to a quarter. It all runs on your device.
You are in the Physics lab.
What the two arrows, the ruler and the F–r curve are telling you.
Each charge carries one purple F arrow, and the pair is always the same length pointing opposite ways — that is Newton's third law: the two charges push or pull on each other equally. When the arrows point toward each other the charges attract (opposite signs); when they point apart they repel (like signs). The colour and glyph of each disc show its polarity — red with a "+" for positive, blue with a "−" for negative — and the badge in the corner names the force and its size.
The ruler between the charges reads the separation r, and the lower graph plots the force against it. Because F depends on 1/r², that plot is a steep curve, not a line: the green operating point slides down it as you pull the charges apart, and doubling r drops the force to a quarter, not a half. Try the "Double the distance" preset and watch the point fall to a quarter of its height — the signature of an inverse-square law.
Only the product q₁·q₂ decides attract versus repel. Two positives or two negatives give a positive product and repulsion; one of each gives a negative product and attraction. The magnitude never cares about the signs — it depends only on the sizes of the charges and the distance. The same sign shows up in the potential energy readout: U is negative for an attractive pair (bound) and positive for a repulsive one. Turn on Field lines to see the field stream out of positive charges and into negative ones.
A product of charges, an inverse-square distance, a dielectric medium, and Newton's third law tying the pair together.
The electrostatic force between two point charges is proportional to the product of the charges and inversely proportional to the square of the distance between them, with Coulomb's constant k ≈ 8.99×10⁹ N·m²/C². Bigger charges mean a bigger force; more distance means a rapidly smaller one. The two forces are equal and opposite on the pair, as Newton's third law requires.
Like charges repel, opposite charges attract. Same-sign charges give a positive product and a force that pushes them apart; opposite signs give a negative product and a force that pulls them together. The simulator flips the force arrows accordingly and the potential energy U = k·q₁·q₂/(εr·r) changes sign at the same moment — negative when they attract, positive when they repel.
Factor one charge out of Coulomb's law and what is left is the electric field: each charge sits in the field E = k·|q_other|/(εr·r²) set up by the other, and feels a force F = q·E. The two field readouts show exactly that — the field at q₁ comes from q₂, and vice versa — which is why the bigger the neighbour, the stronger the field a charge experiences even though the force on the pair is shared equally.
Immersing the charges in a dielectric — oil, glass or water — polarises the material, and its bound charges partly cancel the field. Coulomb's law captures this with the relative permittivity εr, dividing the force, field and energy all by the same factor. Water's εr ≈ 80 makes the same two charges pull about eighty times more weakly than in a vacuum — the reason salt dissolves so readily in water but not in oil.
Teaching electrostatics? You can embed this simulator on your own site free — one line of code, no sign-up.