8
Illustrating the Theory of Numbers Martin H. Weissman Dept of Mathematics, University of California, Santa Cruz; [email protected] Abstract We describe challenges and opportunities that arise if one attempts to visualize number theory. The goal is to create graphics which convey a theorem or argument, which tell a story, which are clear and honest, and which enable exploration. In the context of statistics, this is the mainstay of data visualization. In the number-theoretic context, problems of visualization are less familiar but tractable. From our pursuit of graphical excellence, we derive a few broad principles for the visualization of pure and experimental mathematics. Introduction Number theory is a strange old field of mathematics. It is not unified by methodology – there is algebraic number theory and analytic number theory and arithmetic geometry. Rather, number theory is unified by its devotion to a set of problems. At its core, these are problems about whole numbers, addition, and multiplication. As its theoretical methods are diverse, so too are the methods of visualization of number theory. One must visualize large data sets, abstract algebraic concepts, and many kinds of geometry. The author encountered these challenges while writing An Illustrated Theory of Numbers [10]. The study of multiplication of whole numbers quickly leads to the set of prime numbers, which I view as the most interesting data set of mathematics. As data sets go, it belongs to the simplest class: a one- dimensional distribution of whole numbers. But this in itself raises challenges for visualization. Typical problems of data visualization relate to extracting a visual story from high-dimensional data. For primes, the interesting story lies in subtle properties of a one-dimensional distribution. How can one visually tell the story of this data set? The first section addresses this challenge. The second section addresses the visualization of a finite cyclic group: the multiplicative group F × p of nonzero numbers modulo a prime p. Finite cyclic groups might be the least interesting, from the standpoint of abstract algebra. But here the generators (called primitive elements) are scattered among the representatives {1 ,..., p - 1}. Abstractly simple, this group is the foundation for cryptographic protocols which, like Diffie- Hellman key exchange [3], are based on the discrete logarithm problem. How does one illustrate the structure of F × p , in order to convey its abstract simplicity along with the erratic distribution of its primitive elements? The third section addresses a major modern (1960s) achievement of number theory: the solution of Gauss’s class-number-one problem for negative discriminants. In the language of binary quadratic forms, a theorem of Heegner, Baker, and Stark (see Stark’s exposition at [7]) proved a conjecture of Gauss [4, Art. 303]. Theorem 1 (Baker-Heegner-Stark). The following is the complete list of negative integers Δ for which there is a unique proper equivalence class of binary quadratic forms of discriminant Δ. -3 , -4 , -7 , -8 , -11 , -12 , -16 , -19 , -27 , -28 , -43 , -67 , -163. Conway’s topograph provides a visual approach to the study of binary quadratic forms. In particular, his results allow one to reinterpret the above theorem as a statement about triangles with integer side-length. This, in turn, allows one to convey the meaning of the above theorem to an audience outside of number theory. Bridges 2018 Conference Proceedings 211

Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;[email protected]

  • Upload
    others

  • View
    6

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Illustrating the Theory of NumbersMartin H. Weissman

Dept of Mathematics, University of California, Santa Cruz; [email protected]

AbstractWe describe challenges and opportunities that arise if one attempts to visualize number theory. The goal is to creategraphics which convey a theorem or argument, which tell a story, which are clear and honest, and which enableexploration. In the context of statistics, this is the mainstay of data visualization. In the number-theoretic context,problems of visualization are less familiar but tractable. From our pursuit of graphical excellence, we derive a fewbroad principles for the visualization of pure and experimental mathematics.

Introduction

Number theory is a strange old field of mathematics. It is not unified by methodology – there is algebraicnumber theory and analytic number theory and arithmetic geometry. Rather, number theory is unified byits devotion to a set of problems. At its core, these are problems about whole numbers, addition, andmultiplication. As its theoretical methods are diverse, so too are the methods of visualization of numbertheory. One must visualize large data sets, abstract algebraic concepts, and many kinds of geometry. Theauthor encountered these challenges while writing An Illustrated Theory of Numbers [10].

The study of multiplication of whole numbers quickly leads to the set of prime numbers, which I viewas the most interesting data set of mathematics. As data sets go, it belongs to the simplest class: a one-dimensional distribution of whole numbers. But this in itself raises challenges for visualization. Typicalproblems of data visualization relate to extracting a visual story from high-dimensional data. For primes,the interesting story lies in subtle properties of a one-dimensional distribution. How can one visually tell thestory of this data set? The first section addresses this challenge.

The second section addresses the visualization of a finite cyclic group: the multiplicative group F×p ofnonzero numbers modulo a prime p. Finite cyclic groups might be the least interesting, from the standpoint ofabstract algebra. But here the generators (called primitive elements) are scattered among the representatives{1, . . . , p − 1}. Abstractly simple, this group is the foundation for cryptographic protocols which, like Diffie-Hellman key exchange [3], are based on the discrete logarithm problem. How does one illustrate the structureof F×p, in order to convey its abstract simplicity along with the erratic distribution of its primitive elements?

