How this calculation works
Compute the oriented linking number of two disjoint closed polygonal loops in three dimensions. The tool searches for a resolved regular projection and sums signed crossings between the two components, then divides by two. It validates loop geometry and rejects intersections or unresolved projections. Linking number is a topological integer invariant, not the minimum physical distance between the loops.
Lk(A,B)=1/2 Σsigned crossings between components in a regular oriented projection.A worked example
The displayed diamond loops form a polygonal Hopf link. Reversing either loop changes the linking-number sign; reversing both keeps it. Their oriented linking number is −1 under the stated right-handed crossing convention. Intersecting or touching loops do not have the supported disjoint-loop invariant.
Good to know
3–40 spatial vertices per loop; final vertex joins the first implicitly. Reject zero-length edges, self-intersections, inter-loop contact and unresolved regular projections. Linking number zero does not prove the loops are unlinked or classify their knot types.
Loops must be closed and disjoint
Each input is an ordered cycle of three-dimensional vertices, with the final edge returning to the first. Consecutive repeated vertices create zero-length segments and are invalid.
The two polygonal curves must not intersect, and self-intersections are excluded from the embedded-loop interpretation. Curves that only look disjoint in a drawing can still meet in three dimensions. The calculator checks segment separation numerically, so near-contact geometry can be unresolved at the supported tolerance.
A topological invariant of two closed curves; a single triangle solid angle does not provide loop linkage. The Frenet frame curvature and torsion calculator for a space curve offers a complementary calculation under its own stated assumptions.
Orientation determines the sign
The vertex order orients each component. Reversing either loop changes the sign of the linking number; reversing both preserves it.
Merely relabeling the starting vertex around the same cyclic order should not change the value. Different texts can use opposite global crossing-sign conventions, so compare orientations and conventions before declaring a sign disagreement. The magnitude counts algebraic linking, not the number of visible crossings in an arbitrary view.
Worked example and mathematical rule
The displayed diamond loops form a polygonal Hopf link. Reversing either loop changes the linking-number sign; reversing both keeps it. Their oriented linking number is −1 under the stated right-handed crossing convention. Intersecting or touching loops do not have the supported disjoint-loop invariant.
Lk(A,B)=1/2 Σsigned crossings between components in a regular oriented projection.
Why projection crossings work
A generic planar projection shows transverse crossings between projected segments, with depth determining which component passes over the other. Only crossings between different components contribute.
Their signed sum is twice the linking number. A projection through a vertex or parallel overlapping projected segments is not regular enough for this formula without special treatment. The implementation tries alternate directions and rejects a case if no resolved regular projection is found.
Zero linking is not always unlinking
A nonzero linking number proves the components cannot be separated by a disjoint deformation into two unlinked loops. A zero value does not prove they are topologically unlinked; more complicated links can have cancelling algebraic crossings.
The invariant also says nothing about whether an individual component is knotted. Do not promote this one integer into a complete knot or link classification.
Geometric transformations and stability
Translations, rotations and positive uniform scaling preserve the linking number when loops remain disjoint. A continuous deformation also preserves it until components cross or the embedding degenerates.
Numerical near-contact tests can reject a very small gap rather than certify its topology. Increasing coordinate precision or scaling a poorly conditioned example may help resolve the geometry, but rounding vertices can itself change whether two segments intersect.
Auditing an educational example
Use a simple Hopf-link construction to check magnitude one and then reverse one loop to check the sign. Compare with a clearly separated pair of circles, which should give zero.
Inspect the reported projection and crossings rather than counting apparent crossings from an unrelated camera angle. The page uses piecewise-linear loops, so a polygon approximation of a smooth curve needs enough resolution to preserve disjointness and the intended embedding. It is not a certified collision detector for physical machinery.
A few questions, answered
Does zero prove the loops are unlinked?
No. Some nontrivial links have zero algebraic linking number.
What changes the sign?
Reversing exactly one component’s orientation.
Are self-crossings counted in the crossing sum?
Only crossings between the two different components contribute.
Why can a projection be rejected?
Vertex coincidences, tangencies or nearly overlapping projected edges can make crossing signs unresolved.