# Typing block matrices with zero blocks and separators

Is there a way to type something like (sorry for the strange picture)

using pmatrix or another method as simple as that? Thanks in advance.

p.s.

I'm able to create

using

\newcommand\bigzero{\makebox(0,0){\text{\huge0}}}
$$\begin{pmatrix} \begin{matrix} a & b \\ c & d \end{matrix} & \bigzero \\ \bigzero & \begin{matrix} a & b \\ c & d \end{matrix} \end{pmatrix}$$


but I can't type the separators. I know it (and much more complex forms) can be typed using array command, but I want to use the simple matrix commands if possible.

• Welcome to TeX.SE. Here, on TeX.Se I saw many similar question. Try to search site in find their solutions. Otherwise, please show, what you try so far and where you stuck. Help us to help you! Commented Aug 4, 2016 at 7:02

### Update (2023)

With nicematrix it's really easy.

\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}

\begin{document}

$\begin{pNiceArray}{cc|cc} a & b & \Block{2-2}<\Large>{\mathbf{0}} \\ c & d \\ \hline \Block{2-2}<\Large>{\mathbf{0}} && a & b \\ && c & d \end{pNiceArray}$

\end{document}


Not many possibilities without explicitly using array, I'm afraid:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\bigzero}{\mbox{\normalfont\Large\bfseries 0}}
\newcommand{\rvline}{\hspace*{-\arraycolsep}\vline\hspace*{-\arraycolsep}}

\begin{document}

$\begin{pmatrix} \begin{matrix} a & b \\ c & d \end{matrix} & \rvline & \bigzero \\ \hline \bigzero & \rvline & \begin{matrix} a & b \\ c & d \end{matrix} \end{pmatrix}$

\end{document}


With array:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\bigzero}{\mbox{\normalfont\Large\bfseries 0}}

\begin{document}

$\left(\begin{array}{@{}c|c@{}} \begin{matrix} a & b \\ c & d \end{matrix} & \bigzero \\ \hline \bigzero & \begin{matrix} a & b \\ c & d \end{matrix} \end{array}\right)$

\end{document}


• Thank you very much for this extensive solution. The first expression is good enough for me as I can use the new command rvline in all my documents just as easy.
– lang
Commented Aug 17, 2016 at 15:12
• Nowadays nicematrix would be the choice Commented Oct 14, 2023 at 11:28