8

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.

1
  • 3
    Use \left. .... \right\}. Note the use of dot after \left.
    – Sigur
    Jul 21, 2013 at 11:37

3 Answers 3

7

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

2
  • i knew that possibility, but it is not quite what I am looking for, because I need to have more than one Segment. Maybe I just don't quite get what you mean, but if I see this correctly this only works for one segment. If I put the second segment below the first one I can't use the usual vector brackets, or else each array will be in its own bracket
    – kyra
    Jul 21, 2013 at 11:52
  • @kyra: updated.
    – Francis
    Jul 21, 2013 at 12:12
6

Another way using the rcases environment from mathtools

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\noindent
$
    \begin{rcases}
        a\\a\\a\\a\\a
    \end{rcases}
    \text{Segment A}
$\\
$
    \begin{rcases}
        b\\b\\b\\b\\b
    \end{rcases}
    \text{Segment B}
$
\end{document}

enter image description here

6

Improving the @Francis's code, you can use two rows with two blocks.

\[
\begin{array}{r}
\left. \begin{array}{r}
a\\
a\\
a\\
a\\
a
\end{array}
\right\}\text{Segment a} \\
\left. \begin{array}{r}
b\\
b\\
b\\
b\\
b
\end{array}
\right\}\text{Segment b}
\end{array} 
\]

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .