Solve $4\times 3$ matrix with 4 unknowns

57 Views Asked by At

For an assignment I need to solve a $4\times 3$ matrix (?) with the Gaussian elimination method, as well as finding the coefficients-matrix (2. language) and the determinant of the matrix. I am having issues setting up the coefficients-matrix, is this correct? Or should I include the zeroes since there are missing values in each row? A = The coeff-matrix

$$x_1-0.25x_2-0.25x_3=50$$ $$-0.25x_1+x_2-0.25x_4=50$$ $$-0.25x_1+x_3-0.25x_4=25$$ $$-0.25x_2-0.25x_3+x_4=25$$

$$A= \begin{pmatrix} 1 & -0.25 & -0.25 \\ -0.25 & 1 & -0.25 \\ -0.25 & 1 & -0.25 \\ -0.25 & -0.25 & 1 \\ \end{pmatrix}$$

If anyone could clarify how I should think around this one I would be grateful.

Jonas

2

There are 2 best solutions below

8
On

in a first step i would multiply by $4$ and we get integer coefficients $$4x_1-x_2-x_3=200$$ $$-x_1+4x_2-x_4=200$$ $$-x_1+4x_3-x_4=200$$ $$-x_2-x_3+4x_4=200$$ now you can eliminate the variables multiplying the second equation by $4$ and adding to the first one and do the same with the third equation we get $$4x_1-x_2-x_3=200$$ $$15x_2-x_3-4x_4=1000$$ $$-x_2-15x_3-4x_4=1000$$ $$x_2-x_3+4x_4=200$$ in the next step we eliminate $$x_2$$: we have $$4x_1-x_2-x_3=200$$ $$15x_2-x_3-4x_4=1000$$ multiplying the third equation (from above) by $15$ and adding to the second: $$-226x_3-64x_4=16000$$ (a) and doing the same with the fourth one: $$14x_3-64x_4=-14000$$ (b) multiplying equation (a) by $-1$ and adding to the last one we can eliminate $x_4$ we get $$-240x_4=30000$$ now you can compute $x_4$

0
On

Yes, you have to include the "0"s, else you will confuse "$x_1$" coefficients with "$x_2$" coefficients, etc.

Also I would include the "right hand side" as a fifth column: $\begin{bmatrix}1 & -.25 & -.25 & 0 & 50 \\ -.25 & 1 & 0 & -.25 & 50 \\ -.25 & 0 & 1 & -.25 & 25 \\ 0 & -.25 & -.25 & 1 & 25\end{bmatrix}$

In fact, I think it would be better to use fractions rather than decimals: $\begin{bmatrix}1 & -1/4 & -1/4 & 0 & 50 \\ -1/4 & 1 & 0 & -1/4 & 50 \\ -1/4 & 0 & 1 & -1/4 & 24 \\ 0 & -1/4 & -1/4 & 1 & 25 \end{bmatrix}$

I would start by "clearing" the first column by adding 1/4 times the first row from the second and third rows: $\begin{bmatrix} 1 & -1/4 & -1/4 & 0 & 50 \\ 0 & 15/16 & -1/16 & -1/4 & 250/4 \\ 0 & -1/16 & 15/16 & -1/4 & 150/4 \\ 0 & -1/4 & -1/4 & 1 & 25\end{bmatrix}$

Swap the second and fourth rows: $\begin{bmatrix} 1 & -1/4 & -1/4 & 0 & 50 \\ 0 & -1/4 & -1/4 & 1 & 25\\ 0 & -1/16 & 15/16 & -1/4 & 150/4 \\ 0 & 15/16 & -1/16 & -1/4 & 250/4 \end{bmatrix}$ to make the next step simpler.

"Clear" the second column by subtracting 1/4 the second row from the third row and adding 15/4 times the second row from the fourth: $\begin{bmatrix} 1 & -1/4 & -1/4 & 0 & 50 \\ 0 & -1/4 & -1/4 & 1 & 25 \\ 0 & 0 & 1 & -1/2 & 125/4 \\ 0 & 0 & -1 & 7/2 & 475/16 \end{bmatrix}$

Add the third row to the fourth row: $\begin{bmatrix} 1 & -1/4 & -1/4 & 0 & 50 \\ 0 & -1/4 & -1/4 & 1 & 25 \\ 0 & 0 & 1 & -1/2 & 125/4 \\ 0 & 0 & 0 & 3 & 975/16 \end{bmatrix}$

That is now a "triangular matrix" and can be solved by "back substitution". The fourth row is equivalent to $3x_4= 975/16$ so $x_4= 325/16$. Then the third row is equivalent to $x_3- (1/2)x_4= x_3- 325/32= 125/4$ so $x_3= 125/4- 325/32= (1000- 325)/32= 675/32$. Then the second row is equivalent to $-(1/4)x_2- (1/4)x_3+ x_4= -(1/4)x_2- (1/4)(675/32)+ 325/16= -(1/4)x_2- 675/128+ 325/16= -(1/4)x_2+ (1300- 675)/128= -(1/4)x_2+ 625/128= 25$ so that $x_2= -675/512$. Finally the first row s equivalent to $x_1- (1/4)x_2- (1/4)x_3= x_1+ (1/4)(675/512)- (1/4)(675/32)= x_1+ 675/2048- 675/128= x_1- 10125/2048= 50$.