Square / cube root symbols in LaTeX

The \sqrt command shows the square or cube root symbol in LaTeX.

\[
\sqrt{4} = 2 \\~\\
\sqrt 4 = 2 \\~\\
\sqrt 25 = 5 \\~\\
\sqrt[3]{27} = 3 \\~\\
\sqrt[3] 27 = 3
\]

\[ \sqrt{4} = 2 \\~\\ \sqrt 4 = 2 \\~\\ \sqrt 25 = 5 \\~\\ \sqrt[3]{27} = 3 \\~\\ \sqrt[3] 27 = 3 \]

Without the brackets {}, the root symbol contains only the first number.

LaTeX number

LaTeX