Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

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:

enter image description here

\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
      \add[-3]{0}{1}
    \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
      \add[-2]{1}{0}
    \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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.