Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm teaching myself how to solve systems of equations using matrices and row operations. I get the basic mechanics of it (legal operations, etc.), but it seems like it's kind-of a crapshoot deciding where to begin, and choosing the "wrong" operation to start with can lead to a really difficult problem.

My question is: Are there any rules of thumb for deciding which operations to begin with and how to proceed?

For instance, given the system:

2x - 9y - z = -23
 x + 9y - 5z= 2
3x + y + z = 24

What row operation would you begin with, and where would you go from there? I'm not asking you to do it for me, but for insight into your thought process regarding how to proceed.

share|cite|improve this question
up vote 1 down vote accepted

Try following these steps (practice a bunch of them and you start seeing approaches, but there are no hard and fast rules on what is optimal).

  • Swap R1 and R3
  • Subtract (1/3) R1 from R2
  • Multiply R2 by (3/2)
  • Multiply R3 by -1
  • Add (2/3) R1 to R3
  • Multiply R3 by 3
  • Swap R2 with R3
  • Subtract (13/29) R2 from R3
  • Multiply R3 by (-29/297)
  • Subtract 5*R3 from R2
  • Subtract R3 from R1
  • Subtract (1/29) R2 from R1
  • Divide R1 by 3
  • Divide R2 by 29

You will end up with:

$$ \left[\begin{array}{ccc|c} 1 & 0 & 0 & 5\\0 & 1 & 0 & 3\\0 & 0 & 1 & 6 \end{array}\right] $$

share|cite|improve this answer
Nice work/handy recipe to follow ;-) – amWhy May 16 '13 at 5:09

JavaMan is right that the algorithm works.

But if you're just looking for rules of thumb: the $-z$ and $+z$ in the first and third rows jump out at me -- adding one row to the other will create a zero. Ditto for $-9y$ and $+9y$. To leverage both of those, you need to add the first row to the second row, then to the third row. That should get you well on your way.

share|cite|improve this answer

There is an algorithm for this process called Gauss-Jordan elimination.

Applying Gauss-Jordan to the example given:

1) The first step is to get a leading one in the first row of your matrix. The easiest way to do this is to switch rows 1 and 2. This gives the matrix

$$ \left[\begin{array}{ccc|c} 1 & 9 & -5 & 2 \\ 2 & -9 & -1 & -23 \\ 3 & 1 & 1 & 24 \end{array}\right] $$

2) Next, since you have a leading 1 in the first row, add multiples of the first row to all other rows so that ll other entries in the first column are zero.

3) Then apply the same process on column 2. That is, get a leading one in the second row if possible...

share|cite|improve this answer
Yes, but my question concerns how to execute the algorithm, when the order of operations is not readily apparent by looking at the augmented matrix. – aqaeous May 16 '13 at 4:31
I'm not sure I understand what you mean. Gauss-Jordan gives you a method for reducing all augmented matrices regardless of how messy the matrix. In other words, if you always follow the steps of Gauss-Jordan, you will eventually arrive at a matrix which is in reduced row echelon form. – JavaMan May 16 '13 at 4:33

Your Answer


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.