如图,

代码如下,
\documentclass{article}
\usepackage{amsmath, tikz, nicematrix, arydshln}
\usetikzlibrary{tikzmark}
\tikzset{> = latex}
\begin{document}
\[
\renewcommand{\arraystretch}{1.5}
\begin{pNiceArray}{ccc|[tikz = dashed]ccc}
1 & 2 & 3 & 1 & 0 & 0\\
\tikzmarknode{row2}{2} & 1 & 2 & 0 & 1 & 0\\
\tikzmarknode{row3}{2} & 3 & 4 & 0 & 0 & 1
\CodeAfter
\tikz{%
\draw [<-] ([xshift = -1em]row2.west) --++ (-.5,0) --++ (0,.5)
coordinate (row2destination)
node [above] {$(-2)$};
\draw [<-] ([xshift = -1em]row3.west) --++ (-1.5,0) -|
([xshift = -1cm]row2destination)
node [above] {$(-1)$};
}
\end{pNiceArray}
\to
\]
\end{document}









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