# MathML Element to Display a Radical by Stephen Bucaro

An exponent is a number or letter written to the right of and above a number that defines how many times to use that number in a multiplication. A radical is the opposite of an exponent and is also known as root. The radical symbol indicates that the root of number inside the radical symbol should be taken.

If the number inside the radical symbol represents a number that was multiplied by itself once (squared), then a square root radical symbol is used. If the number inside the radical symbol represents a number that was multiplied by itself more than once, then that number of times (the index) is written as a small number placed inside the check mark portion of the radical sign.

MathML has two different elements used to display radicals. The msqrt element is used to specify a square root, and has no index. The mroot element is used to specify a higher index radical and displays that index.

$\sqrt{x}$
$<msqrt> <mi>x</mi> </msqrt>$


Shown above is an example using the msqrt element to show a square root radical.

$\sqrt[3]{x}$
$<mroot> <mi>x</mi> <mn>3</mn> </mroot>$


Shown above is an example using the mroot element to show a higher root radical. Note that the base comes first in the code.

$\sqrt{6\left(2x+2-4\left(4x-2\right)\right)}$
$<msqrt> <mn>6</mn> <mo>(</mo> <mn>2</mn> <mi>x</mi> <mo>+</mo> <mn>2</mn> <mo>-</mo> <mn>4</mn> <mo>(</mo> <mn>4</mn> <mi>x</mi> <mo>-</mo> <mn>2</mn> <mo>)</mo> <mo>)</mo> </msqrt>$


Shown above, a complex expression is used as the root in a msqrt element.

$\sqrt[3y]{6\left(2x+2\right)}$
$<mroot> <mrow> <mn>6</mn> <mo>(</mo> <mn>2</mn> <mi>x</mi> <mo>+</mo> <mn>2</mn> <mo>)</mo> </mrow> <mrow> <mn>3</mn> <mi>y</mi> </mrow> </mroot>$


Note that when using a root and or an index with multiple elements, use the mrow element to specify which elements go in the root and which go in the index.

$\frac{y}{\sqrt[3]{x}}$
$<mfrac> <mi>y</mi> <mroot> <mi>x</mi> <mn>3</mn> </mroot> </mfrac>$


Shown above is an mroot element nested inside an mfrac element. Either or both the mroot element and the mfrac element can be made as complex as necessary by using the mrow element.

$\sqrt[3]{\frac{y}{4}}$
$<mroot> <mfrac> <mi>y</mi> <mn>4</mn> </mfrac> <mn>3</mn> </mroot>$


Shown above is an mfrac element nested inside an mroot element. Either or both the mfrac element and the mroot element can be made as complex as necessary by using the mrow element.