描述行和上支撑、下支撑,跨越矩阵中的多列

描述行和上支撑、下支撑,跨越矩阵中的多列

我想要一个带有圆括号的矩阵,一个不包含在周围括号中的描述性行以及上括号和下括号,如下图所示:

期望矩阵

我尝试去适应 \bordermatrix代码但并没有走多远:

\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}

在此处输入图片描述

答案1

在此处输入图片描述

好吧,我把这个矩阵画如下tikzpicture

编辑: 稍微改进的代码和矩阵外观:

\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}

相关内容