The third section addresses a major modern (1960s) achievement of number theory: the solution ofGauss’s class-number-one problem for negative discriminants. In the language of binary quadratic forms,a theorem of Heegner, Baker, and Stark (see Stark’s exposition at [7]) proved a conjecture of Gauss [4,Art. 303].

Theorem 1 (Baker-Heegner-Stark). The following is the complete list of negative integers ∆ for which thereis a unique proper equivalence class of binary quadratic forms of discriminant ∆.

−3,−4,−7,−8,−11,−12,−16,−19,−27,−28,−43,−67,−163.

Conway’s topograph provides a visual approach to the study of binary quadratic forms. In particular,his results allow one to reinterpret the above theorem as a statement about triangles with integer side-length.This, in turn, allows one to convey the meaning of the above theorem to an audience outside of number theory.

Bridges 2018 Conference Proceedings

211

Page 2: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Art cannot be cleanly separated from function, craft and design. An architect or designer is given a“brief” to follow, with goals (or functions) together with constraints such as audience and space and gravity(a building must stand). Their products are described as elegant, an aesthetic judgment to be sure, if form andfunction and constraint harmonize rather than conflict. The same is true of mathematical proofs, constrainedby logic and prior knowledge and directed towards a theorem.

While I began work in visualization for pedagogical reasons – teaching number theory – the exerciseof giving visual form to mathematics led to unexpected results. Though I did not think in this way at thetime, I had given myself a brief: to create images which would convey my intuition for number theory (as aspecialist) to an audience of students. Like a mathematical proof, the images had to be honest and withoutcontradiction. They had to fit on the page, and my tools were limited to programming in Python, and LaTeXwith TikZ.

To present the mathematical form visually – this imperative can drive the creation of beautiful imageswhich convey deep mathematical ideas. Satisfying the imperative is not enough. Elegance seems to comefrom a dialogue between visual aesthetics and mathematical structure. A first attempt may yield a muddledgraphic, ugly colors, awkward proportion. Fixing the visual can raise new mathematical questions – andsometimes, ideally, the visual solution requires an unexpected perspective on mathematics. There can be amoment when the visual form seems to enjoy its constraints, and the viewer can explore mathematics just bysight. That sort of elegance is a rare and valuable artistic reward.

Visualizing the Primes

Euclid (Elements, IX.20) proved that the set of prime numbers is infinite. The list

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 . . .

of prime numbers does not end. Some of the central problems of number theory, e.g., the RiemannHypothesis,address the distribution of primes. Although their small-scale structure is quite irregular, their large-scalestructure is amazingly regular. Heuristically, a whole number n has about a 1/ log(n) “chance” of being prime(where log denotes the natural logarithm). For example, among the thousand numbers between 1 000 001and 1 001 000, one would expect about 1000/ log(1 000 000) ≈ 72 primes. (The actual number is 75.)

Aminimalist approach to visualizing one-dimensional distributions is given by Brian Hayes in [5, Figure1]. His method is to simply place a horizontal line segment for each member of a data set. This allows one toperceive the difference between even and irregular spacing, data points which “repel” one another and thosethat cluster, and trends in the density of data.

From this effective minimalist starting point, one can consider the distribution of primes at differentscales: between 1 and 100, 1 and 1000, 1 and 10000. Each column of Figure 1 displays the primes between1 and 10e, with e = 2, . . . , 9.

The experiment is one of direct display. In the leftmost column, each prime is displayed as a solidbar, 10 points thick. In the second column, each prime is displayed as a line segment, 1 point thick. In thethird column, each horizontal line segment stands for a range of 10 numbers. Each segment is shaded gray,according to the number of primes within the range of 10. For example, if a range of 10 numbers contains4 primes, it is shaded with 40% black ink. By the fourth column, each horizontal line segment stands for arange of 100 numbers. By the last column, each line segment stands for a range of one million numbers. Theamount of black ink is precisely (as far as the printer can handle) the proportion of primes within the givenrange. Note that on some computer screens, a striped appearance is possible due to some “quantization” indigital image rendering.

Weissman

212

Page 3: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

