Square Roots and Radicals in LaTeX

\sqrt with and without an index, how far the radicand extends, and what to do when a radical nests too deep.

\sqrt takes the radicand as one argument and an optional index in square brackets. How far the horizontal bar extends is decided by what sits inside the braces, not by the line above it — so most complaints about radicals are really bracing mistakes. Roots and fractions interact closely: Fractions covers the sizing, and Brackets covers the parentheses that usually surround the result.

Which one to use

Situation Write this Because
Square root
\sqrt{x}
Index omitted entirely.
Cube or nth root
\sqrt[3]{x}, \sqrt[n]{x}
Optional argument in brackets.
A long expression
\sqrt{x^2+y^2}
One brace: the bar covers all of it.
Root of a fraction
\sqrt{\frac{a}{b}}
The radical grows to clear the fraction.
Nested radicals
\sqrt{1+\sqrt{x}}
Legible to two levels; deeper needs powers.
The same value as a power
x^{1/2}
Identical meaning, different typography.

The commands

What Type this Renders as
Square root The common case.
\sqrt{2}
\sqrt{2}
Radical over an expression Everything in the braces is under the bar. Omitting braces covers only the next token.
\sqrt{b^2-4ac}
\sqrt{b^2-4ac}
Cube root Optional argument before the radicand sets the index.
\sqrt[3]{x}
\sqrt[3]{x}
nth root The index can be any expression, though long ones read badly.
\sqrt[n]{a_n}
\sqrt[n]{a_n}
Root of a fraction The radical grows to cover the stacked fraction.
\sqrt{\frac{x}{y}}
\sqrt{\frac{x}{y}}
Power as a root Equivalent, and often preferable inline because it does not stretch the line.
x^{1/2} = \sqrt{x}
x^{1/2} = \sqrt{x}
Fourth root Two-digit indices start colliding with the radical; consider a fractional power instead.
\sqrt[4]{16}
\sqrt[4]{16}
Complex radicand The Euclidean norm written out longhand.
\sqrt{x^2+y^2}
\sqrt{x^2+y^2}

Worked examples

The quadratic formula

x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}

A radical inside a numerator — the single most pasted formula on this site.

Nested radical

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

Legal, and it shrinks at every level. Two levels is usually the practical limit.

Root with an exponent

\sqrt[3]{x^2} = x^{2/3}
\sqrt[3]{x^2} = x^{2/3}

Same quantity; the fractional power is far more readable inline.

Common mistakes

  • \sqrt a + b when \sqrt{a+b} was meant. Without braces the radical covers only a.
  • Nesting three or more radicals and getting illegibly small inner content. Break the expression apart instead.
  • Writing \sqrt{x} for a cube root because the index was forgotten. Visually identical to a square root except for the small number, so it is easy to miss.
  • Assuming \sqrt can take two arguments: \sqrt{3}{x} renders the {x} as ordinary text after the radical.

Questions about this notation

How do I write a cube root in LaTeX?
Use \sqrt[3]{x}. The index goes in square brackets before the braced radicand, and any n works the same way, so \sqrt[n]{x} is the general form.
Why does my square root only cover part of the expression?
Because braces define the radicand. \sqrt{a+b} covers both terms; \sqrt a+b covers only a.
Is x^{1/2} the same as \sqrt{x}?
Mathematically yes, typographically no. The fractional power stays compact inline, while \sqrt{x} forces the line taller.
How do I write a cube root or an nth root in LaTeX?
Give the index as an optional argument in square brackets: \sqrt[3]{x}, \sqrt[n]{x}. It prints as a small raised digit on the left of the radical. Without brackets you get the square root. What is under the bar is whatever is inside the braces, so \sqrt{xy} covers both letters while \sqrt{x}y covers only one — the most common reason a root looks wrong.

Keep reading

Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.