How to create two matrix one on top of the other in a similar way done here?
The problem of the proposed solution is that only one column matrix are allowed.
Here my code:
\begin{equation}
\Gamma =
\begin{matrix}
{ } \\
AB \\
AC \\
CC \\
BD \\
CD
\end{matrix}
\begin{matrix}
A & B & C & D \\
\begin{bmatrix}
3 & -1 & 0 & 0 \\
1 & 0 & -1 & 0 \\
0 & 0 & 0 & 0 \\
0 & 2 & 0 & -3 \\
0 & 0 & 4 & -2
\end{bmatrix}
\end{matrix}
\label{eq:networkMatrix}
\end{equation}
Which gives me this result:
I would like to have A, B, C, and D aligned with the column. Any suggestion? Please note that I would like to continue to use equation so align is not allowed within it. Also, the use of nicematrix is not possible. Following the problem in details:
When using nicematrix the error prompt is:
Environment bNiceArray undefined. \begin{bNiceArray}
[...]
Misplaced alignment tab character &. &
[...]
Looking here and here, it seems that the problem can be the version of Latex I am using. So:
$ sudo apt-get install texstudio
...
texstudio is already the newest version (2.12.6+debian-2).
...
and
$ sudo apt-get install texlive-full
...
texlive-full is already the newest version (2017.20180305-1).
...
And, if I try to manually install the program from the official website here, this is the result: Unable to install TexStudio and No software repo included.
The reason for this is here explained.
The conclusion is that I cannot use nicematrix on this workstation until I do not change OS.
@F.Pantigny, does this information match with yours? Do I need the newst TeXstudio version to use nicematrix? I think I will move this question to a new one.




\bordermatrixwith brackets[ ]instead of parentheses – barbara beeton Apr 30 '20 at 16:44nicematrix. You should try to uninstall TeXLive 2017 and, then, install TeXLive 2020. Then, try to install TeXStudio. You may also ask your question onAskUbuntu. – F. Pantigny May 01 '20 at 14:19