In the first five columns, the eye can see the transition from small-scale irregularity to large-scalesmoothness. The second column is evidently much more “choppy” than the third or fourth; one reason isthat the gaps between primes do not grow proportionally to the primes themselves. For example, the averagegap between primes near 1000 is about 7, which translates to 7 points of line-thickness in the scale of thesecond bar. But the average gap between primes near 10000 is about 9, which translates to just 0.9 points ofline-thickness in the scale of the third bar. In the fourth bar, the average gap between primes appears only0.1 points thick, and so most gaps cannot be seen. Even the largest gaps become undetectable; the largestgap between primes up to 1 million is a gap of 114 (between 492 113 and 492 227). Such a gap is only 0.114points thick in the fifth column (where it would first appear). The absence of visible gaps in the gray barsreflects the fact that the largest gaps between primes grow much more slowly than the primes themselves.

Among primes up to... 100 1000 10 000 100 000 1 000 000 10 000 000 10 000 000 1 000 000 000The largest gap is... 8 20 36 72 114 154 220 282

In the right five columns, the human eye is able to detect the slight lightening of the gray bars from left toright, and within each bar, from bottom to top, reflecting the gradual “spreading out” of primes. One couldemphasize this by using more ink on the left and less on the right. But the perfect correspondence betweenproportion of primes and proportion of black ink yields a gradualism that honestly portrays the 1/ log(n)heuristic. This also fits with Tufte’s design strategy [8] of the “smallest effective difference.”

The red horizontal and diagonal lines in Figure 1 are influenced by the cover image of Edward Tufte’sThe Visual Display of Quantitative Information [9]. They are meant to lead the reader’s eye from left to right,to imagine (for example) the primes between 1 and 100 squeezed into the bottom tenth of the primes between1 and 1000, then squeezed into the bottom hundredth of the primes between 1 and 10000.

23

5

7

1 1

1 3

1 7

1 9

2 3

2 9

3 1

3 7

4 1

4 3

4 7

5 3

5 9

6 1

6 7

7 1

7 3

7 9

8 3

8 9

9 7

100 1 000 10 000 100 000 1 000 000 10 000 000 100 000 000 1 000 000 000

Figure 1: Primes between one and one billion. From The Distribution of Primes, artwork by the author.

Illustrating the Theory of Numbers

213

Page 4: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Visualizing a Cyclic Group

Let p be a prime number. The abelian group F×p may be described in elementary terms as follows. It consistsof the set of numbers {1, 2, . . . , p − 1} and the following rule for multiplication: the product of two elementsa, b of the set is the remainder obtained after dividing ab by p. For example, in F×7 , the product of 3 and 5is 1. We write 3 · 5 = 1 mod 7. The statement that F×p is an abelian group is the statement that this law ofmultiplication is commutative and associative, that it has an identity element (1), and that every element ofF×p has an inverse element. For example, the inverse of 3 is 5 in F×7 , since 3 · 5 = 1 mod 7.

It is a theorem of Gauss that the group F×p is cyclic. This means that there exists a primitive element –an element of F×p which generates all of F×p by repeated multiplication. For example, 3 is a primitive elementin F×7 , because repeated multiplication by 3 (mod 7) traverses all numbers in {1, . . . , 6}:

1·3−→ 3

·3−→ 2

·3−→ 6

·3−→ 4

·3−→ 5

·3−→ 1.

Here an arrow joins a to b if a · 3 = b mod 7. Finite cyclic groups are the simplest objects of grouptheory. But here the structure is concealed because the names of the elements of the group do not reflect thestructure of the group in a simple fashion. Contrast F×p with the additive group (Fp,+) which is also cyclic;a primitive element of the additive group is 1 as seen by the repeated addition (modulo 7):

0+1−−→ 1

+1−−→ 2

+1−−→ 3

+1−−→ 4

+1−−→ 5

+1−−→ 6

+1−−→ 0.

In fact, every nonzero element of the cyclic group (Fp,+) is a primitive element (a generator of the cyclicgroup), while primitive elements of F×p are distributed haphazardly.

We can interpret this as a statement about the dynamics of repeated multiplication in the group F×p. Whathappens when we start with a number a with 1 ≤ a ≤ p − 1, and repeatedly multiply by another number b(modulo p)? If b happens to be a generator, one obtains a cycle of length p − 1. If not, one obtains a cyclewhose length is a proper divisor of p − 1. In fact, cyclic groups with p − 1 elements are characterized by thefact that they have a unique subgroup of any order dividing p − 1. The dynamics encode the structure.

To visualize the cyclic group F×p, Figure 3 displays all of the dynamics without making choices. Aclose-up is below in Figure 2.

MARTIN H. WEISSMAN

E P I C Y C L E S M O D U L O 3 7

+

123

4

5

6

7

8

9

10

11

12

13

14

15

1617

18 19 2021

22

23

24

25

26

27

28

29

30

31

32

33

3435

36

+

17

12

10

33 9

26

34

16

2

14

2420

29

18

1531

32

321

36

30

2527

4

28

11

5

35

2313

17

8

1922

6

-

11321

14

34

35

11

32

9

6

4

15

10

19

25

297

