マトリックス内のマトリックス

マトリックス内のマトリックス

私は次のようなものを作りたいと思っています:ここに画像の説明を入力してください

今のところ、1 つのエントリに対してのみマトリックスを作成できます。どうすればよいでしょうか?

本当にありがとう!

答え1

のと。{pNiceMatrix}nicematrix

\documentclass[12pt]{article}
\usepackage{nicematrix}

\begin{document}

\[\begin{pNiceMatrix}
X_{11} & X_{12} & \Cdots &  X_{1n} \\
X_{21} & \Block{3-3}<\Large>{B} \\
\Vdots \\
X_{1n} \\
\CodeAfter
  \SubMatrix[{2-2}{4-4}][xshift=-1ex,extra-height=-1ex]
\end{pNiceMatrix}\]

\end{document}

複数のコンパイルが必要です (nicematrix内部で PGF/Tikz ノードが使用されるため)。

上記コードの出力

答え2

のみamsmath

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{bmatrix}
  x_{11} & \begin{matrix} x_{12} & \dots & x_{1n} \end{matrix} \\
  \begin{matrix} x_{21} \\ \vdots \\ x_{n1} \end{matrix}  &
  \begin{bmatrix}
  \hspace*{-\arraycolsep}
  \phantom{x_{11}} & \phantom{x_{11}} & \phantom{x_{11}}
  \hspace*{-\arraycolsep}
  \\
  & \raisebox{-0.2\height}[0pt][0pt]{\LARGE$B$} & \\
  & &
  \end{bmatrix}
\end{bmatrix}
\]

\end{document}

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

関連情報