A **field line** is a locus that is defined by a vector field and a starting location within the field. Field lines are useful for visualizing vector fields, which are otherwise hard to depict. Like longitude and latitude lines on a globe, or topographic lines on a topographic map, they are not physical lines that are actually present at certain locations; they are merely visualization tools.

A vector field defines a direction at all points in space; a field line for that vector field may be constructed by tracing a topographic path in the direction of the vector field. More precisely, the tangent line to the path at each point is required to be parallel to the vector field at that point.

A complete description of the geometry of all the field lines of a vector field is sufficient to completely specify the *direction* of the vector field everywhere. In order to also depict the *magnitude*, a selection of field lines is drawn such that the density of field lines (number of field lines per unit perpendicular area) at any location is proportional to the magnitude of the vector field at that point.

As a result of the divergence theorem, field lines start at *sources* and end at *sinks* of the vector field. (A "source" is wherever the divergence of the vector field is positive, a "sink" is wherever it is negative.) In physics, drawings of field lines are mainly useful in cases where the sources and sinks, if any, have a physical meaning, as opposed to e.g. the case of a force field of a radial harmonic.

For example, Gauss's law states that an electric field has sources at positive charges, sinks at negative charges, and neither elsewhere, so electric field lines start at positive charges and end at negative charges. They can also form closed loops, or extend to or from infinity, or continue forever without closing in on themselves. A gravitational field has no sources, it has sinks at masses, and it has neither elsewhere, gravitational field lines come from infinity and end at masses. A magnetic field has no sources or sinks (Gauss's law for magnetism), so its field lines have no start or end: they can *only* form closed loops, extend to infinity in both directions, or continue indefinitely without ever crossing itself.

Note that for this kind of drawing, where the field-line density is intended to be proportional to the field magnitude, it is important to represent all three dimensions. For example, consider the electric field arising from a single, isolated point charge. The electric field lines in this case are straight lines that emanate from the charge uniformly in all directions in three-dimensional space. This means that their density is proportional to
1
/
r
2
, the correct result consistent with Coulomb's law for this case. However, if the electric field lines for this setup were just drawn on a two-dimensional plane, their two-dimensional density would be proportional to
1
/
r
, an incorrect result for this situation.

If the vector field describes a velocity field, then the field lines follow stream lines in the flow. Perhaps the most familiar example of a vector field described by field lines is the magnetic field, which is often depicted using field lines emanating from a magnet.

Field lines can be used to trace familiar quantities from vector calculus:

Divergence may be easily seen through field lines, assuming the lines are drawn such that the density of field lines is proportional to the magnitude of the field (see above). In this case, the divergence may be seen as the beginning and ending of field lines. If the vector field is the resultant of radial inverse-square law fields with respect to one or more sources then this corresponds to the fact that the divergence of such a field is zero outside the sources. In a solenoidal vector field (i.e., a vector field where the divergence is zero everywhere), the field lines neither begin nor end; they either form closed loops, or go off to infinity in both directions. If a vector field has positive divergence in some area, there will be field lines starting from points in that area. If a vector field has negative divergence in some area, there will be field lines ending at points in that area.
The Kelvinâ€“Stokes theorem shows that field lines of a vector field with zero curl (i.e., a conservative vector field, e.g. a gravitational field or an electrostatic field) cannot be closed loops. In other words, curl is always present when a field line forms a closed loop. It may be present in other situations too, such as a helical shape of field lines.
While field lines are a "mere" mathematical construction, in some circumstances they take on physical significance. In fluid mechanics, the velocity field lines (streamlines) in steady flow represent the paths of particles of the fluid. In the context of plasma physics, electrons or ions that happen to be on the same field line interact strongly, while particles on different field lines in general do not interact. This is the same behavior that the particles of iron filings exhibit in a magnetic field.

The iron filings in the photo appear to be aligning themselves with discrete field lines, but the situation is more complex. It is easy to visualize as a two-stage-process: first, the filings are spread evenly over the magnetic field but all aligned in the direction of the field. Then, based on the scale and ferromagnetic properties of the filings they damp the field to either side, creating the apparent spaces between the lines that we see. Of course the two stages described here happen concurrently until an equilibrium is achieved. Because the intrinsic magnetism of the filings modifies the field, the lines shown by the filings are only an approximation of the field lines of the original magnetic field. Magnetic fields are continuous, and do not have discrete lines.