6

I want to create a block matrix of this form:

enter image description here

But Block A should be a diagonal matrix with 1 on the diagonal, the other blocks should be B, C and D like in the picture. But the size of each block should be equal.

1
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Feb 27, 2015 at 18:58

2 Answers 2

11

enter image description here

If you put A in a box you can use its size in the other three quadrants:

\documentclass{article}
\usepackage{amsmath}
\begin{document} 
\[
\sbox0{$\begin{matrix}1&2&3\\0&1&1\\0&0&1\end{matrix}$}
%
C=\left[
\begin{array}{c|c}
\usebox{0}&\makebox[\wd0]{\large $B$}\\
\hline
  \vphantom{\usebox{0}}\makebox[\wd0]{\large $C$}&\makebox[\wd0]{\large $D$}
\end{array}
\right]
\]
\end{document} 
0

Here is a solution with {bNiceArray} of nicematrix.

\documentclass{article}
\usepackage{nicematrix}

\begin{document}

$M = 
\begin{bNiceArray}{ccc|ccc}[margin,columns-width=auto]
  1 & 2 & 3 & \Block{3-3}<\Large>{B} & & \\
  0 & 1 & 1 \\
  0 & 0 & 1 \\
\hline
  \Block{3-3}<\Large>{C}
    &   &   & \Block{3-3}<\Large>{D} & & \\
\\
\\
\end{bNiceArray}$

\end{document}

Output of the above code

You must log in to answer this question.

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