ブロック行列の括弧

ブロック行列の括弧

次元Sのブロック行列がある。(Lm+n)\times (L+n)m

マトリックス

しかし、読者にとって分かりやすく書かれていないと思います。何か提案はありますか?

これは私がこれまでに書いたコードです(tex.stackexchange で見つかったいくつかの回答に感謝します)。

\documentclass{article}
\usepackage{amsmath}
     \usepackage{xcolor}
     %%overbrace matrix
     \newcommand\overmat[2]{%
      \makebox[0pt][l]{$\smash{\color{white}\overbrace{\phantom{%
                \begin{matrix}#2\end{matrix}}}^{\text{\color{black}#1}}}$}#2}
        \newcommand\bovermat[2]{%
         \makebox[0pt][l]{$\smash{\overbrace{\phantom{%
                \begin{matrix}#2\end{matrix}}}^{\text{#1}}}$}#2}
          \newcommand\partialphantom{\vphantom{\frac{\partial e_{P,M}} 
          {\partial w_{1,1}}}}

\begin{document}

 \begin{equation}
  S=\left[\phantom{\begin{matrix}a_0\\ b_0\\ \ddots\\b_0 \end{matrix}}
\right.\hspace{-1.5em}
   \begin{matrix}
    \bovermat{$mn$}{M_n & ... & M_1 \ } & \bovermat{$Lm$}{0_{n\times m} & 
       ...& 0_{n\times m}}\\
        a_nI_m & ... & a_1I_m & a_0I_m & ... & 0\\
        \vdots & \ddots & & & \ddots & \vdots \\
        0 & & a_nI_m & ... & ... & a_0I_m
    \end{matrix}
       \hspace{-1.5em}
        \left.\phantom{\begin{matrix}a_0\\ a_0\\ \ddots\\b_0 
           \end{matrix}}\right]\hspace{-1em}
       \begin{tabular}{l}
       $\left.\lefteqn{\phantom{\begin{matrix} a_0 \end{matrix}}}\right\}n$\\
       $\left.\lefteqn{\phantom{\begin{matrix} b_0\\ \ddots\\ b_0\ 
        \end{matrix}}} \right\}Lm$
     \end{tabular}
     \end{equation}
  \end{document}

答え1

個人的には、これらの括弧は冗長な情報を含んでいるので追加しません。単一のブロックが固定次元を持っていることがわかっている場合、表記$0_{n\times m}$で示されるように、行列の次元を指定する以外に必要なのは、ブロックがいくつあるかだけです。これは、たとえばTiで行うことができます。Zは次のようになります。

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}

\begin{equation}
  S=\vcenter{\hbox{% really dotted from https://tex.stackexchange.com/a/52856/121799
  \begin{tikzpicture}[really dotted/.style={dash pattern=on 0.01pt off 4.5pt,
                                         line cap=round},inner xsep=0pt]
  \matrix[matrix of math nodes,left delimiter={[}
  ,right delimiter={]},column 2/.append style={column sep=3em},
  column 5/.append style={column sep=3em}] (mat)
   {
    M_n & & M_1 & 0_{n\times m} &        & 0_{n\times m}\\
        a_nI_m &  & a_1I_m & a_0I_m &  & 0\\
        ~ &  & & &  &  \\[1ex]
        0 & & a_nI_m & 0 &  & a_0I_m\\
    };
    \draw[really dotted,line width=1pt,shorten >=2pt] (mat-1-1) -- (mat-1-3)
    node[midway,above,font=\tiny]{$m$ times}
     (mat-1-4) -- (mat-1-6) node[midway,above,font=\tiny]{$m$ times}
     (mat-2-1) -- (mat-2-3) (mat-2-4) -- (mat-2-6)
     (mat-4-1) -- (mat-4-3) (mat-4-4) -- (mat-4-6);
    \draw[really dotted,line width=1pt,shorten >=2pt] 
    (mat-2-1) -- (mat-4-3) (mat-2-1) -- (mat-4-1)
    (mat-2-3) -- (mat-4-3) (mat-2-4) -- (mat-4-6) (mat-2-4) -- (mat-4-4)
    (mat-2-6) -- (mat-4-6);
    \end{tikzpicture}}}
     \end{equation}
\end{document}

ここに画像の説明を入力してください

答え2

もう一つの選択肢としては、nicematrixパッケージ。優れたユーザー @marmot と同じ画像が常に表示されますが、ここでは短いコードがあります。ドットはマトリックスの要素からわずかに離れています。2 つの画像を拡大すると、2 つの画像の違いがわかります。

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[S=\left[\begin{NiceArray}{CCCCCC}
M_n & \overset{\scriptstyle m \text{ times}}{\Cdots} & M_1&\!\!\!  0_{n\times m}&\overset{\scriptstyle m \text{ times}}{\Cdots} &0_{n\times m}\\
a_nI_m & \Cdots & a_1I_m&\!\!\!  a_0I_m&\Cdots &  0\\
\Vdots & \Ddots &  \Vdots &\!\!\!     \Vdots        &    \Ddots     & \Vdots\\
0 & \Cdots & a_nI_m        & 0&\Cdots &a_0I_m\\
\end{NiceArray}\right]
\]
\end{document}

答え3

@Sebastiano の回答 (+1) の補足として... のbNiceMatrix代わりに を使用してNiceArray$m$ times以下を追加しますtikzpicture:

\documentclass[margin=3mm, preview]{standalone}
\usepackage{nicematrix}
\usetikzlibrary{quotes} % for labels "m times"

\begin{document}
\[
S = \begin{bNiceMatrix}[columns-width=2em, name=m]
M_n     & \Cdots & M_1     & 0_{n\times m} & \Cdots & 0_{n\times m} \\
a_nI_m  & \Cdots & a_1I_m  & a_0I_m        & \Cdots & a_1I_m        \\
\Vdots  & \Ddots & \Vdots  & \Vdots        & \Ddots & \Vdots        \\
0       & \Cdots & a_nI_m  & 0             & \Cdots & a_0I_m        \\
\end{bNiceMatrix}
\]
\tikz[remember picture,overlay,font=\tiny]
\path   (m-1-1) to ["$m$ times"] (m-1-3)
        (m-1-4) to ["$m$ times"] (m-1-6);
\end{document}

ここに画像の説明を入力してください

注記: 最終結果を得るには上記をコンパイルする必要がありますムウェ少なくとも2回。

答え4

の最新バージョン (3.15、20/04/06) では、Zarko の回答の短縮版を出すことができます。実際、このバージョンでは、とnicematrixを使用して点線にラベルを付けることができます。^_

\documentclass[margin=3mm, preview]{standalone}
\usepackage{nicematrix}

\begin{document}
\[
S = \begin{bNiceMatrix}[columns-width=2em]
M_n     & \Cdots^{m \text{ times}} & M_1     & 0_{n\times m} & \Cdots^{m \text{ times}} & 0_{n\times m} \\
a_nI_m  & \Cdots & a_1I_m  & a_0I_m        & \Cdots & a_1I_m        \\
\Vdots  & \Ddots & \Vdots  & \Vdots        & \Ddots & \Vdots        \\
0       & \Cdots & a_nI_m  & 0             & \Cdots & a_0I_m        \\
\end{bNiceMatrix}
\]
\end{document}

上記コードの結果

関連情報