17 36 2416

23

3

2

26

5

28

31

33

22

27

18

12

830

20

-

11928

14

7

22

11

24

12

6

3

20

10

5

21

2933

35 36 189

23

30

15

26

13

25

31

34

17

27

32

16

84

2

+

12533

11

16

30

10

2834 36 12

4

26

21

7

27

93

2 1329

22

32

23

20

19313524

8

15

5

14

17

186

-

1

31

36

62

25 35

12

3

19

34

18

413

3324

57

3230

8

2629

11

9

2028

17

10

14

27

23

1521

22 16

-

124

8

16

32

27

17

34

31

25

13

26

15

30

239

18 36 3533

29

21

5

10

20

3

6

12

24

11

22

7

1428

19

-

18

27

31

26

2336

29

10

6

11

14

2

1617

25

15

9

35

2120

12

22

28

3

24

7

194

32

34

13

30

1833

5

-

114

11

6

10

2936

23

26

31

27

8

2

2822

12

20

21

35

915

25

17

16

3

5

33

1830

13

34

32

4

197

24

-

12030

8

12

18

27

22

33

31

28

5

26

2

3

2316

24 36 177

29

25

19

10

15

4

6

9

32

11

35

34

1421

13

+

1

26 102

1520

3

4

30

519

13

6 8

23

734

33

9

1216 11

2736

14

31

29

1735

22

1824

32

2128

25

-

13225

23

33

20

11

19

16

31

30

35

10

24

28

834

15 36 512

14

4

17

26

18

21

6

7

2

27

13

9

293

22

+

139

27

7

21

26

412 36 34

28

10

30

16

11

3325

2 618

17

14

5

15

8243531

19

20

23

32

22

2913

+

19

7

26

12 34

10

16

33

2

18

1415

24

31

2032

29

327

21

4

3628

30

11

25

5

8

3519

23

22

136

17

-

1153

8

9

24

27

35

7

31

21

19

26

20

4

2312

32 36 2234

29

28

13

10

2

30

6

16

18

11

17

33

1425

5

+

12134

11

9

4

10

257 36 16

3

26

28

33

27

1230

2 531

22

18

8

20

13143532

6

15

19

29

17

2423

+

1

27

26

36

10

11

2

17

15

35

20

22

3

7

4

34

30

33

5

24

19

32

13

18

6

14

8

31

23

29

9

21

12

28

16

25

+

133

16

10

34 12

26

7

9

2

29

3220

31

24

1514

18

325

11

30

2836

4

21

27

5

17

613

22

23

1935

8

+

1416

27

34

25

26

309 36 33

21

10

3

12

11

728

2 832

17

31

13

15

23183529

5

20

6

24

22

1419

+

1

10 262

2015

3

30

4

513

19

6 23

8

733

34

9

1612 11

3627

14

29

31

1722

35

1832

24

2125

28

+

116

34

26

9 33

10

12

7

2

32

3115

18

29

2024

14

311

28

4

2725

30

36

21

5

6

2219

8

17

1323

35

-

1223

29

9

13

27

2

7

6

21

18

26

17

4

1412

5 36 1534

8

28

24

10

35

30

31

16

19

11

20

33

2325

32

+

1287

11

12

3

10

2133 36 9

30

26

25

34

27

164

2 1914

22

24

6

20

5293518

23

15

13

31

17

328

+

134

9

10

7 16

26

33

12

2

31

1820

14

32

1529

24

328

27

30

2111

4

25

36

5

22

813

35

6

1917

23

-

1525

14

33

17

11

18

16

6

30

2

10

13

28

2934

22 36 3212

23

4

20

26

19

21

31

7

35

27

24

9

83

15

+

1

11

10

36

26

27

2

22

20

35

15

17

3

33

30

34

4

7

5

18

13

32

19

24

6

29

23

31

8

14

9

25

16

28

12

21

-

11730

29

12

19

27

15

33

6

28

32

26

35

3

1416

13 36 207

8

25

18

10

22

4

31

9

5

11

2

34

2321

24

-

123

11

31

10

836

14

26

6

27

29

2

922

25

20

16

35

2815

12

17

21

3

32

33

1930

24

34

5

4

187

13

-

129

27

6

26

1436

8

10

31

11

23

2

2117

12

15

28

35

1620

25

22

9

3

13

7

184

5

34

24

30

1933

32

-

1354

29

16

5

27

20

34

6

25

24

26

22

30

149

19 36 233

8

21

32

10

17

3

31

12

13

11

15

7

2328

18

-

1

6

36

312

12 35

25

3

18

34

19

424

3313

530

327

8

1129

26

9

1728

20

10

23

27

14

1516

22 21

+

112

33

26

16 7

10

9

34

2

24

2915

32

14

2018

31

