Take the 2-minute tour ×

I would like to achieve the following inside an math environment enter image description here

But i can't get the text below the equation

\operatorname{min} \left|
\overbrace{\text{Hadamard product}}^{\begin{pmatrix}
X \circ X \end{pmatrix}} - \begin{pmatrix} 1 & 2 & 3 & \dots & M \end{pmatrix}

results in: enter image description here

share|improve this question
Use \underbrace –  azetina Jan 29 '13 at 19:43
In this special case I personally like the overbrace more and underbrace does not solve the problem, the brackets get to big –  tripplet Jan 29 '13 at 19:51

2 Answers 2

up vote 2 down vote accepted

Here's a way that doesn't need box measurements. I define a command \setbelow with one optional and two mandatory arguments. With the optional argument, the stuff below can be lowered more if needed. The result is essentially the same as in Werner's answer:


For a more flexible solution that also works with \left and \right see this answer of mine.

  \min \bigl|
  \bigl( X \mathbin{\setbelow[0.2ex]{\circ}
                    {\overbrace{\scriptstyle\text{Hadamard product}}}} X \bigr)

Note that you can simply write \min instead of \operatorname{min}!

share|improve this answer
I accepted your answer, because I specially like that everything is warped in a single command –  tripplet Jan 30 '13 at 14:57

abraces can be used for this - swapping/mixing ofthe brace directions:

enter image description here

\usepackage{abraces,mathtools}% http://ctan.org/pkg/{abraces,mathtools}
  \setbox9=\hbox{$(X \circ X)$}
  \operatorname{min} \big| 
    \mathrlap{\hspace{.5\wd9}\mathclap{\aunderbrace[L1U1R]{\scriptstyle\phantom{\text{Hadamard product}}}_{\text{Hadamard product}}}}
    (X \circ X) - (1 \ 2 \ 3 \ \cdots \ M )\big|^2
  \operatorname{min} \big| 
    \underbrace{(X \circ X)}_{\mathclap{\text{Hadamard product}}}

The use of \box9 is just for finding the correct width of (X \circ X). That is, some box movement is required in order to place the \aunderbrace at the correct location. The second option looks better though.

You could use an \overbrace as well. And, using \big (and friends) instead of \left...\right allows for a better appearance in terms of the absolute delimiters.

share|improve this answer
works perfectly, thanks for the fast answer –  tripplet Jan 29 '13 at 19:57
I think it's best practise to always use \bigl and \bigr instead of \big. Otherwise you may get wrong spacing, e.g. for \big|\sin x\big|. –  Hendrik Vogt Jan 30 '13 at 9:17

Your Answer


