Skip to content

ModularWord ​

The unique positive word in LL and RR of a matrix in PSL(2,Z)\mathrm{PSL}(2,\mathbb{Z}) with non-negative entries — which is also its path down the Stern–Brocot tree.

ModularWord(matrix)the positive LRLR word
ModularMatrix(a, b, c, d)a matrix; every head here also accepts the word in its place
ModularSTWord(matrix)the alternating SS/TT factorisation, as its list of TT-exponents
Typed signatures
TypePackageApplies
(expression<ModularMatrix> | list | string) -> stringmodularalways

Domain: The modular group

Details
  • L=(1011)L = \begin{pmatrix}1&0\\1&1\end{pmatrix} and R=(1101)R = \begin{pmatrix}1&1\\0&1\end{pmatrix} generate the positive cone
  • The peel never searches: RR comes off when a≥ca \ge c and b≥db \ge d, LL when c≥ac \ge a and d≥bd \ge b, and both at once would force determinant 00
  • ModularKind sorts by ∣tr∣|\mathrm{tr}| against 22 — elliptic, parabolic, hyperbolic
  • A positive word is hyperbolic exactly when it uses both letters; all-LL and all-RR are parabolic
  • Rebuilding from an SS/TT word can return −M-M: that sign is the ±I\pm I that PSL\mathrm{PSL} quotients out

Examples

Basic #

the shortest geodesic

live ↗
InModularWord(ModularMatrix(1,1,1,2))\mathrm{ModularWord}(\mathrm{ModularMatrix}(1, 1, 1, 2))OutLR\text{LR}

a word evaluates as its matrix

live ↗
InModularTrace(LRLR)\mathrm{ModularTrace}(\text{LRLR})Out77
Scope #

the SS/TT exponents are a continued fraction

live ↗
InModularSTWord(ModularMatrix(1,5,0,1))\mathrm{ModularSTWord}(\mathrm{ModularMatrix}(1, 5, 0, 1))Out[5]\bigl\lbrack5\bigr\rbrack

the identity matrix

live ↗
InModularKind(ModularMatrix(1,0,0,1))\mathrm{ModularKind}(\mathrm{ModularMatrix}(1, 0, 0, 1))OutIdentity\text{Identity}

SS is elliptic

live ↗
InModularKind(ModularMatrix(0,−1,1,0))\mathrm{ModularKind}(\mathrm{ModularMatrix}(0, -1, 1, 0))OutElliptic\text{Elliptic}

TT is parabolic

live ↗
InModularKind(ModularMatrix(1,1,0,1))\mathrm{ModularKind}(\mathrm{ModularMatrix}(1, 1, 0, 1))OutParabolic\text{Parabolic}

LRLR is hyperbolic

live ↗
InModularKind(ModularMatrix(1,1,1,2))\mathrm{ModularKind}(\mathrm{ModularMatrix}(1, 1, 1, 2))OutHyperbolic\text{Hyperbolic}

the trace of a plain matrix, not just a word

live ↗
InModularTrace(ModularMatrix(1,1,1,2))\mathrm{ModularTrace}(\mathrm{ModularMatrix}(1, 1, 1, 2))Out33

the trace of a bare word

live ↗
InModularTrace(LR)\mathrm{ModularTrace}(\text{LR})Out33

a word wrapped as ModularMatrix reads the same

live ↗
InModularTrace(ModularMatrix(LRLR))\mathrm{ModularTrace}(\mathrm{ModularMatrix}(\text{LRLR}))Out77

a nested List matrix works too

live ↗
InModularTrace([[1,1],[1,2]])\mathrm{ModularTrace}(\bigl\lbrack\bigl\lbrack1, 1\bigr\rbrack, \bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack)Out33
Properties #

T5T^5 fixes a cusp

live ↗
InModularKind(ModularMatrix(1,5,0,1))\mathrm{ModularKind}(\mathrm{ModularMatrix}(1, 5, 0, 1))OutParabolic\text{Parabolic}

the SS/TT round trip can return −M-M

live ↗
InModularTrace(ModularFromSTWord(ModularSTWord(ModularMatrix(3,2,4,3))))\mathrm{ModularTrace}(\mathrm{ModularFromSTWord}(\mathrm{ModularSTWord}(\mathrm{ModularMatrix}(3, 2, 4, 3))))Out−6-6
About
Examples13
CrosswalkWikipediaMathWorldWikidata

See also: ContinuedFraction, ModularClasses, RademacherSymbol