[Tex/LaTex] How to visualize Matrix operations

arrowsmathjaxmatrices

I would like to visualize some matrix operations like that:

enter image description here

How can I do that (preferably something that also works for mathjax)?

Best Answer

Can't say about MathJax, but the gauss package does this.

enter image description here

\documentclass{article} 
\usepackage{gauss} 
\begin{document} 
\[
 \begin{gmatrix}[p]
 1 & 2 & 3 \\
 4 & 5 & 6 \\
 7 & 8 & 9
 \rowops
 \swap{0}{1}
 \mult{0}{\cdot 7}
 \add[5]{1}{2}
 \end{gmatrix}
\]
\end{document}
Related Question