MathML (Mathematics Markup Language) is the Web's technology for storing and transporting mathematical formulas. It can be used both for including formulas in documents (such as essays and articles) and for exchange of data between mathematical software.
MathML is a formal language for expressing mathematics. It is based on XML to be compatible with a large range of software products.
W3C published the first version of MathML in 1998. MathML was updated and expanded in 2003. The third version, which adds, among other things, support for right-to-left languages, elementary (“school”) math, and integration of the OpenMath content dictionaries, is expected in 2009/2010.
Conceptually, MathML has two parts: presentation and content. They form a single language and it is easy to mix them, but they focus on different goals: the presentation part expresses the two-dimensional look of a formula and is most suitable for publications, such as articles and books; the content part focuses on the semantics and is most suitable as the interchange format between applications for engineering, statistics, etc.
MathML “presentation” markup is typically inserted in XML-based document formats, including XHTML (and soon HTML) mixed with the document's text. MathML “content” markup is more often used on its own.
The markup of a simple formula might look like this:
<msqrt> <mi> x </mi> <mo> + </mo> <mfrac> <mi> a </mi> <mi> b </mi> </mfrac> </msqrt>
This would display as with the root
sign and the fraction bar automatically adjusted in
size and aligned. The
indicates that the x has the role of an
identifier and the tree-like structure of the
mark-up expresses part of the meaning and helps
automatic processing of the formula.
The following examples require a MathML-enabled viewer. Here is Einstein's mass-energy equivalence:
Gauss's standard normal distribution:
Learn more about the current status of specifications related to:
These W3C Groups are working on the related specifications: