11

Interestingly enough, I found that \left( \frac{a}{b} \right) and \left( \frac{b}{a} \right) have different sizes in Display Mode.

Rendered Picture

What caused them to have a different size?

1
  • You may use $\bigl(\frac{a}{b}\bigr)$ (or $\Bigl(\frac{a}{b}\Bigr)$ for larger parentheses) if wish the parenthesis size being independent of the content
    – user94293
    Nov 7, 2021 at 9:09

1 Answer 1

17

To see why this is the case, consider looking at the bounding box associated with the resulting \frac (or the numerator/denominator):

enter image description here

\documentclass{article}

\begin{document}

\setlength{\fboxsep}{-\fboxrule}% Just for this example

\[
  % Bounding boxes of numerator/denominator
  \left(\frac{\fbox{$a$}}{\fbox{$b$}}\right)
  \quad
  \left(\frac{\fbox{$b$}}{\fbox{$a$}}\right)
  \quad
  % Bounding box of complete fraction
  \left(\fbox{$\displaystyle\frac{a}{b}$}\right)
  \quad
  \left(\fbox{$\displaystyle\frac{b}{a}$}\right)
\]

\end{document}

The ascender of b pushes higher than a (without an ascender) and, since the delimiters extend equidistant around the vertical math axis (denoted by the horizontal rule of the fraction), it's extended more to accommodate for the "larger" numerator.

If you wanted the delimiters to extend the same height you'd have to remove the additional height added by b's ascender. This can be achieved via \smash, supplemented with an appropriate \vphantom (of a or some other character without an ascender):

enter image description here

\documentclass{article}

\begin{document}

\[
  \left(\frac{a}{b}\right)
  \quad
  \left(\frac{b}{a}\right)
  \quad
  \left(\frac{\vphantom{a}\smash{b}}{a}\right)
\]

\end{document}

I doubt that's what you want, but still.

1
  • 1
    Rather than smashing the b down to a height, it might be preferable to raise the a to b height with a \vphantom{b}. That way the numerators and denominators all have the same height.
    – Emma
    Nov 9, 2021 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .