All guides

Square root in LaTeX

Updated:

A square root is \sqrt{expression}. The degree goes in square brackets before the argument, for example \sqrt[3]{x}. The root bar stretches automatically to the length of the expression underneath it.

Square root

\sqrt{2}
2\sqrt{2}

Always put the argument in braces. \sqrt2 works, but only for a single digit: \sqrt23 gives the root of 2 followed by a plain 3.

Copying this from handwritten notes? Snap a photo of the page and CamteX turns the formulas into LaTeX. Try it free

Cube root

\sqrt[3]{27} = 3
273=3\sqrt[3]{27} = 3

LaTeX places the degree from the square brackets as a small figure in the notch of the root sign. It can be any expression, for example \sqrt[n]{x}.

Long expression

\sqrt{b^2 - 4ac}
b2−4ac\sqrt{b^2 - 4ac}

The bar grows with the expression, so nothing needs adjusting by hand. This is the discriminant from the quadratic formula.

Root of a fraction

T = 2\pi\sqrt{\frac{L}{g}}
T=2πLgT = 2\pi\sqrt{\frac{L}{g}}

The root covers the whole fraction, and the sign grows vertically to match its height. This is exactly how the period of a simple pendulum is written.

Root bars at one height

\sqrt{a\vphantom{b}} + \sqrt{b}
ab+b\sqrt{a\vphantom{b}} + \sqrt{b}

A letter without an ascender (a) and one with it (b) produce bars at different heights. \vphantom{b} adds an invisible b, so both roots get their bar at the same level.

Root as a power

x^{1/3} = \sqrt[3]{x}
x1/3=x3x^{1/3} = \sqrt[3]{x}

An n-th root is the power 1/n. The power form is often handier while you rearrange an equation, and the root sign reads better in the final result.

Common mistakes

See also

Don't want to memorize commands?

Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.

Try it free