[Tex/LaTex] Row reduction arrow to indicate row-switch

matrices

Is there a way to create the doublesided arrow that goes from row 2 to row 4 to indicate a rowswitch? Thank you.

\documentclass{report}
\usepackage{amsmath, amssymb, graphics, setspace}
\begin{document}
    \begin{equation}\notag
    \left[
        \begin{array}{cccc | c}
             1 & 1 & 1 & 2 & 0\\
             2 & 0 & -2 & 2 & 0\\
             2 & 1 & 0 & 3 & 0\\
            -1 & 2 & 5 & 1 & 0\\
        \end{array}
    \right]
        \begin{array}{cc}
              &\\
             from\ here &\\
              &\\
             to\ here &\\
        \end{array}
    \end{equation}
\end{document}

Edit: Thank you for all the great responses!
enter image description here

Best Answer

You can use the gauss package, with some fixes:

\documentclass{report}
\usepackage{amsmath, gauss}
\usepackage{etoolbox}

% see http://tex.stackexchange.com/a/146730/4427
\makeatletter
\patchcmd\g@matrix
 {\vbox\bgroup}
 {\vbox\bgroup\normalbaselines}% restore the standard baselineskip
 {}{}
\makeatother

\newcommand{\BAR}{%
  \hspace{-\arraycolsep}%
  \strut\vrule % the `\vrule` is as high and deep as a strut
  \hspace{-\arraycolsep}%
}


\begin{document}

\begin{equation*}
\begin{gmatrix}[b]
1  & 1 &  1 & 2 & \BAR & 0\\
2  & 0 & -2 & 2 & \BAR & 0\\
2  & 1 &  0 & 3 & \BAR & 0\\
-1 & 2 &  5 & 1 & \BAR & 0
\rowops
\swap{1}{3}% the count is from 0
\end{gmatrix}
\end{equation*}

\end{document}

Note that you should use equation* rather than equation with \notag.

enter image description here