In knot theory, there are several competing notions of the quantity writhe, or <math>\operatorname{Wr}</math>. 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. Gheorghe Călugăreanu proved the following theorem: take a ribbon in <math>\R^3</math>, let <math>\operatorname{Lk}</math> be the linking number of its border components, and let <math>\operatorname{Tw}</math> be its total twist. Then the difference <math>\operatorname{Lk}-\operatorname{Tw}</math> depends only on the core curve of the ribbon, Călugăreanu also showed how to calculate the writhe Wr with an integral. Let <math>C</math> be a smooth, simple, closed curve and let <math>\mathbf{r}_{1}</math> and <math>\mathbf{r}_{2}</math> be points on <math>C</math>. Then the writhe is equal to the Gauss integral
:<math>
\operatorname{Wr}=\frac{1}{4\pi}\int_{C}\int_{C}d\mathbf{r}_{1}\times d\mathbf{r}_{2}\cdot\frac{\mathbf{r}_{1}-\mathbf{r}_{2{\left|\mathbf{r}_{1}-\mathbf{r}_{2}\right|^{3
</math>.
Numerically approximating the Gauss integral for writhe of a curve in space
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 <math>N</math> line segments. A procedure that was first derived by Michael Levitt
</references>
