[Tex/LaTex] Vertical equivalent for \overbrace and \underbrace

delimitersmath-mode

Is there a way to label a vector like this in LaTeX? (like \overbrace/\underbrace but vertically)

a \
a  |
a   > Segment a
a  |
a /
b \
b  |
b   > Segment b
b  |
b /

I assume I can't be the first one that asks that, however I was not able to find anything helpful.

Best Answer

One way to do it:

\left.
\begin{array}{rrr}
a\\
a\\
a\\
a\\
a
\end{array}
\right\}\text{Segment a}

Output:

enter image description here

EDIT: I see, in your case, you will want to use bigdelim package, for example:

\documentclass{article}
\usepackage{multirow,bigdelim}

\begin{document}

\[
\begin{array}{cc}
a&\rdelim\}{5}{1em}[Segment a]\\
a\\
a\\
a\\
a\\
b&\rdelim\}{5}{1em}[Segment b]\\
b\\
b\\
b\\
b\\
\end{array}
\]

\end{document}

will give you:

enter image description here

Related Question