It's a feature in TeX. A subformula in math mode is a group of symbols surrounded by braces or by \left
-\right
. For instance $a+{b+c}$
has a subformula.1
If you type ${(a+b)}^{2}$
, the exponent will be higher than in $(a+b)^{2}$
, because you are setting an exponent to the whole subformula in the former case, to the parenthesis in the latter case. By the way, the latter is the correct code.
By a choice of Donald Knuth, the creator of TeX, when a subformula happens to only contain an “accent atom”, that is, something like \hat{x}
including possible superscript and subscript, the braces around this atom are stripped off and TeX acts as if they had never been there to begin with.
So typing ${\hat a_b}_c$
is exactly the same as typing $\hat a_b_c$
.2
But, even if this didn't happen, I'd suggest you to avoid such a construct: the workaround
${{}\hat{a}_b}_c$
produces

and your readers will have a hard time trying to get a sense out of it. Perhaps better is
$(\hat{a}_b)_c$
that gives

1 This is just an example, I don't recommend typing such a thing, but subformulas have their uses.
2 I'd prefer \hat{a}
instead of \hat a
, but there's no difference because \hat
is a macro taking one argument.
$\hat{a}_{b_c}$
?$\hat{a_b}_c$
...