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}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} = 3LaTeX 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}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}}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}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}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
- Degree in braces: \sqrt{3}{x} gives the root of 3 followed by a separate x. The degree goes in [ ].
- Writing x^(1/2) with round brackets, which LaTeX treats as plain exponent text.
- A √ character pasted from Word or a keyboard: the bar does not cover the expression, and pdflatex stops with an error about an unsupported Unicode character.
See also
Don't want to memorize commands?
Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.