Top Banner

of 20

Chapter 9 Slide

Apr 14, 2018

Download

Documents

Kyle Ward
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/30/2019 Chapter 9 Slide

    1/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    1

    Part 3 -

    Chapter 9

  • 7/30/2019 Chapter 9 Slide

    2/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    2

    Part 3Linear Algebraic Equations

    An equation of the form ax+by+c=0 or equivalently ax+by=-

    c is called a linear equation inx andy variables.

    ax+by+cz=dis a linear equation in three variables,x, y, and

    z.

    Thus, a linear equation in n variables is

    a1x1+a2x2+ +anxn = b

    A solution of such an equation consists of real numbers c1, c2,

    c3, , cn. If you need to work more than one linearequations, a system of linear equations must be solved

    simultaneously.

  • 7/30/2019 Chapter 9 Slide

    3/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    3

    Noncomputer Methods for Solving

    Systems of Equations

    For small number of equations (n 3) linear

    equations can be solved readily by simple

    techniques such as method of elimination.

    Linear algebra provides the tools to solve such

    systems of linear equations.

    Nowadays, easy access to computers makes

    the solution of large sets of linear algebraic

    equations possible and practical.

  • 7/30/2019 Chapter 9 Slide

    4/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    4

    Fig. pt3.5

  • 7/30/2019 Chapter 9 Slide

    5/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    5

    Gauss EliminationChapter 9

    Solving Small Numbers of Equations

    There are many ways to solve a system of

    linear equations:

    Graphical method

    Cramers rule

    Method of elimination

    Computer methods

    For n 3

  • 7/30/2019 Chapter 9 Slide

    6/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    6

    Graphical Method

    For two equations:

    Solve both equations for x2:

    2222121

    1212111

    bxaxa

    bxaxa

    22

    21

    22

    212

    1212

    1

    112

    11

    2 intercept(slope)

    a

    bx

    a

    ax

    xxa

    b

    xa

    a

    x

  • 7/30/2019 Chapter 9 Slide

    7/20

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    7

    Plot x2 vs. x1

    on rectilinear

    paper, theintersection of

    the lines

    present the

    solution.

    Fig. 9.1

  • 7/30/2019 Chapter 9 Slide

    8/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    8

    Figure 9.2

  • 7/30/2019 Chapter 9 Slide

    9/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    9

    Determinants and Cramers Rule

    Determinant can be illustrated for a set of three

    equations:

    Where [A] is the coefficient matrix:

    BxA

    333231

    232221

    131211

    aaa

    aaaaaa

    A

  • 7/30/2019 Chapter 9 Slide

    10/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    10

    Assuming all matrices are square matrices,

    there is a number associated with each squarematrix [A] called the determinant, D, of [A].

    If [A] is order 1, then [A] has one element:

    [A]=[a11]D=a11

    For a square matrix of order 3, the minorof

    an element aij is the determinant of the matrixof order 2 by deleting row i and columnj of

    [A].

  • 7/30/2019 Chapter 9 Slide

    11/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    11

    22313221

    3231

    2221

    13

    23313321

    3331

    2321

    12

    23323322

    3332

    2322

    11

    333231

    232221

    131211

    aaaaaa

    aaD

    aaaaaa

    aaD

    aaaaaa

    aa

    D

    aaa

    aaa

    aaa

    D

  • 7/30/2019 Chapter 9 Slide

    12/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    12

    3231

    2221

    13

    3331

    2321

    12

    3332

    2322

    11aa

    aaa

    aa

    aaa

    aa

    aaaD

    Cramers rule expresses the solution of a

    systems of linear equations in terms of ratios

    of determinants of the array of coefficients ofthe equations. For example, x1 would be

    computed as:

    D

    aab

    aab

    aab

    x33323

    23222

    13121

    1

  • 7/30/2019 Chapter 9 Slide

    13/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    13

    Method of Elimination

    The basic strategy is to successively solve one

    of the equations of the set for one of the

    unknowns and to eliminate that variable from

    the remaining equations by substitution.

    The elimination of unknowns can be extended

    to systems with more than two or three

    equations; however, the method becomesextremely tedious to solve by hand.

  • 7/30/2019 Chapter 9 Slide

    14/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    14

    Naive Gauss Elimination

    Extension ofmethod of elimination to largesets of equations by developing a systematicscheme or algorithm to eliminate unknowns

    and to back substitute. As in the case of the solution of two equations,

    the technique forn equations consists of twophases:

    Forward elimination of unknowns

    Back substitution

  • 7/30/2019 Chapter 9 Slide

    15/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    15

    Fig. 9.3

  • 7/30/2019 Chapter 9 Slide

    16/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Operation Counting

    1 1

    1 1 1

    1

    2

    1

    32 2 2 2 2 2

    1

    ( ) ( )

    ( ) ( ) ( ) ( )

    1 1 1 1 1 ... 1

    1 1

    ( 1)1 2 3 ... ( )

    2 2

    ( 1)(2 1)1 2 3 ... ( )

    6 3

    ( )

    m m

    i i

    m m m

    i i i

    m

    i

    m

    i k

    m

    i

    m

    i

    n

    cf i c f i

    f i f i f i g i

    m

    m k

    m m mi m O m

    m m m mi m O m

    O m

    means terms of order mnand lower.

  • 7/30/2019 Chapter 9 Slide

    17/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    17

    Pitfalls of Elimination Methods

    Division by zero. It is possible that during bothelimination and back-substitution phases a division

    by zero can occur, hence called naive.

    Round-off errors.

    Ill-conditioned systems. Systems where small changesin coefficients result in large changes in the solution.Alternatively, it happens when two or more equationsare nearly identical, resulting a wide ranges of

    answers to approximately satisfy the equations. Sinceround off errors can induce small changes in thecoefficients, these changes can lead to large solutionerrors.

  • 7/30/2019 Chapter 9 Slide

    18/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    18

    Singular systems. When two equations are

    identical, we would loose one degree offreedom and be dealing with the impossiblecase ofn-1 equations forn unknowns. Forlarge sets of equations, it may not be obvious

    however. The fact that the determinant of asingular system is zero can be used and testedby computer algorithm after the eliminationstage. If a zero diagonal element is created,calculation is terminated.

  • 7/30/2019 Chapter 9 Slide

    19/20Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    19

    Techniques for Improving Solutions

    Use of more significant figures.

    Pivoting. If a pivot element is zero,normalization step leads to division by zero.

    The same problem may arise, when the pivotelement is close to zero. Problem can beavoided:

    Partial pivoting. Switching the rows so that thelargest element is the pivot element.

    Complete pivoting. Searching for the largestelement in all rows and columns then switching.

  • 7/30/2019 Chapter 9 Slide

    20/20

    20

    Gauss-Jordan

    It is a variation of Gauss elimination. Themajor differences are:

    When an unknown is eliminated, it is eliminated

    from all other equations rather than just thesubsequent ones.

    All rows are normalized by dividing them by theirpivot elements.

    Elimination step results in an identity matrix.Consequently, it is not necessary to employ back

    substitution to obtain solution.