I noticed that the heights of \sqrt{1} and \sqrt{-1} are different. For instance, when they are in between \left( and \right) parentheses, I must write a character of zero-width (e.g. \sqrt{-1\mathstrut}).

sqrt sizes

Why do \sqrt{1} and \sqrt{-1} behave so different?

This is an example with a slightly more complicated expression:


$$ \left( 10 + \sqrt{7}\,  \right)^{1/3} $$
$$ \left( 10 + \sqrt{-7}\, \right)^{1/3} $$
$$ \left( 10 + \sqrt{+7}\, \right)^{1/3} $$

The following image shows the output of latex. I obtain similar results with pdflatex, xelatex and lualatex. Notice that \sqrt{+7} behaves as \sqrt{-7}, but different from \sqrt{7}.

second example

  • 1
    Please, could you compose a minimal example so that we see what exact font setup you have? And which compiler do you use -- latex, pdflatex, xelatex or lualatex? – yo' Nov 20 '16 at 21:42
  • @yo' done. Also added an expression with more terms showing the same behavior. – vagoberto Nov 20 '16 at 23:26

You can see that in the case of \sqrt{-1} the radical sign is a bit lower; if you do \sqrt{\smash{-}1}, the result will be the same.

This happens because the - character has a depth (equal to that of +).

On the other hand, you shouldn't use \left and \right in those cases. Note \, to space a bit the closing parenthesis.



&\text{wrong} &\quad&\left(\sqrt{1}\right)\left(\sqrt{-1}\right)\left(\sqrt{\smash{-}1}\right)
&\text{right} &\quad&(\sqrt{1}\,)(\sqrt{\smash{-}1}\,)


enter image description here

More details. The character + extends below the baseline, so Knuth decided that - (in math mode, the minus sign) should share the same dimensions as +. This is true for the Computer Modern fonts, and may not be the case with other fonts.

This way, the two formulas $a+b$ and $a-b$ have the same height and depth, but 1 and -1 don't: the latter has nonzero depth.

The radical sign is placed so it is vertically balanced with respect to the subformula it has to cover and, indeed, it is higher in \sqrt{1} than in \sqrt{-1}. This difference is sufficient for triggering a bigger size of the parentheses in the former case.

enter image description here

| improve this answer | |
  • 1
    And \sqrt{\vphantom{-}1 should then give the smaller parentheses, right? – yo' Nov 20 '16 at 21:46
  • 21
    So I guess the \sqrt{-1} is complex. :) – Alan Munn Nov 20 '16 at 21:49
  • 1
    I do not know what "depth" is, but this looks like a bug. – Alexey Nov 20 '16 at 22:23
  • 1
    @egreg I know a \left and \right are useless in such basic expression, but it serves to show what I meant. I edited my question to show another example. But I expect that \sqrt{} will consider the total height of its argument to draw the sqrt symbol. Then, does the number -1 have a smaller \depth or \totalheight than 1? – vagoberto Nov 20 '16 at 23:39
  • 1
    @Alexey See here to see what depth is. – vagoberto Nov 20 '16 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.