矩陣中的矩陣

矩陣中的矩陣

我想做這樣的事情:在此輸入影像描述

到目前為止,我只能在一個條目上建立一個矩陣。一個人會怎麼做呢?

非常感謝!

答案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}

在此輸入影像描述

相關內容