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?


2 Answers 2


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




  & \begin{gmatrix}[p]
      1 & 2 \\
      3 & 4
    \end{gmatrix} \\
  \Rightarrow & \begin{gmatrix}[p]
      1 & 2 \\
      0 & -2
    \end{gmatrix} \\
  \Rightarrow & \begin{gmatrix}[p]
      1 & 2 \\
      0 & 1
    \end{gmatrix} \\
  \Rightarrow & \begin{gmatrix}[p]
      1 & 0 \\
      0 & 1


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.

  • I think there is a calculation mistake! Shouldn't the (2, 2) element in the second matrix be -2? Accordingly, the subsequent calculations will change.
    – Ashirwad
    Sep 23, 2019 at 6:26
  • 1
    @Ashirwad: Thanks, fixed!
    – Werner
    Nov 14, 2019 at 7:47

read https://archiv.dante.de/DTK/PDF/komoedie_2002_3.pdf, pages 34--40 for an introduction into the package gauss. The examples should be self explanatory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .