Electric Dipole
Turn a 2D point dipole with a slider and watch its vector field turn with it: the arrows leave one pole and curve back into the other, colored by strength.
A water molecule is a dipole: the molecule is bent and its electrons are not shared evenly, so one end is slightly positive and the other slightly negative. A microwave oven heats food mainly by making these water dipoles turn back and forth with its field. To a first approximation, the Earth's magnetic field, the one a compass needle follows, is the field of a dipole tilted about 11° from the axis of rotation. An electric dipole is a pair of equal and opposite charges separated by a small distance, and after the field of a single charge, its field is the most important one in electrostatics. Dipole fields also appear in dielectric response, in the radiation patterns of short antennas, and as the leading term of the field of a neutral charge distribution observed from far away. The same mathematical form, with vectors reinterpreted, describes magnetic dipoles and gravitational tidal effects.
The plot shows the electric dipole field in a plane that contains the dipole axis, with components built from x , y , and r = \sqrt{x^2 + y^2} . Arrows are normalized so the direction remains legible even where the magnitude varies sharply, and a viridis color map shows the magnitude. The dipole pattern is visible in the arrows: above the origin they point away from the dipole, on both sides they point down, and below the origin they point back up toward it. The field leaves the positive end of the dipole and returns to the negative end.
The arrows plot \vec E = \left(\frac{3qx - \cos(a)\, r^2}{r^5}, \frac{3qy - \sin(a)\, r^2}{r^5}\right) with q = x\cos a + y\sin a . This is the exact field of an ideal point dipole at the origin whose moment points in the direction (\cos a, \sin a) , with the constant \frac{p}{4\pi\varepsilon_0} set to 1. The slider turns the dipole: a goes from 0 to 2\pi , and the whole pattern turns with it. At the start, a = \pi/2 , the dipole points along the y axis and the field is \left(\frac{3xy}{r^5}, \frac{2y^2 - x^2}{r^5}\right) ; the description of the arrows above is for this direction. The formula is a plane section of the general dipole field formula \vec E = \frac{1}{4\pi\varepsilon_0}\,\frac{3(\vec p\cdot\hat r)\hat r - \vec p}{r^3} , where \vec p is the dipole moment and \hat r is the unit vector from the dipole to the point. For two charges \pm q at a distance d , p = qd , and the formula holds at distances much larger than d .
The field of a single point charge falls off as 1/r^2 . The two charges of a dipole almost cancel, so the dipole field falls off faster, as 1/r^3 : at twice the distance it is eight times weaker. Its strength also depends on the direction: |\vec E| = \frac{p}{4\pi\varepsilon_0}\frac{\sqrt{1 + 3\cos^2\theta}}{r^3} , where \theta is the angle from the axis, so on the axis the field is twice as strong as in the perpendicular direction at the same distance.
A vector field plot draws one arrow at each point of a grid. Here all arrows have the same length, so an arrow gives only the direction and its color gives the magnitude. The color scale runs linearly from zero to the strongest arrow in view, and the field grows quickly near the origin, so only the arrows nearest the dipole reach the bright end of the scale. The plot does not draw the two charges or the dipole field lines; a field line is a curve that is tangent to the arrows at every point. Zoom in on the origin, and notice that the grid and the color scale are recomputed for the view.
JavaScript is required to view the interactive plot.