1

How to encircle the second row in this step of Laplace expansion or to illustrate that point in a different way?

\begin{align*}
    \left| \begin{pmatrix}{1 & 4 & -2 & 7 & 1 \\ 0 & 3 & 0 & 0 & 0 \\ 2 & -3 & 0 & 8 & 0 \\ -7 & 3 & -1 & 3 & -2 \\ 0 & 2 & 0 & -4 & 0} \end{pmatrix}  \right| = +3 \cdot \left| \begin{pmatrix}{1 & -2 & 7 & 1 \\ 2 & 0 & 8 & 0 \\ -7 & -1 & 3 & -2 \\ 0 & 0 & -4 & 0} \end{pmatrix} \right|
\end{align*}

enter image description here

There are certainly different ways to underline the steps of the Laplace expansion, but I did not found them yet. Additionally it would be great to incorporate the 'chessboard pattern' and so on.

Thanks

Mac
  • 1,611
  • 3
  • 17
  • 42

2 Answers2

2

This is rather simple to do with pstricks: nodes at the beginning and end of the row or column, then a box-type node connection:

\documentclass[x11names]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,array}
\usepackage{pst-node}
\usepackage{auto-pst-pdf}

\begin{document}
\begin{pspicture}
\begin{align*}
    \left| \begin{pmatrix}1 & 4 & -2 & 7 & 1 \\ \Rnode{B}{0} & \color{OrangeRed1}3 & 0 & 0 & \Rnode{E}{0}\\ 2 & -3 & 0 & 8 & 0 \\ -7 & 3 & -1 & 3 & -2 \\ 0 & 2 & 0 & -4 & 0 \end{pmatrix} \right| = {\color{OrangeRed1}{+3}} \cdot \left| \begin{pmatrix}1 & -2 & 7 & 1 \\ 2 & 0 & 8 & 0 \\ -7 & -1 & 3 & -2 \\ 0 & 0 & -4 & 0 \end{pmatrix} \right|
\end{align*}
\ncbox[boxsize=1.33ex, nodesep=0.9ex, linecolor=LightSteelBlue2, linewidth=0.6pt, linearc=0.05]{B}{E}
\end{pspicture}
\end{document} 

enter image description here

Bernard
  • 271,350
  • This somehow does not work for me, maybe it's in conflict with some of my tikz packages? Or my scrartcl-class? – Mac Oct 21 '15 at 10:33
  • Normally it shouldn't. However, don't forget, in order to make pdflatex work with pstricks, you must compile with the --write18 switch (MiKTeX) or -shell-escape (TeX Live, MacTeX). – Bernard Oct 21 '15 at 13:26
1

You can try with addpath command from easybmat

\documentclass{article}
\usepackage{lmodern}
\usepackage{amsmath,array}
\usepackage{easybmat}

\begin{document}
\[
\begin{vmatrix}
\begin{pmatrix}
\begin{BMAT}(b){rrrrr}{ccccc}
1 & 4 & -2 & 7 & 1 \\ 
0 & 3 & 0 & 0 & 0 \\ 
2 & -3 & 0 & 8 & 0 \\ 
-7 & 3 & -1 & 3 & -2 \\ 
0 & 2 & 0 & -4 & 0 
\addpath{(0,1,0)rrrrrullllld}
\end{BMAT}  
\end{pmatrix}
\end{vmatrix}
\]
\end{document}

enter image description here

Ignasi
  • 136,588