336

25

4

1121

30

27

28

5

23

1719

6

35

138

22

-

11828

23

7

15

11

13

12

31

3

17

10

32

21

833

2 36 199

14

30

22

26

24

25

6

34

20

27

5

16

294

35

-

12421

23

34

2

11

5

9

31

4

22

10

18

25

87

20 36 1316

14

3

35

26

32

28

6

33

15

27

19

12

2930

17

+

13012

27

33

28

26

316 36 7

25

10

4

9

11

3421

2 2324

17

29

19

15

6323514

13

20

8

18

22

315

+

1

362

353

34

433

5 32

6 31

730

8

29

9

28

10

2711

26 12

25

1324

1423

1522

1621

17

20

18

19

Figure 2: A close-up from Epicycles Modulo 37 (artwork by the author). One the left, 5 is a primitiveelement in F×37. On the right, 6 generates a subgroup of order 4 (with 9 cosets).

Weissman

214

Page 5: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Every number b between 1 and 36 generates a subgroup of F×37. The full Figure 3 displays these subgroupsand their cosets for all b. Thus the figure is made of 36 subfigures, as b ranges from 1 to 36 (readingacross then down). The subfigures display a single large circle when b is a primitive element, i.e., whenb ∈ {2, 5, 13, 15, 17, 18, 19, 20, 22, 24, 32, 35}. All in all, the figure displays 36 × 36 numbers, reflecting allpossible multiplications in the group F×37. But a typical “multiplication table” with a 36x36 rectangular grid,is replaced by “dynamics table” which makes the cyclic structure evident.

MARTIN H. WEISSMAN

E P I C Y C L E S M O D U L O 3 7

+

123

4

5

6

7

8

9

10

11

12

13

14

15

1617

18 19 2021

22

23

24

25

26

27

28

29

30

31

32

33

3435

36

+

17

12

10

33 9

26

34

16

2

14

2420

29

18

1531

32

321

36

30

2527

4

28

11

5

35

2313

17

8

1922

6

-

11321

14

34

35

11

32

9

6

4

15

10

19

25

297

17 36 2416

23

3

2

26

5

28

31

33

22

27

18

12

830

20

-

11928

14

7

22

11

24

12

6

3

20

10

5

21

2933

35 36 189

23

30

15

26

13

25

31

34

17

27

32

16

84

2

+

12533

11

16

30

10

2834 36 12

4

26

21

7

27

93

2 1329

22

32

23

20

19313524

8

15

5

14

17

186

-

1

31

36

62

25 35

12

3

19

34

18

413

3324

57

3230

8

2629

11

9

2028

17

10

14

27

23

1521

22 16

-

124

8

16

32

27

17

34

31

25

13

26

15

30

239

18 36 3533

29

21

5

10

20

3

6

12

24

11

22

7

1428

19

-

18

27

31

26

2336

29

10

6

11

14

2

1617

25

15

9

35

2120

12

22

28

3

24

7

194

32

34

13

30

1833

5

-

114

11

6

10

2936

23

26

31

27

8

2

2822

12

20

21

35

915

25

17

16

3

5

33

1830

13

34

32

4

197

24

-

12030

8

12

18

27

22

33

31

28

5

26

2

3

2316

24 36 177

29

25

19

10

15

4

6

9

32

11

35

34

1421

13

+

1

26 102

1520

3

4

30

519

13

6 8

23

734

33

9

1216 11

2736

14

31

29

1735

22

1824

32

2128

25

-

13225

23

33

20

11

19

16

31

30

35

10

24

28

834

15 36 512

14

4

17

26

18

21

6

7

2

27

13

9

293

22

+

139

27

7

21

26

412 36 34

28

10

30

16

11

3325

2 618

17

14

5

15

8243531

19

20

23

32

22

2913

+

19

7

26

12 34

10

16

33

2

18

1415

24

31

2032

29

327

21

4

3628

30

11

25

5

8

3519

23

22

136

17

-

1153

8

9

24

27

35

7

31

21

19

26

20

4

2312

32 36 2234

29

28

13

10

2

30

6

16

18

11

17

33

1425

5

+

12134

11

9

4

10

257 36 16

3

26

28

33

27

1230

2 531

22

18

8

20

13143532

6

15

19

29

17

2423

+

1

27

26

36

10

11

2

17

15

35

20

22

3

7

4

34

30

33

5

24

19

32

13

18

6

14

8

31

23

29

9

21

12

28

16

25

+

133

16

10

34 12

26

7

9

2

29

3220

31

24

1514

18

325

11

30

2836

4

21

27

5

17

613

22

23

1935

8

+

1416

27

34

25

26

309 36 33

21

10

3

12

11

728

2 832

17

31

13

15

23183529

5

20

6

24

22

