How to write the block matrix in LaTex?

Perhaps

$\left(\begin{array}{cccccc}
\left[\begin{array}{cc}
0 & 1\\
-1 & 0
\end{array}\right] &  &  &  &  & 0\\
 & \ddots\\
 &  & \left[\begin{array}{cc}
0 & 1\\
-1 & 0
\end{array}\right]\\
 &  &  & 0\\
 &  &  &  & \ddots\\
0 &  &  &  &  & 0
\end{array}\right)$  

enter image description here


Just for the fun of it! :-)

\documentclass{article}
\usepackage{amsmath,array}

\begin{document}

\[
\begin{pmatrix}
\newcommand{\lr}[1]{\multicolumn{1}{|c}{#1}}
\newcommand{\rr}[1]{\multicolumn{1}{c|}{#1}}
\;
\begin{array}{@{}*{10}{c}@{}}
\cline{1-2}
\lr{0} & \rr{1} &&&&&&&& \raisebox{-1em}[0pt][0pt]{$0$}\\
\lr{-1} & \rr{0} \\
\cline{1-2}
&& \ddots \\
\cline{4-5}
&&& \lr{0} & \rr{1} \\
&&& \lr{-1} & \rr{0} \\
\cline{4-5}
&&&&& 0 \\[-1ex]
&&&&&& \ddots \\
&&&&&&& 0 \\[-1ex]
&&&&&&&& \ddots \\
\multicolumn{2}{c}{0} &&&&&&&& 0
\end{array}
\;\;
\end{pmatrix}
\]

\end{document}

enter image description here


Here there is my proposal as the original picture using \bmatx command that replace a boxed matrix.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\newcommand{\bmatx}{\boxed{\begin{matrix} 0&  1  \\ -1&  0\end{matrix}}}

\begin{document}
\[
\begin{pmatrix}
\, \bmatx&  &  &  &  & & & 0 \\ 
 &  \ddots&  &  &  & \\ 
 &  &  \bmatx &  &  & & \\ 
 &  &  &  \ddots&  & &\\ 
 &  &  &  & 0 & &\\ 
 &  &  &  &  &  & \ddots\\ 
0 &  &  &  &  &  & & 0 
\end{pmatrix}
\]

\end{document}

The best code is provided thanks to the precious comment of @Bernard.

Tags:

Amsmath