# Gaussian elimination in matrix, how to proceed?

Here it's the matrix I need to reduce (I report my attempt)

$$\left(\begin{array}{ccc|c} 6 & (3+2h) & (5-2h) & -2k - 2 \\ -3 & (h-4) & (2-h) & 7 - k \\ 6 & 2h & (5-3h) & (-3k-8) \end{array}\right)$$

Firstly I exchange the first row with the second:

$$\left(\begin{array}{ccc|c} -3 & (h-4) & (2-h) & 7 - k\\ 6 & (3+2h) & (5-2h) & -2k - 2 \\ 6 & 2h & (5-3h) & (-3k-8) \end{array}\right)$$

Now I subtract to the second and third row, 2 times the first row

$$\left(\begin{array}{ccc|c} -3 & (h-4) & (2-h) & 7 - k\\ 0 & (4h-5) & (9-4h) & 12-4k \\ 0 & (4h-8) & (9-5h) & (6-5k) \end{array}\right)$$

Last step I try is $(4h-5)$Row3 $-(4h-8)$Row2 and I obtain this:

$$\left(\begin{array}{ccc|c} -3 & (h-4) & (2-h) & 7 - k \\ 0 & (4h-5) & (9-4h) & 12-4k \\ 0 & 0 & -(4h^2+7h-27) & -(4hk+24h+7k-66) \end{array}\right)$$

Which is not correct: in fact that's what my exercise reports as "solution":

$$\left(\begin{array}{ccc|c} 3 & h & 1 & 1 \\ 0 & (h-2) & 1 & 4 \\ 0 & 0 & (h-1) & (k+2) \end{array}\right)$$

What did I miss?

• Be careful when you sum the second row with 2 times the first Dec 13, 2017 at 9:27
• Are you positive that you typed everything correctly? Because the first and the last matrix that you wrote don't have same solutions. Dec 13, 2017 at 10:00
• @Ennar, When fixed I didn't do the work "with my hands" but I used WolframAlpha to fastly put the correct result, so it should be fine... Checked again and got the same result! Dec 13, 2017 at 10:24
• I meant literally the first and the last. The last as in "reported solution". Dec 13, 2017 at 10:30
• @Ennar: then probably who wrote the book has done some column exchange. Is it possible? Dec 13, 2017 at 12:25

Now as you subtract to the second and third row, $2$ times the first row:
The $(2,2)$-entry should be
$$4h-5$$