# Vertically aligned \underbracket's in an equation

$\underbracket[0.5pt]{\left( \begin{array}{c} a \\ b \end{array} \right)}_{v_1} \qquad \underbracket[0.5pt]{\left( \begin{array}{c} a \\ b \\ c \end{array} \right)}_{v_2}$


gives

I would like both brackets to lie on the same line, i.e., sthg like

-
See also Enforcing baseline alignment for multiple overbraces in math mode (possible duplicate?) –  Hendrik Vogt Mar 14 '13 at 13:41
@HendrikVogt: Thanks for the link. I thought about vphantom. However, I am looking for another solution that works in more complicated examples? –  user7064 Mar 14 '13 at 13:43
@user7064 It may be possible to produce a more general solution to the baseline-alignment problem, but you need to explain what you mean by more "complicated examples". –  Jubobs Mar 14 '13 at 14:10
@Jubobs: I have an equation that combines several vectors and matrices (of different lengths/dimensions). Using \vphantom might be possible, but will result in awfull code... –  user7064 Mar 14 '13 at 14:14

use

\underbracket[0.5pt]{\left(
\begin{array}{c}
a \\
b
\end{array}
\right)
\vphantom{\left(\begin{array}{c}a \\b \\c\end{array}\right)}
}_{v_1}


EDIT: This might work

\begin{equation*}
\begin{matrix}
\begin{pmatrix}
a \\ b
\end{pmatrix}
&
\begin{pmatrix}
a \\ b \\c
\end{pmatrix}
\$-1em] \underbracket[0.5pt]\qquad_{v1} & \underbracket[0.5pt]\qquad_{v2} \end{matrix} \end{equation*}  (anyone know how to get dvipng to not to cut off so tightly?) - @Thanks +1. Is there another solution than vphantom? – user7064 Mar 14 '13 at 13:45 Not really. The problem is that the fences (the ()'s) are symetric about the math centerline, thus we cannot just use the [b] option for array – daleif Mar 14 '13 at 14:37 Thx, I will try and probably accept thereafter – user7064 Mar 14 '13 at 15:45 @daleif using [b] with delimiters is where delarray comes in:-) – David Carlisle Mar 14 '13 at 17:29 Please always post complete documents showing all packages used. (I only got mathtools due to other answers) \documentclass{article} \usepackage{delarray,mathtools} \begin{document} \[ \underbracket[0.5pt]{ \begin{array}[b]({c}) a \\ b \end{array} }_{v_1} \qquad \underbracket[0.5pt]{ \begin{array}[b]({c}) a \\ b \\ c \end{array} }_{v_2}$

\end{document}

-
That was the package I had forgotten. I was messing with blockarray. Is delarray compatible with the array package and this memoir? –  daleif Mar 14 '13 at 18:22
@daleif delarray uses array (actually delarray is a bit of array we decided not to put into the latex2e version of array) no reason why it shouldn't work with memoir –  David Carlisle Mar 14 '13 at 18:57