Square Root in LaTeX

Use \sqrt{} for square roots and \sqrt[n]{} for nth roots.

Quick Answer

latex
$\sqrt{x}$        % square root
$\sqrt{x^2 + y^2}$ % square root of expression
$\sqrt[3]{x}$     % cube root
$\sqrt[n]{x}$     % nth root

Square Root Examples

latex
% Simple:
$\sqrt{4} = 2$

% Expression under the radical:
$\sqrt{x^2 + y^2}$

% Quadratic formula:
$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

% Nested roots:
$\sqrt{\sqrt{x}} = x^{1/4}$

nth Root

latex
$\sqrt[3]{8} = 2$       % cube root
$\sqrt[4]{16} = 2$      % fourth root
$\sqrt[n]{x^n} = x$     % general nth root

Writing your thesis in LaTeX?

MonsterWriter's LaTeX Workspace gives you real-time PDF preview with no compile limits — at a fraction of Overleaf's price. Works just like Overleaf, costs 11× less.

Try MonsterWriter free

Display vs Inline

In display mode, the radical sign automatically scales to fit the expression. In inline mode it stays small. Use \displaystyle to force large rendering inline.

latex
% Inline (small): $\sqrt{\frac{a}{b}}$

% Display (large, auto-scaled):
\[ \sqrt{\frac{a}{b}} \]

% Force display size inline:
$\displaystyle\sqrt{\frac{a}{b}}

Square Root Without Bar

For fractional exponent notation instead of the radical sign:

latex
$x^{1/2}$    % x to the power 1/2
$x^{1/n}$    % nth root as exponent

Adjusting Radical Height

For tall expressions, LaTeX usually scales the root automatically. If needed, use \vphantom to add invisible height:

latex
% Force the radical to be taller:
$\sqrt{\vphantom{\frac{a}{b}} X + Y}

Related Topics