Words, and what they forget
The writhe is the exponent sum — the abelianisation B_n → ℤ.
A braid on n strands is exactly what it sounds like: n threads running top to bottom, crossing over and under each other. Artin's presentation makes that a group Bn, generated by σ1…σn−1 — where σi crosses strand i over strand i+1 — with just two families of relations:
σiσj=σjσi(∣i−j∣≥2),σiσi+1σi=σi+1σiσi+1.Add σi2=1 and the strands forget which went over: you get the symmetric group. That forgetting is a homomorphism Bn→Sn, and it is the first invariant here.
The reason braids belong in a combinatorics catalogue is the closure. Bend a braid round and glue its top to its bottom, and you have a link in space; by Alexander's theorem every link arises this way. So a braid word — a finite string of integers — is a complete combinatorial name for a knot, and knot invariants become computations on strings.
The writhe is the exponent sum — the abelianisation B_n → ℤ.
Two different words can be the same braid — σ1σ2σ1 and σ2σ1σ2 are equal in the group but not as strings — so nothing here solves the word problem. What is computed instead are invariants, quantities that agree on every word naming the same braid.
The permutation's cycles are the closure's components, so a closure is a knot exactly when the permutation is an n-cycle. σ13 in B2 closes to the trefoil; σ12 closes to the Hopf link, which has two.
T(2,q) is a knot for odd q and a two-component link for even q.
A braid draws as its strand diagram: a level per letter, read from the bottom up, with the strand that goes under broken at the crossing. Every cell is a strand at a level, so a click picks one, and SameStrand(Selected) follows it through every level. A crossing's two cells carry an Exponent, +1 for σi and −1 for σi−1, which IsOver and IsUnder split into the strand that passes over and the one that passes under.
Click a strand: SameStrand(Selected) lights it end to end and Crosses(Selected) the strands it crosses. The dots at each crossing are colored by Exponent, the sign of the letter.
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 420]">
<StrandDiagram
ColorRules='[
Selected -> White,
True -> ColorData(["Viridis", [-1, 1]])(Exponent),
True -> Opacity(0.5, Gray)
]'
BoundaryStyle="[
SameStrand(Selected) -> Directive(Gold, AbsoluteThickness(4)),
Crosses(Selected) -> Directive(Red, AbsoluteThickness(2.5)),
True -> Directive(Teal, AbsoluteThickness(1.8))
]"
>
<Braid>
4
<ToExpression value="[1, 2, -3, 2, 1, -2, 3, -1]" />
</Braid>
</StrandDiagram>
</Show>BraidClosure draws the closing arcs: each out slot joins the in slot below it, round the right side. A strand that comes back at a different slot is still part of the same component, so SameStrand(Selected) follows a component through the closure. σ13 closes to the trefoil, one component whichever strand you click.
Click a strand: the whole knot lights, since σ₁³ sends slot 1 to slot 2 and back.
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 360]">
<StrandDiagram
ColorRules="[Selected -> White, True -> Opacity(0.5, Gray)]"
BoundaryStyle="[
SameStrand(Selected) -> Directive(Gold, AbsoluteThickness(4)),
True -> Directive(Teal, AbsoluteThickness(1.8))
]"
>
<BraidClosure>
<Braid>
2
<ToExpression value="[1, 1, 1]" />
</Braid>
</BraidClosure>
</StrandDiagram>
</Show>The braid may be named rather than written out: TorusBraid(3, 3) is (σ1σ2)3, which returns every strand to its own slot, so its closure is the three-component link T(3,3). Clicking lights one component at a time.
StrandDiagram takes any braid-valued head. T(3,3) is three linked circles: SameStrand(Selected) lights one.
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 420]">
<StrandDiagram
ColorRules="[Selected -> White, True -> Opacity(0.5, Gray)]"
BoundaryStyle="[
SameStrand(Selected) -> Directive(Gold, AbsoluteThickness(4)),
Crosses(Selected) -> Directive(Red, AbsoluteThickness(2.5)),
True -> Directive(Teal, AbsoluteThickness(1.8))
]"
>
<BraidClosure>
<TorusBraid>3 3</TorusBraid>
</BraidClosure>
</StrandDiagram>
</Show>A Braid value shows the same way anywhere it is the result, without the rules.
BraidClosure(braid) is a head of its own, a link, and as a result it draws the closed braid with no StrandDiagram around it. The knot-polynomial heads take it too.
For a positive braid — no negative letters — Bennequin's theorem says Seifert's algorithm on the diagram is already optimal, so the genus of the closure is g=(c−s+1)/2 for c crossings on s strands. Positivity is doing real work there; the same formula on a mixed braid is simply false.
The deeper invariant comes from a linear representation. Burau sends Bn into GLn−1 over the Laurent polynomials Z[t,t−1], and the Alexander polynomial of the closure falls out of a determinant:
Δ(t)≐det(ψ(β)−I)⋅1−tn1−t.The ≐ is not laziness: Δ is only defined up to a factor ±tk, so every polynomial here is normalised to start at t0 with a positive leading coefficient.
The result is an expression in t, so it is ordinary algebra afterwards.
The last two cells are the package's own check on itself. One runs the Burau matrices and takes a determinant; the other is the closed form
ΔT(p,q)(t)=(tp−1)(tq−1)(tpq−1)(t−1),which mentions no braid at all. They agree for every coprime pair tried, which is what gives any confidence that the Burau generators are written down correctly.
Computing that determinant is its own small problem. Cofactor expansion costs n! multiplications and the braids below reach ten strands; Gaussian elimination wants a field, which a polynomial ring is not. Bareiss elimination threads between them — every intermediate is itself a minor of the original matrix, so each division is exact over any integral domain, and Z[t,t−1] is one.
Alexander came out of a linear representation. Jones comes out of a diagram one — and the diagrams are the Temperley–Lieb ones from the previous section, not a lookalike. Send each generator to a combination of the identity and a TL diagram:
σi↦A⋅1+A−1ei,σi−1↦A−1⋅1+Aei.Those two images are the two ways of smoothing a crossing, which is the whole content of the Kauffman bracket. Multiply the braid word out in TLn, close each surviving diagram up, and let every resulting circle contribute δ=−A2−A−2:
⟨L⟩=D∑cDδloops(D)−1.The bracket alone is not an invariant — a single positive crossing on an unknot leaves −A3 behind — so correct by the writhe, f(L)=(−A3)−w⟨L⟩, and then substitute A=t1/4.
The raw bracket is not invariant; dividing out (−A³)^w is what fixes it.
Two checks worth stating, because they run through completely different machinery. JonesPolynomial takes the knot however you name it: name it TorusKnot(p, q) and it answers from a closed form with no braid, no bracket and no diagrams in it; name a braid the knot closes from and it goes through Temperley–Lieb. They match for every coprime pair tried. And the knot determinant is both ∣Δ(−1)∣ and ∣V(−1)∣ — one computed from Burau matrices over Z[t,t−1], the other from Temperley–Lieb diagrams over Z[A,A−1].
The same polynomial by both routes, then the same knot named two more ways.
V needs a square root of t when the link has an even number of components, so JonesPolynomial declines there rather than inventing one — the bracket, which lives in A, is still perfectly well defined and is what to ask for instead.
Now the bridge back to the modular group. A hyperbolic conjugacy class there is an LR word up to rotation; it is a closed geodesic on the modular surface; and because the unit tangent bundle of that surface is the complement of a trefoil in S3, it is a knot. Ghys's theorem identifies those modular knots with the periodic orbits of the Lorenz attractor, and those have a purely combinatorial braid:
LLRLR is the shortest closed geodesic whose knot is a trefoil.
An LR word is accepted anywhere a braid is, so every head above works on a geodesic directly.
The trip number — how many LR corners the cyclic word has, i.e. how many points cross the branch line rightwards — is the braid index of the resulting link. Trip number 1 therefore means braid index 1, which means the unknot, and that is checkable against the Alexander polynomial on every word at once.
One hump each way is an unknotted orbit, however long the word.