Why does the augmented matrix method for finding an inverse give different results for different orders of elementary row operations?

Why does the augmented matrix method for finding an inverse give different results for different orders of elementary row operations?

Consider the example of elements from the Heisenberg group: $\begin{bmatrix}1 & a & b\\ 0 & 1 & c\\ 0 & 0 &1 \end{bmatrix}$.

Now, after augmenting this matrix,

$\left[\begin{array}{rrr|rrr} 1 & a & b & 1 & 0 & 0\\ 0 & 1 & c & 0 & 1 & 0\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right]$

if you subtract c times the third row from the second,

$\left[\begin{array}{rrr|rrr} 1 & a & b & 1 & 0 & 0\\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right]$

then b times the third row from the first,

$\left[\begin{array}{rrr|rrr} 1 & a & 0 & 1 & 0 & -b\\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right]$

and then a times the new second row from the first,

$\left[\begin{array}{rrr|rrr} 1 & 0 & 0 & 1 & -a & -b\\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right]$

you then get the following matrix for the inverse:

$$\begin{bmatrix}1 & -a & -b\\ 0 & 1 & -c\\ 0 & 0 &1 \end{bmatrix}.$$

But, this is not the inverse.

I thought order of elementary row operations doesn't matter.

• Did you mean "a times the new second row from the first"? If not, then you have not eliminated the $a$ in the original matrix, so you're not done. – Ian Sep 24 '17 at 2:13
• @Ian Yes, I did mean first. I'm correcting it now. Thanks! – user3146 Sep 24 '17 at 2:43
• Once you do that and also use the new second row, the problem goes away entirely. – Ian Sep 24 '17 at 2:46
• I'm not sure what you mean. Are you saying that the resulting matrix that I listed is the inverse of the former? – user3146 Sep 24 '17 at 2:55
• No, I'm saying that your third row operation was performed incorrectly. The third row operation should have changed the (1,3) entry again. – Ian Sep 24 '17 at 3:21

$$\left[ \begin{array}{ccc|ccc} 1 & a & b & 1 & 0 & 0 \\ 0 & 1 & c & 0 & 1 & 0\\ 0 & 0 & 1 & 0 & 0 & 1\end{array} \right]$$

I believe there is a typo in your working, I believe you mean subtract $c$ times the third row and add it to the second row

$$\left[ \begin{array}{ccc|ccc} 1 & a & b & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1\end{array} \right]$$

After which,

$$\left[ \begin{array}{ccc|ccc} 1 & a & 0 & 1 & 0 & -b \\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1\end{array} \right]$$

and for the last step:

$$\left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & -a & ac-b \\ 0 & 1 & 0 & 0 & 1 & -c\\ 0 & 0 & 1 & 0 & 0 & 1\end{array} \right]$$

Edit:

Your mistake is at the last step

subtract $a$ times the new second row from the first,

It should involve $(-a)(-c)+(-b)$

• The typo I made was the one Ian suggested. I corrected it. The order of your elementary row operations gives the inverse. I was already aware of this order. This doesn't address my issue. (I suppose it does help to elaborate it though.) Can you please tell me why the 2 different orders (yours and mine) of elementary row operations gives different results for the inverse? – user3146 Sep 24 '17 at 2:52
• They don't, unless it's because of an error. – G Tony Jacobs Sep 24 '17 at 3:07
• @GTonyJacobs Can you please tell me what error I made? – user3146 Sep 24 '17 at 3:12
• When you subtract $a$ times the new second row from the first, you missed that there's a $-c$ in that second row. That should add an $ac$ term to your upper-right entry. – G Tony Jacobs Sep 24 '17 at 3:15
• Also, these aren't two different orders of elementary row operations. You both did the same operations, in the same order. – G Tony Jacobs Sep 24 '17 at 3:18