# Why do \left( \frac{a}{b} \right) and \left( \frac{b}{a} \right) have different sizes?

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

What caused them to have a different size?

• 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 Nov 7, 2021 at 9:09

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

\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):

\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.

• 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