1419

+

1

10 262

2015

3

30

4

513

19

6 23

8

733

34

9

1612 11

3627

14

29

31

1722

35

1832

24

2125

28

+

116

34

26

9 33

10

12

7

2

32

3115

18

29

2024

14

311

28

4

2725

30

36

21

5

6

2219

8

17

1323

35

-

1223

29

9

13

27

2

7

6

21

18

26

17

4

1412

5 36 1534

8

28

24

10

35

30

31

16

19

11

20

33

2325

32

+

1287

11

12

3

10

2133 36 9

30

26

25

34

27

164

2 1914

22

24

6

20

5293518

23

15

13

31

17

328

+

134

9

10

7 16

26

33

12

2

31

1820

14

32

1529

24

328

27

30

2111

4

25

36

5

22

813

35

6

1917

23

-

1525

14

33

17

11

18

16

6

30

2

10

13

28

2934

22 36 3212

23

4

20

26

19

21

31

7

35

27

24

9

83

15

+

1

11

10

36

26

27

2

22

20

35

15

17

3

33

30

34

4

7

5

18

13

32

19

24

6

29

23

31

8

14

9

25

16

28

12

21

-

11730

29

12

19

27

15

33

6

28

32

26

35

3

1416

13 36 207

8

25

18

10

22

4

31

9

5

11

2

34

2321

24

-

123

11

31

10

836

14

26

6

27

29

2

922

25

20

16

35

2815

12

17

21

3

32

33

1930

24

34

5

4

187

13

-

129

27

6

26

1436

8

10

31

11

23

2

2117

12

15

28

35

1620

25

22

9

3

13

7

184

5

34

24

30

1933

32

-

1354

29

16

5

27

20

34

6

25

24

26

22

30

149

19 36 233

8

21

32

10

17

3

31

12

13

11

15

7

2328

18

-

1

6

36

312

12 35

25

3

18

34

19

424

3313

530

327

8

1129

26

9

1728

20

10

23

27

14

1516

22 21

+

112

33

26

16 7

10

9

34

2

24

2915

32

14

2018

31

336

25

4

1121

30

27

28

5

23

1719

6

35

138

22

-

11828

23

7

15

11

13

12

31

3

17

10

32

21

833

2 36 199

14

30

22

26

24

25

6

34

20

27

5

16

294

35

-

12421

23

34

2

11

5

9

31

4

22

10

18

25

87

20 36 1316

14

3

35

26

32

28

6

33

15

27

19

12

2930

17

+

13012

27

33

28

26

316 36 7

25

10

4

9

11

3421

2 2324

17

29

19

15

6323514

13

20

8

18

22

315

+

1

362

353

34

433

5 32

6 31

730

8

29

9

28

10

2711

26 12

25

1324

1423

1522

1621

17

20

18

19

Figure 3: The dynamics of multiplication, modulo 37. From Epicycles Modulo 37, artwork by the author.

Quadratic reciprocity is a landmark theorem in number theory, first proven (in six different ways) by Gauss.Decades later, Zolotarev [11] proved quadratic reciprocity in yet another way. To start, Zolotarev observedthat if we view multiplication-by-b as a permutation of F×p, then the Legendre symbol

(bp

)coincides with the

sign of this permutation. The signs of these permutations are easily readable from a visualization like Figure3. For example,

(637

)= (−1)9 = −1, since multiplication by 6 yields 9 cycles of length four (see Figure 3),

and every length-four cycle has sign −1. The Legendre symbol is evident in the figure.An unexpected outcome of this visualization, and a source of its aesthetic appeal, is an approximate

symmetry. If x + y = 37, then an exercise in group theory demonstrates that x and y generate subgroupsof F×p of the same order, or else one subgroup has twice the order of the other. For example, in the top-leftsubfigure and bottom-right subfigure, one finds subgroups of orders 1 and 2, respectively. When x = 2 andy = 35, we find subgroups of order 36 in both cases; both are primitive elements. When x = 3 and y = 34,we find subgroups of orders 18 and 9, respectively. This “almost-equality” (up to a possible factor of 2) givesthe whole array a “near-symmetry” with respect to 180-degree rotation. Beyond aesthetics, the image allowsthe reader to explore and notice previously unseen patterns.

Illustrating the Theory of Numbers

215

Page 6: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Visualizing Binary Quadratic Forms via Integer Triangles

Lastly, we turn to the visualization of a theorem: the complete solution to Gauss’s class-number-one problemfor binary quadratic forms of negative discriminant. This theorem is difficult to explain to a novice, but a briefsurvey follows. In his Disquisitiones [4], Gauss makes a detailed study of binary quadratic forms (BQFs,hereafter), functions Q : Z2 → Z of the form

Q(x, y) = ax2 + bxy + cy2.

