In mathematics, the linking number is a numerical invariant that describes the linking of two closed curves in three-dimensional space. Intuitively, the linking number represents the number of times that each curve winds around the other. In Euclidean space, the linking number is always an integer, but may be positive or negative depending on the orientation of the two curves (this is not true for curves in most 3-manifolds, where linking numbers can also be fractions or just not exist at all).
The linking number was introduced by Gauss in the form of the linking integral. It is an important object of study in knot theory, algebraic topology, and differential geometry, and has numerous applications in mathematics and science, including quantum mechanics, electromagnetism, and the study of DNA supercoiling.
Any two closed curves in space, if allowed to pass through themselves but not each other, can be moved into exactly one of the following standard positions. This determines the linking number:
Each curve may pass through itself during this motion, but the two curves must remain separated throughout. This is formalized as regular homotopy, which further requires that each curve be an immersion, not just any map. However, this added condition does not change the definition of linking number (it does not matter if the curves are required to always be immersions or not), which is an example of an h-principle (homotopy-principle), meaning that geometry reduces to topology.
This fact (that the linking number is the only invariant) is most easily proven by placing one circle in standard position, and then showing that linking number is the only invariant of the other circle. In detail:
A single curve is regular homotopic to a standard circle (any knot can be unknotted if the curve is allowed to pass through itself). The fact that it is homotopic is clear, since 3-space is contractible and thus all maps into it are homotopic, though the fact that this can be done through immersions requires some geometric argument.