Solving the following system of equations: $2a-3b+5c+d =-41$, $7a+2b-c=-28$, $-a+2b-7c-2d=46$, $3a+7b-6c+d=31$

246 Views Asked by At

I have the following system of equations that I want to solve.

$R_1$ $2a-3b+5c+d =-41$,

$R_2$ $7a+2b-c=-28$,

$R_3$ $-a+2b-7c-2d=46$,

$R_4$ $3a+7b-6c+d=31$,

Now i can clearly see that I can reduce the system to three equations by eliminating $d$ variable.

$R'_3 = R_3 + 2R_1$

$(-a+2b-7c-2d=46) + (4a-6b+10c+2d =-82) = 3a-4b+3c=-36$

$R'_4 = R_4-R_1$

$(3a+7b-6c+d=31) - (2a-3b+5c+d =-41) = a + 10b-11c=72$

Now I have the following system of equations.

$R1$ $7a+2b-c=-28$

$R2$ $3a-4b+3c-36$

$R3$ $a+10b-11c=72$

Looking at this system of equations I can see that the easy variables to isolate are $c$ and $a$, but in the context of these equations, they will lead to fairly large numbers due to coefficients and I'd like to avoid that.

So I've decided to put this in Augmented Matrix and go from there.

\begin{bmatrix} 7 & 2 & -1 & -28 \\ 3 & -4 & 3 & -36 \\ 1 & 10 & -11 & 72 \end{bmatrix}

So based on what I understand the Gauss-Jordan Elimination requires me to manipulate the rows such that I get an identity matrix, which makes sense because I want to find the value of each variable.

$R'_2 = R_2 - 3R_3$

\begin{bmatrix} 7 & 2 & -1 & -28 \\ 0 & -34 & -30 & -252 \\ 1 & 10 & -11 & 72 \end{bmatrix}

$R'_3 = 7R_3-R_1$

\begin{bmatrix} 7 & 2 & -1 & -28 \\ 0 & -34 & -30 & -252 \\ 0 & 68 & -76 & 532 \end{bmatrix}

At this point it looks like A mess but I keep going.

$R'_3 = R_3+2R_2$

\begin{bmatrix} 7 & 2 & -1 & -28 \\ 0 & -34 & -30 & -252 \\ 0 & 0 & -106 & 28 \end{bmatrix}

Now at this point I need to do $-106c = 28 \therefore c = \frac{28}{-106}$ which gives a nonsensical number. I attempted to solve this problem via normal elimination, elimination and substitution. But I always arrive at nonsensical answers.

1

There are 1 best solutions below

0
On BEST ANSWER

I changed the order of the rows, does not matter, and puts off the fractions until later

parisize = 4000000, primelimit = 500000
? m = [ -1,2,-7,-2,46; 2,-3,5,1,-41; 3,7,-6,1,31; 7,2,-1,0,-28]
%1 = 
[-1  2 -7 -2  46]

[ 2 -3  5  1 -41]

[ 3  7 -6  1  31]

[ 7  2 -1  0 -28]

? l1 = [ 1,0,0,0; 2,1,0,0; 3,0,1,0; 7,0,0,1]
%2 = 
[1 0 0 0]

[2 1 0 0]

[3 0 1 0]

[7 0 0 1]

? l1 * m
%3 = 
[-1  2  -7  -2  46]

[ 0  1  -9  -3  51]

[ 0 13 -27  -5 169]

[ 0 16 -50 -14 294]

? l2 = [ 1, -2,0,0; 0,1,0,0; 0,-13,1,0; 0, -16,0,1]
%4 = 
[1  -2 0 0]

[0   1 0 0]

[0 -13 1 0]

[0 -16 0 1]

? l2 * l1 * m
%5 = 
[-1 0 11  4  -56]

[ 0 1 -9 -3   51]

[ 0 0 90 34 -494]

[ 0 0 94 34 -522]

? l3 = [ 1,0,0,0; 0,1,0,0; 0,0,1/2,0; 0,0,0,1/2]
%6 = 
[1 0   0   0]

[0 1   0   0]

[0 0 1/2   0]

[0 0   0 1/2]

? l3 * l2 * l1 * m
%7 = 
[-1 0 11  4  -56]

[ 0 1 -9 -3   51]

[ 0 0 45 17 -247]

[ 0 0 47 17 -261]

? l4 = [ 1,0,0,0; 0,1,0,0; 0,0,1,-1; 0,0,0,1]
%8 = 
[1 0 0  0]

[0 1 0  0]

[0 0 1 -1]

[0 0 0  1]

? l4 * l3 * l2 * l1 * m
%9 = 
[-1 0 11  4  -56]

[ 0 1 -9 -3   51]

[ 0 0 -2  0   14]

[ 0 0 47 17 -261]

? l5 = [ 1,0,0,0; 0,1,0,0; 0,0,1/2,0; 0,0,0,1]
%10 = 
[1 0   0 0]

[0 1   0 0]

[0 0 1/2 0]

[0 0   0 1]

? l5 *l4 * l3 * l2 * l1 * m
%11 = 
[-1 0 11  4  -56]

[ 0 1 -9 -3   51]

[ 0 0 -1  0    7]

[ 0 0 47 17 -261]

? l6 = [ 1,0,0,0; 0,1,0,0; 0,0,1,0; 0,0,47,1]
%12 = 
[1 0  0 0]

[0 1  0 0]

[0 0  1 0]

[0 0 47 1]

? l6 * l5 *l4 * l3 * l2 * l1 * m
%13 = 
[-1 0 11  4 -56]

[ 0 1 -9 -3  51]

[ 0 0 -1  0   7]

[ 0 0  0 17  68]

? l7 = [ 1,0,0,0; 0,1,0,0; 0,0,1,0; 0,0,0,1/17]
%14 = 
[1 0 0    0]

[0 1 0    0]

[0 0 1    0]

[0 0 0 1/17]

? l7 * l6 * l5 *l4 * l3 * l2 * l1 * m
%15 = 
[-1 0 11  4 -56]

[ 0 1 -9 -3  51]

[ 0 0 -1  0   7]

[ 0 0  0  1   4]

? 
? 
? l8 = [ 1,0,11,0; 0,1,-9,0; 0,0,1,0; 0,0,0,1]
%16 = 
[1 0 11 0]

[0 1 -9 0]

[0 0  1 0]

[0 0  0 1]

? l8 * l7 * l6 * l5 *l4 * l3 * l2 * l1 * m
%17 = 
[-1 0  0  4  21]

[ 0 1  0 -3 -12]

[ 0 0 -1  0   7]

[ 0 0  0  1   4]

? l9 = [ 1,0,0,-4; 0,1,0,3; 0,0,1,0; 0,0,0,1]
%18 = 
[1 0 0 -4]

[0 1 0  3]

[0 0 1  0]

[0 0 0  1]

? l9 * l8 * l7 * l6 * l5 *l4 * l3 * l2 * l1 * m
%19 = 
[-1 0  0 0 5]

[ 0 1  0 0 0]

[ 0 0 -1 0 7]

[ 0 0  0 1 4]

? 
? 

All in all, we multiplied on the left by a nonsingular rational matrix,

? 
? L = l9 * l8 * l7 * l6 * l5 *l4 * l3 * l2 * l1 
%20 = 
[ -3/34 -11/68 -1/68  -7/68]

[-19/34 -16/17 -3/17   9/34]

[   1/2    3/4   1/4   -1/4]

[ 11/17 109/68 47/68 -45/68]

? matdet(L)
%21 = 1/136
? 
?