In knot theory, there are several competing notions of the quantity **writhe**, or . In one sense, it is purely a property of an oriented link diagram and assumes integer values. In another sense, it is a quantity that describes the amount of "coiling" of a mathematical knot (or any closed simple curve) in three-dimensional space and assumes real numbers as values. In both cases, writhe is a geometric quantity, meaning that while deforming a curve (or diagram) in such a way that does not change its topology, one may still change its writhe.^{[1]}

In knot theory, the writhe is a property of an oriented link diagram. The writhe is the total number of positive crossings minus the total number of negative crossings.

A direction is assigned to the link at a point in each component and this direction is followed all the way around each component. For each crossing one comes across while traveling in this direction, if the strand underneath goes from right to left, the crossing is positive; if the lower strand goes from left to right, the crossing is negative. One way of remembering this is to use a variation of the right-hand rule.

Positive crossing |
Negative crossing |

For a knot diagram, using the right-hand rule with either orientation gives the same result, so the writhe is well-defined on unoriented knot diagrams.

The writhe of a knot is unaffected by two of the three Reidemeister moves: moves of Type II and Type III do not affect the writhe. Reidemeister move Type I, however, increases or decreases the writhe by 1. This implies that the writhe of a knot is *not* an isotopy invariant of the knot itself — only the diagram. By a series of Type I moves one can set the writhe of a diagram for a given knot to be any integer at all.

Writhe is also a property of a knot represented as a curve in three-dimensional space. Strictly speaking, a knot is such a curve, defined mathematically as an embedding of a circle in three-dimensional Euclidean space, . By viewing the curve from different vantage points, one can obtain different projections and draw the corresponding knot diagrams. Its writhe (in the space curve sense) is equal to the average of the integral writhe values obtained from the projections from all vantage points.^{[2]} Hence, writhe in this situation can take on any real number as a possible value.^{[1]}

In a paper from 1961,^{[3]} Gheorghe Călugăreanu proved the following theorem: take a ribbon in , let be the linking number of its border components, and let be its total twist. Then the difference depends only on the core curve of the ribbon,^{[2]} and

- .

In a paper from 1959,^{[4]} Călugăreanu also showed how to calculate the writhe Wr with an integral. Let be a smooth, simple, closed curve and let and be points on . Then the writhe is equal to the Gauss integral

- .

Since writhe for a curve in space is defined as a double integral, we can approximate its value numerically by first representing our curve as a finite chain of line segments. A procedure that was first derived by Michael Levitt^{[5]} for the description of protein folding and later used for supercoiled DNA by Konstantin Klenin and Jörg Langowski^{[6]} is to compute

- ,

where is the exact evaluation of the double integral over line segments and ; note that and .^{[6]}

To evaluate for given segments numbered and , number the endpoints of the two segments 1, 2, 3, and 4. Let be the vector that begins at endpoint and ends at endpoint . Define the following quantities:^{[6]}

Then we calculate^{[6]}

Finally, we compensate for the possible sign difference and divide by to obtain^{[6]}

In addition, other methods to calculate writhe can be fully described mathematically and algorithmically, some of them outperform method above (which has quadratic computational complexity, by having linear complexity).^{[6]}

DNA will coil when twisted, just like a rubber hose or a rope will, and that is why biomathematicians use the quantity of *writhe* to describe the amount a piece of DNA is deformed as a result of this torsional stress. In general, this phenomenon of forming coils due to writhe is referred to as DNA supercoiling and is quite commonplace, and in fact in most organisms DNA is negatively supercoiled.^{[1]}

Any elastic rod, not just DNA, relieves torsional stress by coiling, an action which simultaneously untwists and bends the rod. F. Brock Fuller shows mathematically^{[7]} how the “elastic energy due to local twisting of the rod may be reduced if the central curve of the rod forms coils that increase its writhing number”.