This question already has an answer here:

How would I underline an equation with a curly brace and an explanation?, like I've pictured below?

I've tried to use the amsmath package, but the \underline directive does not produce the brace and creates ugly space between the A, B and =.

enter image description here

marked as duplicate by Mico equations Oct 7 '16 at 19:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


 \[\underbrace{A=B}_{\text{Fermat}} \]

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