# Gaussian reduction of matrices

I have to show a Gaussian reduction in an assignment, and I was wondering what the more space-efficient and neatest way of expressing this is. I thought about using \begin{smallmatrix} (it's only a 2x2 matrix) and arrays, but I'm wondering if perhaps there is a better way. Any suggestions?

-

The gauss package is specifically designed for this purpose and allows for typesetting even large matrices and the associated Gaussian elimination (or reduction).

Here is a fairly elementary example of Gaussian (or Gauss-Jordan) elimination on a 2x2 matrix:

\documentclass{article}
\usepackage{gauss}% http://ctan.org/pkg/gauss
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
& \begin{gmatrix}[p]
1 & 2 \\
3 & 4
\rowops
\end{gmatrix} \\
\Rightarrow & \begin{gmatrix}[p]
1 & 2 \\
0 & -6
\rowops
\mult{1}{\scriptstyle\cdot-\frac{1}{6}}
\end{gmatrix} \\
\Rightarrow & \begin{gmatrix}[p]
1 & 2 \\
0 & 1
\rowops
\end{gmatrix} \\
\Rightarrow & \begin{gmatrix}[p]
1 & 0 \\
0 & 1
\end{gmatrix}
\end{align*}
\end{document}


Matrices using the gauss package are typeset within a gmatrix environment (an optional parameter specifies the delimiters), while elementary row operations are specified using \mult, \add, or \swap. See the gauss documentation for more information and refinements.

amsmath provided the align* environment, although it was not necessary; a regular array would also have worked.

-
read http://www.dante.de/DTK/Ausgaben/komoedie20023.pdf, pages 34--40 for an introduction into the package gauss. The examples should be self explanatory.