Gauss requires a, b, c to be integers; Gauss required b to be even, but today this assumption is relaxed. EachBQF has a discriminant: the number ∆(Q) = b2 − 4ac familiar to those who know the quadratic equation.The number ∆(Q) is either a multiple of 4 (if b is even) or one more than a multiple of 4 (if b is odd).

Two binary quadratic forms are called properly equivalent if they are related by a change of variablesmatrix with determinant 1. To denote this, we write Q ∼ Q′ if there exists a matrix g ∈ SL2(Z) such thatQ′(x, y) = Q((x, y) · g) for all x, y ∈ Z. Properly equivalent BQFs have the same discriminant.

Gauss proved that, for any nonzero ∆, there are finitely many proper equivalence classes of binaryquadratic forms of discriminant ∆. The number of proper equivalence classes of primitive BQFs of discrim-inant ∆ is called the class number and denoted h+(∆). Here, primitive means that GCD(a, b, c) = 1. Fornegative discriminants, h+(∆) increases gradually (though not monotonically) as |∆| increases. In particular,Gauss conjectured that there are only finitely many negative integers ∆ for which h+(∆) = 1. This was solvedby Heegner, Baker, and Stark (Theorem 1): the complete list of negative ∆ for which h+(∆) = 1 is

−3,−4,−7,−8,−11,−12,−16,−19,−27,−28,−43,−67,−163.

In his Sensual (quadratic) Form [2], John H. Conway introduces the topograph – an arrangement of thevalues of a BQF on regions bounded by a ternary-regular tree in the hyperbolic plane. When Q has negativediscriminant, Conway’s topograph contains a unique well or double-well: a location at which the values areminimal, in a sense.

7

21

21

7

131

3

13

31

19

31

31

19

21

7

21

13

21

13

7

13

7

3113

19

13

31

19

13

1

19

7

21

19

3

240 an illustrated theory of numbers

1

1

16

9

1

9

4

1

9

1

25

9

1

1

16

49

1

49

1

1

16

1

9

0

41

4

4

125

9

16

4

1

7

21

21

7

1

31

3

13

31

19

31

31

19

21

7

21

13

21

13

7

13

7

3113

19

13

31

19

13

1

19

7

21

19

3

13

26

5

1

37

2

34

25

13

25

26

37

29

17

10

17

17

10

10

17

13

34

25

29 2

37

26

5

29

34

10

25

1

13

37

5

26

34

5

29

Figure 4: Conway’s topographs for Q(x, y) = x2 − xy + y2 and Q(x, y) = x2 + y2. The well on the left hasthe triple of values (1, 1, 1). The double-well on the right has values (1, 1, 2).

More precisely, a well can be located on the topograph as a triple of numbers (u, v,w) surrounding a point,such that the (weak) triangle inequalities hold:

u + v ≥ w, v + w ≥ u, w + u ≥ v.

It is a theorem, essentially of Gauss, but reformulated by Conway in terms of wells, that the equivalence classof a binary quadratic form is determined by the triple of numbers surrounding its well. Conversely, every

Weissman

216

Page 7: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

triple (u, v,w) of positive integers satisfying the triangle inequalities determines a unique equivalence classof binary quadratic forms. The discriminant of these BQFs is given by

∆ = u2 + v2 + w2 − 2uv − 2vw − 2wu.

Thus, to visualize the proper equivalence classes of BQFs of negative discriminants, it is equivalentto visualize all triangles with integer side-lengths (u, v,w). We must allow “degenerate triangles” – linesegments with u + v = w, for example. In Figure 5, we organize these triangles horizontally by discriminant(the number ∆ above) and vertically by their smallest side-length.

MARTIN H. WEISSMAN

3 4 7 8 11 12 15 16 19 20 23 24 27 28 31 32 35 36 39 40 43 44 47 48 51 52 55 56 59 60 63 64 67 68 71 72 75 76 79 80 83 84 87 88 91 92 95 96 99 100 103 104 107 108 111 112 115 116 119 120 123 124 127 128 131 132 135 136 139 140 143 144 147 148 151 152 155 156 159 160 163

Figure 5: Primitive triangles with integer sides u, v,w, arranged horizontally by discriminantu2 + v2 + w2 − 2uv − 2vw − 2wu and vertically by min{u, v,w}. (Artwork by the author.)

Negative discriminants,−3,−4,−7,−8,−11,−12, . . . ,−163 aremarked by vertical “pinstripes,” and numberedat the bottom. The thinnest triangles along the bottom correspond to the “principal classes” of binary quadraticforms (those with smallest side length 1). Some triangles are isosceles, and others are paired with their mirror-image. This enables the reader to compute h+(∆) by simply counting the number of triangles along a givenvertical line. For Gauss’s class number (based on proper equivalence), the non-isosceles triangles and theirmirror images are counted separately. For example, h+(−31) = 3. Isosceles triangles correspond to Gauss’sambiguous forms, capturing the “2-torsion of the class group” in modern terminology.

