Logo IMG
HOME > PAST ISSUE > Article Detail


Speaking of Mathematics

Brian Hayes

A Two-Dimensional Language

Mathematics is an unusual language. In ordinary languages speech is primary, and the written form is a later addition, devised as a way of recording what is said. Hence there is a reasonably direct, one-to-one mapping between written and spoken language. Of particular importance, both forms are one-dimensional, at least in their surface structure: One word follows another in a definite sequence. When reading aloud from a written text, you don't even need to know the meaning of the words; you need only know the rules of pronunciation and prosody. That's what makes text-to-speech systems possible; if a computer had to understand a sentence before it could read it aloud, the listener would have a long wait.

Mathematical notation is different. Mathematics is first of all a written language, with a few speech conventions imposed on it after the fact. When mathematicians talk shop, they do so at the blackboard; in a more formal setting, a mathematician giving a talk comes equipped with transparencies to project. Perhaps the clearest sign that mathematical notation evolved initially as a system of writing rather than speaking is its reliance on the two dimensions of the written page. Superscripts and subscripts, to cite a commonplace example, derive their meaning from their position above or below the baseline, a concept that has no immediate oral counterpart. And it would be hard to imagine anything more patently two-dimensional than the notation for a matrix. If ordinary language is linear, then mathematical writing is planar.

The two-dimensional nature of mathematical notation leads to awkwardness in at least one other context besides spoken communication. The context is that of writing equations on a computer. A computer text file is strictly one-dimensional; it is a sequence of characters, typically represented as eight-bit bytes, with no higher-level structure. In the computer's memory you cannot place one symbol "above" another, nor can you arrange to shift one byte a little below the baseline. It's an ironic situation: The most mathematical of machines cannot accommodate the language of mathematics.

Among the various remedies for this problem, the most thoroughgoing and also the most widely adopted is the TeX formatting language, developed by Donald E. Knuth of Stanford University. TeX was extended by Leslie Lamport of the Digital Equipment Corporation to create a somewhat higher-level language called LaTeX. (The names are pronounced tech and lah-tech. Their authors prefer special typographic treatment for them, in which certain letters are shifted above or below the baseline. These niceties are approximated here by combinations of upper-case and lower-case letters.)

TeX linearizes the two-dimensional layout of an equation. Here is the LaTeX encoding of the equation given above:

$$\lim_{x \to \infty}\int_0^x e^{-y^2}\dy = \frac{\sqrt{\pi}}{2}$$

Terms that begin with a backslash are "control sequences," most of which are easy to figure out. For instance, the sequence \infty generates ∞, \int is the integral sign ∫, and \frac makes a fraction out of the two groups of symbols that follow it. The underscore and caret (_ and ^) designate subscripts and superscripts respectively. Of course no one would want to read mathematics in this form, but raw TeX is not meant for human consumption. It is processed by a computer program that renders it in a more palatable form on a display screen or on the printed page.

AsTeR is also a computer program that accepts TeX notation as input and produces a rendering as output, but the rendering is audible rather than visual. The program does not simply read out the TeX code literally; a rendering that began "dollar dollar backslash lim underscore left-bracket x . . ." would be incomprehensible. What is needed is an approximation to the oral rendering that would be given by a mathematically knowledgeable human reader, perhaps something like: "The limit, as x goes to infinity, of the integral, from y equals zero to x, of e to the minus y squared, dy, equals the square root of pi, over 2." (I have had a hard time punctuating this sentence, because of the unusual pattern of pauses that readers employ to indicate the grouping of mathematical expressions. Perhaps this difficulty is another sign of the tenuous connection between written and spoken mathematics.)

» Post Comment



Of Possible Interest

Letters to the Editors: Saving Paper

Sightings: Watching Earth Change

Computing Science: Uniquely Me!

Subscribe to American Scientist