# How to make matrix elements which spans multiple columns/rows?

I have a matrix which I would like to typeset. From the linked image, it can be seen that the bottom elements span 2 columns (and 2 rows but that's not as important), how do I typset it?

Right now I am trying this

\begin{gather}
\begin{bmatrix}
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1\\
A^{-1} C & & -A^{-1} B
\end{bmatrix}
\end{gather}


but it doesn't seem to work, as expected.

• Try the \Block command from nicematrix package. Nov 13 '20 at 21:45
• That did work, but I liked the solution posted by Héliton, as it doesn't include any additional library. Thanks for the insight either way! Nov 14 '20 at 10:37

Just use a \multicolumn.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
\begin{bmatrix}
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1\\
\multicolumn{2}{c}{A^{-1} C} & \multicolumn{2}{c}{-A^{-1} B}
\end{bmatrix}
\end{gather}
\end{document}