The rightmost line contains a single triangle, reflecting the endpoint of the Baker-Heegner-Stark theorem:−163 is the last negative discriminant with class number one. In fact, the whole theorem becomes a statementabout triangles with integer side length – if one continued Figure 5 further to the right, one would never againfind a vertical line with only one triangle on it.

The parabolic separation of light and dark reflects a classical bound: the smallest side-length of a triangleis bounded by

√∆/3. Equivalently, the smallest nonzero value of a positive-definite BQF of discriminant ∆

is bounded by√∆/3.

Illustrating the Theory of Numbers

217

Page 8: Illustrating the Theory of Numbers - The Bridges Archive · 2018-07-15 · Illustrating the Theory of Numbers MartinH.Weissman DeptofMathematics,UniversityofCalifornia,SantaCruz;weissman@ucsc.edu

Principles for Visualizing Mathematics

From creating these images, I have distilled a few principles for visualizing mathematics.First: Directly show the raw data. Try to represent your data points (e.g., all multiplications in F×37)

directly, with simple dots, lines, numbers, etc. Do not bin your data or summarize until the direct portrayalhas a chance to suggest patterns.

Second: Bring mathematics into the deep design. The image in Figure 5 began with a simple concept:draw all integer-side triangles, arranged by discriminant and smallest value. When standard data-graphicselements like axes with tick marks, grids, etc., failed, mathematics guided the way. The vertical lines ofFigure 5 serve as gridlines at the same time as they exhibit the pattern of possible discriminants. To representthe smallest-value bound min{u, v,w} ≤

√∆/3, I drew a parabolic curve at first. But the curve seemed to

clutter the image without conveying the message. Eventually, the curve became the border between dark andlight, which underlies the composition of the piece. In terms of perception, the bound became the groundand the triangles the figure. Mathematics not only provided data, but deeply influenced the design.

Third: Visualize mathematics at multiple scales. When we look at an image, our eyes follow ajumpy path [6] guided by the image’s composition. Our graphics can tell a nuanced story if they operatecompositionally on a large scale and also offer fine detail (visually and mathematically). The broad structureof Figure 3 reflects the structure of a cyclic group. At a distance, one sees only circles arranged in circlesarranged in a matrix. Close up (Figure 2), the fine detail gives the actual numbers. Words or numbers mightplay a crucial role, especially at the fine scale. Multiple scales are the foundation of Figure 1. The leftmostbar contains primes as individual numerically-labeled figures; the rightmost bar displays only a light gradient.

The field of data visualization is rapidly progressing, from Tufte’s new foundations [9] to interactionand animation (e.g., the Javascript package d3.js [1]). The time is ripe for expositors of mathematics tounderstand this field and convey their ideas with a mix of text and graphics.

References

[1] M. Bostock, V. Ogievetsky, and J. Heer. “D3: Data-Driven Documents.” IEEE Trans. Visualization &Comp. Graphics (Proc. InfoVis), 2011.

[2] J. H. Conway. The Sensual (quadratic) Form, vol. 26 of Carus Mathematical Monographs. MAA,Washington, DC, 1997. With the assistance of Francis Y. C. Fung.

[3] W. Diffie and M. E. Hellman “New directions in cryptography.” IEEE Trans. on Information Theory22(6):644–654, November 1976.

[4] C. F. Gauss. Disquisitiones Arithmeticae. Springer-Verlag, New York, 1986. Translated and with apreface by Arthur A. Clarke.

[5] B. Hayes. “Computing science: The spectrum of Riemannium.” Amer. Scientist, 91(4):296–300, 2003.[6] R. Q. Quiroga and C. Pedreira. “How do we see art: an eye-tracker study.” Frontiers in Human

Neuroscience, 5(98):1–9, September 2011.[7] H. M. Stark. “The Gauss class-number problems.” In Analytic Number Theory, volume 7 of Clay

Math. Proc., pages 247–256. Amer. Math. Soc., Providence, RI, 2007.[8] E. R. Tufte. Visual Explanations. Graphics Press, Cheshire, Connecticut, 1997.[9] E. R. Tufte. The Visual Display of Quantitative Information. Graphics Press, Cheshire, Connecticut,

2001.[10] M. H. Weissman. An Illustrated Theory of Numbers. Amer. Math. Soc., Providence, RI, 2017.[11] G. Zolotareff. “Nouvelle démonstration de la loi de réciprocité de Legendre.” Nouvelles Annales de

Mathématiques. 2e série, 11:354–362, 1872.

Weissman

218