2

I would like to have a matrix with round brackets, a descriptive row which is not included in the surrounding brackets and overbraces and underbraces as can be seen in this picture:

desired matrix

I've tried to adapt this \bordermatrix code but did not come far:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\[
\phantom{(17') \rightarrow\hspace{\arraycolsep}}
\underbrace{
  \bordermatrix{
    \hspace{-\arraycolsep} & 
    \overbrace{}^{label2}  &
                           & 
    \overbrace{}^{label3} \cr
     & 1 & 1 & 1 \cr
     & 1 & 1 & 1
    }
  }_{\text{label1}}
\]

\end{document}

enter image description here

2
  • this might be helpful for the braces: tex.stackexchange.com/a/15336/579 Jul 24, 2017 at 21:10
  • @barbarabeeton thanks, this looks interesting, but I don't know how to add the descriptive row. also, having a brace over only one column does not seem to work well
    – efie
    Jul 24, 2017 at 21:32

1 Answer 1

2

enter image description here

Well, I draw this matrix as tikzpicture:

Edit: slightly improved code and matrix looks:

\documentclass[tikz,
               border=3mm,
               ]{standalone}
\usetikzlibrary{decorations.pathreplacing,
                matrix,
                positioning,
                }

\begin{document}
\begin{tikzpicture}[auto,
               node distance = 0mm,
         every matrix/.style = {matrix of math nodes,
                                nodes={minimum width=2em},
                                left  delimiter={(},
                                right delimiter={)},
                                },
                    B/.style = {decorate,
            decoration={brace, amplitude=2pt,
            pre=moveto,pre length=1pt,post=moveto,post length=1pt,
            raise=1mm,
                        },
            },  
                    ]
\matrix (m)
{
1   &   1   &   1   \\
1   &   1   &   1   \\
};
\foreach \i in {1,2,3}
    \node (a\i) [above=of m-1-\i] {$d_{\i}$};
\draw[B]    (a1.north west) -- node[above=2mm] {label1} (a2.north east);
\draw[B]    (a3.north west) -- node[above=2mm] {label2} (a3.north east);
\draw[B] (m-2-1.south east) -- node[below=2mm] {label3} (m-2-1.south west);
\end{tikzpicture}
\end{document}
2
  • This looks great! Is the same also possible with round brackets?
    – efie
    Jul 24, 2017 at 21:43
  • 1
    @efie, yes, it is possible. sorry, I overlook this, now corrected in answer
    – Zarko
    Jul 24, 2017 at 21:47

You must log in to answer this question.

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