[Tex/LaTex] Determinant of 3×3 matrix by cofactor expansion

matricestikz-matrix

please help me to create this in LaTeX:

enter image description here

Best Answer

A simple code with pstricks and mathtools:

\documentclass[svgnames]{article}
\usepackage{mathtools} 
\usepackage{pst-node, auto-pst-pdf}

\begin{document}

\begin{postscript}
\psset{{linecolor=DeepPink}, framesep=2pt, nodesepB=-8pt}
\[ \begin{bmatrix}
\mathclap{\circlenode[linestyle=dashed, dash=3.5pt 2.5pt]{A}{0}} & 2 & \rnode{C}{1} \\
3 & -1 & 2 \\
\rnode{B}{4} & 0 & 1 
\end{bmatrix} \]
\ncline{A}{B}
\ncline{A}{C}
\end{postscript}

\end{document} 

enter image description here

Ensure you have --enable-write18 in your LaTeX command/engine so that auto-pst-pdf works.

Related Question