Advertisement

Solve the linear system by Gaussian elimination

Started by September 14, 2014 04:09 PM
2 comments, last by DiegoSLTS 10 years, 5 months ago

first: -2b + 3c = 1 second: 3a + 6b -3c = -2 third: 6a + 6b +3c = 5

Step 1: Construct linear system as a matrix

0 -2 3 1

3 6 -3 -2

6 6 3 5

I did -2p2 +p3 and (1/3)p2 and got the below matrix:

0 -2 3 1

1 2 -1 -2/3

0 -6 9 9

Then I did -3p1+p3

0 -2 3 1

1 2 -1 -2/3

0 0 0 6

I got an inconsistent linear system with the third row being 0 0 0 6.

May someone please verify if I am right? I looked it over.

That system can't be solved, one of the equations is a linear combination of the other 2.

Look here: http://wims.unice.fr/wims/wims.cgi?session=JX9E2792EF.1&lang=en&cmd=reply&module=tool%2Flinear%2Flinsolver.en&system=+-2b+%2B+3c+%3D+1%0D%0A3a+%2B+6b+-3c+%3D+-2%0D%0A6a+%2B+6b+%2B3c+%3D+5&parms=

To make sure the system has a solution compute de matrix determinant. A determinant of 0 means the matrix is NOT inversible, which is a requirement for the system to have a solution. Check here to get the determinant: http://matrix.reshish.com/determinant.php

EDIT: I think you have a problem when creating the matrix, shouldn't the last column be -1 2 -5 ?

That matrix you used, when multiplied by [a,b,c,1], translates to the equations:

0a - 2b + 3c + 1 = 0

3a + 6b - 3c - 2 = 0

6a + 6b + 3c + 5 = 0

But your equations are...

0a - 2b + 3c - 1 = 0

3a + 6b - 3c + 2 = 0

6a + 6b + 3c - 5 = 0

Advertisement


A determinant of 0 means the matrix is NOT inversible, which is a requirement for the system to have a solution

This is not true. A non-zero determinant means that the system has exactly one solution. It is sufficient for solvability, but not neccessary.

In general, there are 3 classes of solutions for linear matrix equations:

1) Exactly one solution

Typically you can check this by computing the determinant of the system matrix or by performing Gaussian elimination.

The matrix is a triangular matrix with nonzero entries on the diagonal if there is exactly one solution.

2) Infinitely many solutions

This occurs if the system is underdetermined. That happens when there are less equations than variables, which means that some rows of the extended system matrix will be 0 after Gaussian elimination.

3) No solutions

After Gaussian elimination you have a row with zeros in your system matrix, but your right hand side is nonzero. This is your case. It is not solvable; the last row ( 0 = 6 ) is a contradiction.

Usually you simply use Gaussian elimination and look at the system after you've transformed all rows into upper diagonal form.


EDIT: I think you have a problem when creating the matrix, shouldn't the last column be -1 2 -5 ?

Warnexus' construction is correct; the last column of the extended system matrix is the right hand side of the equation system.


A determinant of 0 means the matrix is NOT inversible, which is a requirement for the system to have a solution

This is not true. A non-zero determinant means that the system has exactly one solution. It is sufficient for solvability, but not neccessary.

In general, there are 3 classes of solutions for linear matrix equations:

1) Exactly one solution

Typically you can check this by computing the determinant of the system matrix or by performing Gaussian elimination.

The matrix is a triangular matrix with nonzero entries on the diagonal if there is exactly one solution.

2) Infinitely many solutions

This occurs if the system is underdetermined. That happens when there are less equations than variables, which means that some rows of the extended system matrix will be 0 after Gaussian elimination.

3) No solutions

After Gaussian elimination you have a row with zeros in your system matrix, but your right hand side is nonzero. This is your case. It is not solvable; the last row ( 0 = 6 ) is a contradiction.

Usually you simply use Gaussian elimination and look at the system after you've transformed all rows into upper diagonal form.

Yes, sorry, when I said "a solution" a I was really thinking about "a unique solution".


EDIT: I think you have a problem when creating the matrix, shouldn't the last column be -1 2 -5 ?

Warnexus' construction is correct; the last column of the extended system matrix is the right hand side of the equation system.

Thanks for the clarification, I wasn't sure about that, I hope I didn't confuse Warnexus with those mistakes.

This topic is closed to new replies.

Advertisement