# Using braces to label parts of an equation

Given an equation, say Bayes' rule,

``````\$P(X \mid O) \propto P(X)P(O \mid X)\$
``````

how do I label the different parts of the equation using curly braces?

-
Ah braces, that what they're called. A Google search to "latex moustache" didn't lead me to `\overbrace` – Paul Nov 3 '14 at 21:30
@Paul: Your comment will help the next person. – Neil G Mar 4 at 11:33

I think you're after the `\underbrace` and `\overbrace` commands, which you could use as
``````\$\underbrace{P(X \mid O)}_{p_1} \propto \overbrace{P(X)P(O \mid X)}^{p_2}\$.