example of gaussian elimination

Upload: loserboi101

Post on 03-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 example of gaussian elimination

    1/4

    Examples of Gaussian Elimination

    Example 1: Use Gaussian elimination to solve the system of linear equations

    x1 + 5x2 = 7

    2x1 7x2 = 5.

    Solution: We carry out the elimination procedure on both the system of equations and the correspondingaugmented matrix, simultaneously. In general only one set of reductions is necessary, and the latter(dealing with matrices only) is preferable because of the simplified notation.

    x1 + 5x2 = 72x1 7x2 = 5

    1 5 72 7 5

    Add twice Row 1 to Row 2.

    x1 + 5x2 = 73x2 = 9

    1 5 70 3 9

    Multiply Row 2 by 1/3.

    x1 + 5x2 = 7x2 = 3

    1 5 70 1 3

    Add 5 times Row 2 to Row 1.

    x1 = 8x2 = 3

    1 0 80 1 3

    Example 2: Use Gaussian elimination to solve the system of linear equations

    2x2 + x3 = 8

    x1 2x2 3x3 = 0

    x1 + x2 + 2x3 = 3.

  • 7/28/2019 example of gaussian elimination

    2/4

    Solution: As before, we carry out reduction on the system of equations and on the augmented matrixsimultaneously, in order to make it clear that row operations on equations correspond exactly to rowoperations on matrices.

    2x2 + x3 = 8

    x1

    2x2

    3x3 = 0x1 + x2 + 2x3 = 3

    0 2 1 8

    1

    2

    3 01 1 2 3

    Swap Row 1 and Row 2.

    x1 2x2 3x3 = 02x2 + x3 = 8

    x1 + x2 + 2x3 = 3

    1 2 3 00 2 1 81 1 2 3

    Add Row 1 to Row 3.

    x1 2x2 3x3 = 02x2 + x3 = 8

    x2 x3 = 3

    1 2 3 00 2 1 8

    0 1 1 3

    Swap Row 2 and Row 3.

    x1

    2x2

    3x3 = 0 x2 x3 = 3

    2x2 + x3 = 8

    1 2 3 00 1 1 3

    0 2 1 8

    Add twice Row 2 to Row 3.

    x1 2x2 3x3 = 0 x2 x3 = 3

    x3 = 2

    1 2 3 00 1 1 3

    0 0 1 2

    Add 1 times Row 3 to Row 2.Add 3 times Row 3 to Row 1.

    x1 2x2 = 6 x2 = 5

    x3 = 2

    1 2 0 60 1 0 5

    0 0 1 2

  • 7/28/2019 example of gaussian elimination

    3/4

    Add 2 times Row 2 to Row 1.

    x1 = 4 x2 = 5

    x3 =

    2

    1 0 0 40 1 0 5

    0 0

    1

    2

    Multiply Rows 2 and 3 by 1.

    x1 = 4x2 = 5

    x3 = 2

    1 0 0 40 1 0 5

    0 0 1 2

    1cm

    Example 3: Use Gaussian elimination to solve the system of linear equations

    x1 2x2 6x3 = 12

    2x1 + 4x2 + 12x3 = 17

    x1 4x2 12x3 = 22.

    Solution: In this case, we convert the system to its corresponding augmented matrix, perform thenecessary row operations on the matrix alone, and then convert back to equations at the end to identifythe solution.

    x1 2x2 6x3 = 122x1 + 4x2 + 12x3 = 17x1 4x2 12x3 = 22

    1 2 6 122 4 12 171

    4

    12 22

    1 2 6 120 8 24 41

    0 2 6 10

    Add

    2 times Row 1 to Row 2.Add 1 times Row 1 to Row 3.

    1 2 6 120 2 6 10

    0 8 24 41

    Swap Row 2 and Row 3.

  • 7/28/2019 example of gaussian elimination

    4/4

    1 2 6 120 2 6 10

    0 0 0 1

    Add 4 times Row 2 to Row 3.

    1 2 6 120 2 6 10

    0 0 0 1

    x1 2x2 6x3 = 12

    2x2 6x3 = 100 = 1

    Since the final equation0 = 1

    cannot be satisfied, this system has no solutions.