Just refer the manual in texdoc nicematrix and a little bit in texdoc tikz:
\documentclass{article}
\usepackage{fourier}
\usepackage{nicematrix,tikz}
\usepackage{lipsum}
\usetikzlibrary{arrows.meta}
\begin{document}
\lipsum[2][1-3]
\[
\renewcommand{\arraystretch}{1.5}%
\begin{pNiceArray}{ccc;ccc}[margin] % new feature `;' in nicematrix v7.7
\CodeBefore%
\tikz{%
\draw[-Stealth] ([xshift=-1cm,yshift=.05cm]1.5|-2) node[above] {$(-2)$} |- ([xshift=-.5cm]1.5|-2.5);
\draw[-Stealth] ([xshift=-1.75cm,yshift=.05cm]1.5|-2) node[above] {$(-1)$} |- ([xshift=-.5cm]1.5|-3.5);
}
\Body
1 & 2 & 3 & 1 & 0 & 0 \\
2 & 1 & 2 & 0 & 1 & 0 \\
3 & 2 & 1 & 0 & 0 & 1 \\
\end{pNiceArray}
\]
\lipsum[2][1-3]
\end{document}




















问 如何用nicematrix里用tikz打出如下公式