Results 1 to 3 of 3

Math Help - System of linear equations

  1. #1
    Member
    Joined
    Mar 2009
    Posts
    182
    Thanks
    1

    System of linear equations

    So I have the following set of linear equations:

    x + 2y - z = 1
    -x -2y + 3z = 0
    x + y + z = -2

    I then used Gaussian Elimination to simplify them, from which I obtained the Matrix:

    6 0 0 -15
    0 -12 0 -16
    0 0 6 -5

    first of all, my calculations could well be wrong, but I think i did it right. More to the point, I am more struggling with how to interpret the results. So from this matrix, do I take from it that, the system has a unique solution? the system has no solution? or the system has an infinite number of solutions?

    Obviously the answer will also rely on whether or not my Gaussian Elimination is correct!

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    4,163
    Thanks
    762

    Re: System of linear equations

    Hey sirrelwood.

    If your solution is correct, then yes your solution, is correct.

    Checking with octave, I get the following:

    >> A = [1, 2, -1; -1, -2, 3; 1, 1, 1]
    A =

    1 2 -1
    -1 -2 3
    1 1 1

    >> b = [1; 0; -2]
    b =

    1
    0
    -2

    >> A\b
    ans =

    -6.50000
    4.00000
    0.50000

    The above confirms that the solution is unique however the actual solution obtained is very different.

    The inverse of the matrix given by Octave is:

    >> inv(A)
    ans =

    -2.50000 -1.50000 2.00000
    2.00000 1.00000 -1.00000
    0.50000 0.50000 0.00000
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Mar 2010
    Posts
    993
    Thanks
    244

    Re: System of linear equations

    Yes, the correct solution to the system is x=-13/2, y=4, z=1/2, so it seems like you made an error in your Gaussian Elimination. If I interpret your results correctly, you would get x=-15/6=-5/2, y=-16/-12=4/3, z=-5/6, which doesn't work: -x-2y+3z = -8/3. Here's how I would have done it:

    Start with:

    [ 1 2 -1 1]
    [-1 -2 3 0]
    [ 1 1 1 -2]

    Add row 1 to row 2, subtract row 1 from row 3, and swap rows 2 and 3:

    [ 1 2 -1 1]
    [ 0 -1 2 -3]
    [ 0 0 2 1]

    Subtract row 3 from row 2:

    [ 1 2 -1 1]
    [ 0 -1 0 -4]
    [ 0 0 2 1]

    Add 2*row 2 and (1/2)*row 3 to row 1:

    [ 1 0 0 -13/2]
    [ 0 -1 0 -4]
    [ 0 0 2 1]

    So the solution is x=-13/2, y=4, z=1/2.

    - Hollywood
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. System of linear equations
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: January 7th 2011, 07:09 PM
  2. Non-linear system of two equations
    Posted in the Algebra Forum
    Replies: 5
    Last Post: October 3rd 2010, 02:05 PM
  3. Linear System of Equations
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: May 16th 2010, 07:38 AM
  4. Replies: 2
    Last Post: April 20th 2010, 04:26 PM
  5. System of Linear Equations
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: March 29th 2008, 06:41 PM

Search Tags


/mathhelpforum @mathhelpforum