How to put more than one side braces for a vector

There may be easier ways, but here it is with stacks.

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\stackMath
\begin{document}
\[
{\bf x} = \left( 
                                  \begin{array}{c}
                                         x_1\\
                                         \vdots\\
                                         x_{n_1}\\
                                         x_{n_1+1}\\
                                         \vdots\\
                                         x_n
                                  \end{array}
                            \right)
\setstackgap{L}{1.2\normalbaselineskip}
\vcenter{\hbox{\stackunder[1pt]{%
  \left.{\Centerstack{\\ \\}}\right\}n_1%
}{
  \left.{\Centerstack{\\ \\}}\right\}n_2%
}}}
\]
\end{document}

enter image description here

If the braces need to be asymmetric:

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\stackMath
\begin{document}
\[
{\bf x} = \left( 
                                  \begin{array}{c}
                                         x_1\\[-6pt]
                                         \vdots\\[-6pt]
                                         x_{n_1}\\
                                         x_{n_1+1}\\[6pt]
                                         \vdots\\[6pt]
                                         x_n
                                  \end{array}
                            \right)
\setstackgap{L}{1.2\normalbaselineskip}
\vcenter{\hbox{\stackunder[2pt]{%
  \left.{\Centerstack{\\}}\right\}n_1%
}{
  \left.{\Centerstack{\\ \\ \\}}\right\}n_2%
}}}
\]
\end{document}

enter image description here


You can create this using a number of well-placed arrays and some \vphantoms:

enter image description here

\documentclass{article}

\newcommand{\noleftdelimiter}{\left.\kern-\nulldelimiterspace}

\begin{document}

\[
  \setlength{\arraycolsep}{0pt}
  \mathbf{x} = \noleftdelimiter
    \left( 
      \begin{array}{c}
        \begin{array}{c}
          x_1 \\ \vdots \\ x_{n_1}
        \end{array} \\
        \begin{array}{c}
          x_{n_1+1} \\ \vdots \\ x_n
        \end{array}
      \end{array}
    \right)
  \right\}
  n
  ~ % Some space
  \begin{array}{c}
    \noleftdelimiter
    \vphantom{\begin{array}{c}
      x_1 \\ \vdots \\ x_{n_1}
    \end{array}}
    \right\} n_1 \\
    \noleftdelimiter
    \vphantom{\begin{array}{c}
      x_{n_1+1} \\ \vdots \\ x_n
    \end{array}}
    \right\} n_2
  \end{array}
\]

\end{document}

Tags:

Vector

Braces