0

enter image description here

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

\begin{document}

[

\implies \mathbf{B}^c= \begin{bmatrix}

\begin{array}{@{}ccc|ccc|c@{}}

\mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0} & \mathbf{0} \ \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0}\ \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0}\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I}\ \end{array} \end{bmatrix}

]

\end{document}

Mensch
  • 65,388

2 Answers2

2

With {pNiceArray} of nicematrix:

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

\begin{document}

[ \mathbf{B}^c= \begin{bNiceArray}{ccc|ccc|c}[first-row] \mathbf{u}_c^{\mathbf{N}} & \mathbf{u}_e^{\mathbf{N}} & \mathbf{u}_o^{\mathbf{N}} & \mathbf{u}_c^{\mathbf{R}}&\mathbf{u}_e^{\mathbf{R}} & \mathbf{u}_o^{\mathbf{R}} & \mathbf{u}_c^{\mathbf{OV}} \ \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0} & \mathbf{0} \ \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0}\ \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0}\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I}\ \end{bNiceArray} ]

\end{document}

Output of the above code

F. Pantigny
  • 40,250
1

Package blkarray can be your friend. An anexmple of it use (stolen from blkarray):

\documentclass{article}
\usepackage{blkarray}
\begin{document}
\[
\begin{blockarray}{ccccc}
      & A & B & C & D\\
    \begin{block}{c[cccc]}
    A & 1 & 1 & 1 & 1\\ 
    B & 1 & 0 & 0 & 1\\
    C & 1 & 0 & 1 & 1\\
    D & 1 & 1 & 1 & 0\\
    \end{block}
  \end{blockarray}
\]
\end{document} 

enter image description here

You only need to replace cells' contents with your data and add missed columns in matrix.

Zarko
  • 296,517