Home

Daniel I. Scully

A Beginner's Guide to MathML

Roots

For displaying a square-root MathML provides the <msqrt> tag:

  1. <msqrt>
  2. <mi>x</mi><mo>+</mo><mn>2</mn>
  3. </msqrt>
x+2

For more general roots there is the <mroot> tag. Unlike the <msqrt>, which can contain any number of child tags, the <mroot> must contain exactly two. Again the order is important: the first element is the expression being rooted, and the second is the power of the root.

Below is an example of a cubic root in which, to satisfy the two child rule , the expression being acted upon is grouped within an <mrow> tag:

  1. <mroot>
  2. <mrow>
  3. <mi>x</mi><mo>+</mo><mn>2</mn>
  4. </mrow>
  5. <mn>3</mn>
  6. </mroot>
x+2 3