Fractions and roots\sqrt

\sqrtCommand

Used for square roots and n-th roots in mathematical expressions, including radicands given as a single token, a grouped expression, or a bare fraction command.

\sqrt{x}
Available in
base
Kind
prefix
Allowed mode
math
Frequency
6.99% of corpus formulasrank 8 of 263
Commonality
high
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\sqrto[a]optional math contentm{b}math content

Argspec o m — one optional and one mandatory argument. Reading argspecs

Common tasks#

How to write a square root#

\sqrt{x}

How to write an nth root#

\sqrt[n]{x}

How to write a nested radical#

\sqrt{1+\sqrt{2+\sqrt{3}}}

How to write a cube root of a fraction#

\sqrt[3]{\frac{a}{b}}

Examples#

\sqrt[3]{x}
\sqrt\frac ab
\sqrt[3]\frac ab

In TeXForm#

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

Equivalent forms#

  • \root #1 \of{#2}exact

    For the indexed form, TeX's general-root syntax is equivalent.

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\sqrt{a}Positive · baselinePassPassPass
\sqrt[a]{b}Positive · vary:o[0]PassPassPass
\sqrt aPositive · bare[1]PassPassPass
All 21 in Fractions and roots