What did I do wrong with Gaussan Elimination for $\begin {cases} x + 5y + 11z = -5\\ 2x + 3y + 8z = 4\\ -x + 2y + 3z = -9 \end {cases}$?

1k Views Asked by At

Having problems with this one using Gaussian Elimination.

Find the solutions for the linear equation system:

$$\begin {cases} x + 5y + 11z = -5\\ 2x + 3y + 8z = 4\\ -x + 2y + 3z = -9 \end {cases}$$


$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 2 & 3 & 8 & 4\\ -1 & 2 & 3 & -9 \end{bmatrix}$$

$$2f_3+f_2$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 6 & 14 & -14\\ -1 & 2 & 3 & -9 \end{bmatrix}$$

$$f_1+f_3$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 6 & 14 & -14\\ 0 & 7 & 14 & -14 \end{bmatrix}$$

$$-f_2 + f_3$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 6 & 14 & -14\\ 0 & 1 & 0 & 0 \end{bmatrix}$$

$$f_2 \ f_3$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 1 & 0 & 0\\ 0 & 6 & 14 & -14 \end{bmatrix}$$

$$-6f_2+f_3$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 1 & 0 & 0\\ 0 & 0 & 14 & -14 \end{bmatrix}$$

$$\frac{1}{14}f_3$$

$$\begin{bmatrix} 1 & 5 & 11 & -5\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$

$$-5f_2 + f_1$$

$$\begin{bmatrix} 1 & 0 & 11 & -5\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$

$$-11f_3+f_1$$

$$\begin{bmatrix} 1 & 0 & 0 & 6\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$

$$6f_3+f_1$$

$$\begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{bmatrix}$$


So the solution would be $(0,0,-1)$... which is NOT right. Just looking at the first equation we'd have

$$0 + 5(0) + 11(-1) = -11 \neq -5$$

What did I do wrong? I've been checking my procedure over and over and can't find the problem.

2

There are 2 best solutions below

3
On BEST ANSWER

The very first rowop: 2*2+3=7, not six

0
On

One way to quickly find arithmetical errors in such row operations is to use modular arithmetic checks. For example, your first row operation is $\ r_2' \leftarrow r_2 + \color{#c00}2\, r_3,\, $ so $\ r_2'\equiv r_2\pmod{\color{#c00}2}.\,$ But this parity check fails since $\ r'_{2,2} = 6\,$ is even but $\,r_{2,2} = 3\,$ is odd. Hence the first row operation is in error at the second component. Such modular checks work very well in practice (just like casting nines (mod $9$) works well to check integer arithmetic).