# 1 Introduction

## 1.1 Mathematics and its Notation

A distinguishing feature of mathematics is the use of a complex and highly evolved system of two-dimensional symbolic notations. As J. R. Pierce has written in his book on communication theory, mathematics and its notations should not be viewed as one and the same thing [Pierce1961]. Mathematical ideas can exist independently of the notations that represent them. However, the relation between meaning and notation is subtle, and part of the power of mathematics to describe and analyze derives from its ability to represent and manipulate ideas in symbolic form. The challenge before a Mathematics Markup Language (MathML) in enabling mathematics on the World Wide Web is to capture both notation and content (that is, its meaning) in such a way that documents can utilize the highly evolved notational forms of written and printed mathematics, and the new potential for interconnectivity in electronic media.

Mathematical notations evolve constantly as people continue to innovate in ways of approaching and expressing ideas. Even the commonplace notations of arithmetic have gone through an amazing variety of styles, including many defunct ones advocated by leading mathematical figures of their day [Cajori1928]. Modern mathematical notation is the product of centuries of refinement, and the notational conventions for high-quality typesetting are quite complicated. For example, variables and letters which stand for numbers are usually typeset today in a special mathematical italic font subtly distinct from the usual text italic; this seems to have been introduced in Europe in the late 1500 CE. Spacing around symbols for operations such as +, -, × and / is slightly different from that of text, to reflect conventions about operator precedence that have evolved over centuries. Entire books have been devoted to the conventions of mathematical typesetting, from the alignment of superscripts and subscripts, to rules for choosing parenthesis sizes, and on to specialized notational practices for subfields of mathematics. The manuals describing the nuances of present-day computer typesetting and composition systems can run to hundreds of pages.

Notational conventions in mathematics, and in printed text in general, guide the eye and make printed expressions much easier to read and understand. Though we usually take them for granted, we, as modern readers, rely on a numerous conventions such as paragraphs, capital letters, font families and cases, and even the device of decimal-like numbering of sections such as we are using in this document. Such notational conventions are perhaps even more important for electronic media, where one must contend with the difficulties of on-screen reading. But appropriate standards coupled with computers enable a broadening of access to mathematics beyond the world of print.

It is remarkable how widespread the current conventions of mathematical notations have become. The general two-dimensional layout, and most of the same symbols, are used in all modern mathematical communications, whether the participants are, say, European, writing left-to-right, or Middle-Eastern, writing right-to-left. Of course, conventions for the symbols used, particularly those naming functions and variables, may tend to favor a local language and script. The largest variation from the most common is a form used in some Arabic-speaking communities which lays out the entire mathematical notation from right-to-left, roughly in mirror image of the European tradition.

However, there is more to putting mathematics on the Web than merely finding ways of displaying traditional mathematical notation in a Web browser. The Web represents a fundamental change in the underlying metaphor for knowledge storage, a change in which interconnection plays a central role. It has become important to find ways of communicating mathematics which facilitate automatic processing, searching and indexing, and reuse in other mathematical applications and contexts. With this advance in communication technology, there is an opportunity to expand our ability to represent, encode, and ultimately to communicate our mathematical insights and understanding with each other. We believe that MathML as specified below is an important step in developing mathematics on the Web.

## 1.2 Origins and Goals

### 1.2.1 Design Goals of MathML

In order to meet the diverse needs of the scientific community, MathML has been designed from the beginning with the following ultimate goals in mind.

MathML should ideally:

• Encode mathematical material suitable for teaching and scientific communication at all levels.

• Encode both mathematical notation and mathematical meaning.

• Facilitate conversion to and from other mathematical formats, both presentational and semantic. Output formats should include:

• graphical displays

• speech synthesizers

• input for computer algebra systems

• other mathematics typesetting languages, such as TEX

• plain text displays, e.g. VT100 emulators

• iternational print media, including braille

Recognized that conversion to and from other notational systems or media may entail loss of information in the process.

• Allow the passing of information intended for specific renderers and applications.

• Support efficient browsing of lengthy expressions.

• Provide for extensibility.

• Be well suited to templates and other common techniques for editing formulas.

• Be legible to humans, and simple for software to generate and process.

No matter how successfully MathML achieves its goals as a markup language, it is clear that MathML is only useful if it is implemented well. The W3C Math Working Group identified long ago a short list of additional implementation goals. These goals attempt to describe concisely the minimal functionality MathML rendering and processing software should try to provide.

• MathML expressions in HTML (and XHTML) pages should render properly in popular Web browsers, in accordance with reader and author viewing preferences, and at the highest quality possible given the capabilities of the platform.

• HTML (and XHTML) documents containing MathML expressions should print properly and at high-quality printer resolutions.

• MathML expressions in Web pages should be able to react to user gestures, such those as with a mouse, and to coordinate communication with other applications through the browser.

• Mathematical expression editors and converters should be developed to facilitate the creation of Web pages containing MathML expressions.

The extent to which these goals are ultimately met depends on the cooperation and support of browser vendors, and other software developers. The W3C Math Working Group has continued to work with other working groups of the W3C, and outside the W3C, to ensure that the needs of the scientific community will be met in the future. MathML 2 and its implementations showed considerable progress in this area over the situation that obtained at the time of the MathML 1.0 Recommendation (April 1998) [MathML1]. MathML3 and the developing Web are expected to allow much more.

## 1.3 Overview

MathML is designed as an XML Application', that is, it uses XML markup for describing mathematics. A special aspect of MathML is that there are two main strains of markup: Presentation markup, discussed in Chapter 3 Presentation Markup, is used to display mathematical expressions; and Content markup, discussed in Chapter 4 Content Markup, is used to convey the mathematical meaning. Content markup is specified in particular detail. This specification makes use of a format called Content Dictionaries, which is also an application of XML. This format has been developed by the OpenMath Society, [OpenMath2004] with the dictionaries being used by this specification involving joint development by the OpenMath Society and the W3C Math Working Group.

Fundamentals common to both strains of markup are covered in Chapter 2 MathML Fundamentals, while the means for combing these strains, as well as external markup, into single MathML objects are discussed in Chapter 5 Mixing Markup Languages. How MathML interacts with applications is covered in Chapter 6 Interactions of MathML with the Host Environment. Finally, a discussion of the special symbols, and issues regarding characters, entities and fonts, is given in Chapter 7 Characters, Entities and Fonts.

## 1.4 A First Example

As a simple but instructive illustration of what the markup of MathML has become let us consider the quadratic formula.

MathML offers two flavors of markup of this formula. The first is the style which emphasizes the actual presentation of a formula, the two-dimensional layout in which the symbols are arranged. So for this case we have the following.

  x = - b ± b 2 - 4 a c 2 a  $x=\frac{-b±\sqrt{{b}^{2}-4ac}}{2a}$

Consider the superscript 2 in this formula. It is a commonplace that this represents the squaring operation here, but the meaning of a superscript actually depends on the context. A letter with a superscript can be used to signify a particular component of a vector, or maybe the superscript just labels a different type of some structure. Similarly two letters written one just after the other could signify two variables multiplied together, as they do in the quadratic formula, or they could be two letters making up the name of a single variable. What is called Content Markup in MathML allows closer specification of the mathematical meaning of many common formulas. The quadratic formula given in this style of markup is as follows.

  x 2 4 x 4 0 ` $x^{2}+4x+4=0$
Overview: Mathematical Markup Language (MathML) Version 3.0
Next: 2 MathML Fundamentals