term paper rb6001b33 mth 101

Upload: nishantbhatia

Post on 10-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    1/12

    Lovely

    Professional University

    TERM PAPER

    ON

    GAUSSIAN ELIMINATION & GAUSSJORDON METHOD

    MTH101

    SUBMITTED TO:SUBMITTED BY:

    SOFIA SINGLA Hansraj

    yadav

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    2/12

    ROL

    L NO: Rk4008B33

    REG

    D NO: 11008281

    I am very thankful and expressing my deep

    sense of gratitude towards SOFIA SINGLA, Lecturer

    LSE, Lovely Professional University, who inspired

    me to work on this topic. I benefited a lot with

    discussing him on this topic.

    I am also thankful to my parents & friends who

    provided me such a opportunity, for their inspiring

    words.

    I am also thankful to all my colleagues and all

    those who helped me in completion of this project.

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    3/12

    Hans

    raj Yadav

    ROLL

    NO: RK4008B33

    B.Tec

    h (ME)

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    4/12

    GAUSSIANELIMINATION:-

    DEFINITION:-

    In linear algebra, Gaussian elimination is

    an algorithm for solving systems of linearequations, finding the rankof a matrix, andcalculating the inverse of an invertible

    square matrix. Gaussian elimination is

    named after German mathematician andscientist Carl Friedrich Gauss, which makes

    it an example ofStigler's law.

    Elementary row operations are used to

    reduce a matrix to row echelon form.GaussJordan elimination, an extension of

    this algorithm, reduces the matrix further toreduced row echelon form. Gaussianelimination alone is sufficient for many

    applications, and is cheaper than the -Jordan

    version.

    HISTORY:-The method of Gaussianelimination appears in Chapter Eight,

    Rectangular Arrays, of the important

    Chinese mathematical textJiuzhang

    suanshu orThe Nine Chapters on the

    Mathematical Art. Its use is illustrated ineighteen problems, with two to fiveequations. The first reference to the book by

    this title is dated to 179 CE, but parts of it

    were written as early as approximately 150

    BCE.[1] It was commented on by Liu Hui inthe 3rd century.

    The method in Europe stems from the notes

    of Isaac Newton.[2] In 1670, he wrote that all

    the algebra books known to him lacked a

    lesson for solving simultaneous equations,which Newton then supplied. Cambridge

    University eventually published the notes asArithmetical Universalis in 1707 long after

    Newton left academic life. The notes were

    widely imitated, which made (what is nowcalled) Gaussian elimination a standard

    lesson in algebra textbooks by the end of the

    18th century. Carl Friedrich Gauss in 1810

    devised a notation for symmetric eliminationthat was adopted in the 19th century byprofessional hand computers to solve the

    normal equations of least-squares problems.

    The algorithm that is taught in high schoolwas named for Gauss only in the 1950s as a

    result of confusion over the history of the

    subject.

    Algorithm overview:-Theprocess of Gaussian elimination

    has two parts. The first part(Forward Elimination) reduces a

    given system to either triangular or

    echelon form, or results in a

    degenerate equation with no

    solution, indicating the system has

    no solution. This is accomplished

    through the use ofelementary row

    operations. The second step uses

    back substitution to find the

    solution of the system above.

    Stated equivalently for matrices, the first

    part reduces a matrix to row echelon formusing elementary row operations while the

    second reduces it to reduced row echelon

    form, orrow canonical form.

    Another point of view, which turns out to bevery useful to analyze the algorithm, is that

    Gaussian elimination computes a matrix

    decomposition. The three elementary rowoperations used in the Gaussian elimination

    (multiplying rows, switching rows, and

    adding multiples of rows to other rows)amount to multiplying the original matrix

    with invertible matrices from the left. The

    first part of the algorithm computes an LU

    decomposition, while the second part writes

    http://en.wikipedia.org/wiki/Linear_algebrahttp://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/Rank_(linear_algebra)http://en.wikipedia.org/wiki/Matrix_(mathematics)http://en.wikipedia.org/wiki/Invertible_matrixhttp://en.wikipedia.org/wiki/Invertible_matrixhttp://en.wikipedia.org/wiki/Carl_Friedrich_Gausshttp://en.wikipedia.org/wiki/Stigler's_lawhttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/The_Nine_Chapters_on_the_Mathematical_Arthttp://en.wikipedia.org/wiki/The_Nine_Chapters_on_the_Mathematical_Arthttp://en.wikipedia.org/wiki/Gaussian_elimination#cite_note-0http://en.wikipedia.org/wiki/Liu_Huihttp://en.wikipedia.org/wiki/Gaussian_elimination#cite_note-1http://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Echelon_formhttp://en.wikipedia.org/wiki/Degeneracy_(mathematics)http://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Triangular_matrix#Forward_and_back_substitutionhttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Row_canonical_formhttp://en.wikipedia.org/wiki/Matrix_decompositionhttp://en.wikipedia.org/wiki/Matrix_decompositionhttp://en.wikipedia.org/wiki/LU_decompositionhttp://en.wikipedia.org/wiki/LU_decompositionhttp://en.wikipedia.org/wiki/Linear_algebrahttp://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/Rank_(linear_algebra)http://en.wikipedia.org/wiki/Matrix_(mathematics)http://en.wikipedia.org/wiki/Invertible_matrixhttp://en.wikipedia.org/wiki/Invertible_matrixhttp://en.wikipedia.org/wiki/Carl_Friedrich_Gausshttp://en.wikipedia.org/wiki/Stigler's_lawhttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/The_Nine_Chapters_on_the_Mathematical_Arthttp://en.wikipedia.org/wiki/The_Nine_Chapters_on_the_Mathematical_Arthttp://en.wikipedia.org/wiki/Gaussian_elimination#cite_note-0http://en.wikipedia.org/wiki/Liu_Huihttp://en.wikipedia.org/wiki/Gaussian_elimination#cite_note-1http://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Echelon_formhttp://en.wikipedia.org/wiki/Degeneracy_(mathematics)http://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Triangular_matrix#Forward_and_back_substitutionhttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Elementary_row_operationshttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Row_canonical_formhttp://en.wikipedia.org/wiki/Matrix_decompositionhttp://en.wikipedia.org/wiki/Matrix_decompositionhttp://en.wikipedia.org/wiki/LU_decompositionhttp://en.wikipedia.org/wiki/LU_decomposition
  • 8/8/2019 Term Paper RB6001B33 MTH 101

    5/12

    the original matrix as the product of a

    uniquely determined invertible matrix and a

    uniquely determined reduced row-echelonmatrix.

    Example

    Suppose the goal is to find and describe the

    solution(s), if any, of the following systemof linear equations:

    The algorithm is as follows: eliminatex

    from all equations belowL1, and then

    eliminatey from all equations belowL2.

    This will put the system into triangular

    form. Then, using back-substitution, eachunknown can be solved for.

    In the example,x is eliminated fromL2 by

    adding toL2.x is then eliminated fromL3 by addingL1 toL3. Formally:

    The result is:

    Nowy is eliminated fromL3 by adding 4L2toL3:

    The result is:

    This result is a system of linear equations in

    triangular form, and so the first part of the

    algorithm is complete.

    The last part, back-substitution, consists of

    solving for the known in reverse order. It

    can thus be seen that

    Then,zcan be substituted intoL2, which canthen be solved to obtain

    Next,zandy can be substituted intoL1,which can be solved to obtain

    The system is solved.

    Some systems cannot be reduced to

    triangular form, yet still have at least onevalid solution: for example, ify had not

    occurred inL2 andL3 after the first step

    above, the algorithm would have beenunable to reduce the system to triangular

    form. However, it would still have reduced

    the system to echelon form. In this case, the

    system does not have a unique solution, as itcontains at least one free variable. The

    solution set can then be expressed

    parametrically (that is, in terms of the freevariables, so that if values for the free

    variables are chosen, a solution will be

    generated).

    http://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Echelon_formhttp://en.wikipedia.org/wiki/Free_variablehttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/System_of_linear_equationshttp://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Triangular_formhttp://en.wikipedia.org/wiki/Echelon_formhttp://en.wikipedia.org/wiki/Free_variable
  • 8/8/2019 Term Paper RB6001B33 MTH 101

    6/12

    In practice, one does not usually deal with

    the systems in terms of equations but instead

    makes use of the augmented matrix (whichis also suitable for computer manipulations).

    For example:

    Therefore, the Gaussian Elimination

    algorithm applied to the augmented matrix

    begins with:

    Which, at the end of the first part (Gaussian

    elimination, zeros only under the leading 1)

    of the algorithm, looks like this:

    That is, it is in row echelon form.

    At the end of the algorithm, if the Gauss

    Jordan elimination (zeros under and abovethe leading 1) is applied:

    That is, it is in reduced row echelon form, or

    row canonical form.

    APPLICATION:-

    1. Finding the inverse of amatrix:-

    SupposeA is a matrix and you need

    to calculate its inverse. The identity

    matrix is augmented to the right ofA,forming a matrix (the block matrixB = [A,I]). Through application of

    elementary row operations and the Gaussian

    elimination algorithm, the left block ofB

    can be reduced to the identity matrixI,

    which leavesA 1 in the right block ofB.

    If the algorithm is unable to reduceA to

    triangular form, thenA is not invertible.

    2. General algorithm tocompute ranks andbases:-

    The Gaussian elimination algorithm can beapplied to any matrixA. If we get

    "stuck" in a given column, we move to the

    next column. In this way, for example, somematrices can be transformed to a

    matrix that has a reduced row echelon form

    like

    (The *'s are arbitrary entries). This echelonmatrix Tcontains a wealth of information

    aboutA: the rankofA is 5 since there are 5non-zero rows in T; the vector space

    spanned by the columns ofA has a basis

    consisting of the first, third, fourth, seventhand ninth column ofA (the columns of the

    ones in T), and the *'s tell you how the other

    http://en.wikipedia.org/wiki/Augmented_matrixhttp://en.wikipedia.org/wiki/Augmented_matrixhttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Matrix_inversionhttp://en.wikipedia.org/wiki/Identity_matrixhttp://en.wikipedia.org/wiki/Identity_matrixhttp://en.wikipedia.org/wiki/Block_matrixhttp://en.wikipedia.org/wiki/Rank_of_a_matrixhttp://en.wikipedia.org/wiki/Vector_spacehttp://en.wikipedia.org/wiki/Augmented_matrixhttp://en.wikipedia.org/wiki/Augmented_matrixhttp://en.wikipedia.org/wiki/Row_echelon_formhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_eliminationhttp://en.wikipedia.org/wiki/Reduced_row_echelon_formhttp://en.wikipedia.org/wiki/Matrix_inversionhttp://en.wikipedia.org/wiki/Identity_matrixhttp://en.wikipedia.org/wiki/Identity_matrixhttp://en.wikipedia.org/wiki/Block_matrixhttp://en.wikipedia.org/wiki/Rank_of_a_matrixhttp://en.wikipedia.org/wiki/Vector_space
  • 8/8/2019 Term Paper RB6001B33 MTH 101

    7/12

    columns ofA can be written as linear

    combinations of the basis columns.

    3. Systems of Linear Equations.

    Solving three-variable, three-equation linearsystems is more difficult, at least initially, thansolving the two-variable systems, because thecomputations involved are more messy. You willneed to be very neat in your working, and youshould plan to use lots of scratch paper. Themethod for solving these systems is anextension of the two-variable solving-by-additionmethod, so make sure you knowthis methodwell and can use it consistently correctly.

    Though the method of solution is based on

    addition/elimination, trying to do actual additiontends to get very messy, so there is asystematized method for solving the three-or-more-variables systems. This method is called"Gaussian elimination" (with the equationsending up in what is called "row-echelon form").

    Let's start simple, and work our way up tomessier examples.

    Solve the following system ofequations.

    5x+ 4y z= 0

    10y 3z= 11 z= 3

    It's fairly easy to see how to proceed in

    this case. I'll just back-substitute thez-value from the third equation into the

    second equation, solve the result fory,and then plugzandy into the first

    equation and solve the result forx.

    10y 3(3) = 1110y 9 = 11

    10y = 20y = 2

    5x + 4(2) (3) = 0

    5x + 8 3 = 0

    5x + 5 = 0

    5x = 5x = 1

    Then the solution is(x,y,z) = (1, 2,

    3).

    The reason this system was easy to solve is thatthe system was "triangular"; this refers to theequations having the form of a triangle, becauseof the lower equations containing only the latervariables.

    The point is that, in this format, the system is

    simple to solve. And Gaussian elimination is themethod we'll use to convert systems to thisupper triangular form, using the row operationswe learned when we did the addition method.

    Solve the following system ofequations using Gaussianelimination.

    3x+ 2y 6z= 65x+ 7y 5z= 6

    x+ 4y 2z= 8

    No equation is solved for a variable, soI'll have to do the multiplication-and-addition thing to simplify this system. Inorder to keep track of my work, I'll writedown each step as I go. But I'll do mycomputations on scratch paper. Here ishow I did it:

    The first thing to do is to get rid of the

    leadingx-terms in two of the rows. Fornow, I'll just look at which rows will beeasy to clear out; I can switch rows later

    to get the system into "upper triangular"form. There is no rule that says I have to

    use thex-term from the first row, and, inthis case, I think it will be simpler to use

    thex-term from the third row, since its

    coefficient is simply "1". So I'll multiply

    the third row by 3, and add it to the first

    http://www.purplemath.com/modules/systlin4.htmhttp://www.purplemath.com/modules/systlin4.htm
  • 8/8/2019 Term Paper RB6001B33 MTH 101

    8/12

    row. I do the computations on scratchpaper:

    ...and then I write down the results:

    (When we were solving two-variablesystems, we could multiply a row,

    rewriting the system off to the side, andthen add down. There is no space forthis in a three-variable system, which iswhy we need the scratch paper.)

    Warning: Since I didn't actually doanything to the third row, I copied itdown, unchanged, into the new matrix ofequations. I usedthe third row, but Ididn't actually change it. Don't confuse"using" with "changing".

    To get smaller numbers for coefficients,

    I'll multiply the first row by one-half:

    Now I'll multiply the third row by 5 andadd this to the second row. I do my workon scratch paper:

    ...and then I write down the results:Copyright Elizabeth Stapel 1999-2009 All RightsReserved

    I didn't do anything with the first row, so

    I copied it down unchanged. I workedwith the third row, but I only workedonthe second row, so the second row isupdated and the third row is copied overunchanged.

    Okay, now thex-column is cleared outexcept for the leading term in the third

    row. So next I have to work on they-column.

    Warning: Since the third equation has

    anx-term, I cannot use it on either of theother two equations any more (or I'llundo my progress). I can work on theequation, but not with it.

    If I add twice the first row to the second

    row, this will give me a leading 1 in thesecond row. I won't have gotten rid of

    the leadingy-term in the second row,but I will have converted it (withoutgetting involved in fractions) to a formthat is simpler to deal with. (You shouldkeep an eye out for this sort of

    simplification.) First I do the scratchwork:

    ...and then I write down the results:

    Now I can use the second row to clear

    out they-term in the first row. I'll multiply

    the second row by 7 and add. First I dothe scratch work:

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    9/12

    ...and then I write down the results:

    I can tell whatzis now, but, just to be

    thorough, I'll divide the first row by 43.Then I'll rearrange the rows to put themin upper-triangular form:

    Now I can start the process of back-solving:

    y 7(1) = 4y 7 = 4y = 3

    x + 4(3) 2(1) = 8x + 12 2 = 8

    x + 10 = 8x = 2

    Then the solution is(x,y,z) = (2, 3,

    1).

    Note: There is nothing sacred about the steps Iused in solving the above system; there was

    nothing special about how I solved this system.You could work in a different order or simplifydifferent rows, and still come up with the correctanswer. These systems are sufficientlycomplicated that there is unlikely to be one rightway of computing the answer. So don't stressover "how did she know to do that next?",because there is no rule. I just did whateverstruck my fancy; I did whatever seemed simplest

    or whatever came to mind first. Don't worry ifyou would have used completely different steps.As long as each step along the way is correct,you'll come up with the same answer.

    In the above example, I could have gone furtherin my computations and been more thorough-going in my row operations, clearing out all the

    y-terms other than that in the second row and allthez-terms other than that in the first row. Thisis what the process would then have looked like:

    This way, I can just read off the values ofx,y,

    andz, and I don't have to bother with the back-substitution. This more-complete method ofsolving is called "Gauss-Jordan elimination"

    (with the equations ending up in what is called"reduced-row-echelon form"). Many texts onlygo as far as Gaussian elimination, but I'vealways found it easier to continue on and doGauss-Jordan.

    Note that I did two row operations at once in thatlast step before switching the rows. As long asI'm not working with and working on the same

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    10/12

    row in the same step, this is okay. In this case, Iwas working with the first row and working onthe second and third rows.

    Gauss Jordan Elimination

    Method:

    Gauss Jordan Elimination Method is like atool to solve large linear equation

    numerically. It is done by manipulating the

    given matrix using elementary row

    operations. It puts zero both above andbelow each pivot element as it goes from top

    row of the matrix to the bottom. This

    method is also known as back substitution.

    Consider three linear equations to be solved

    a1x+b1y+c1z=d1

    a2x+b2y+c2z=d2

    a3x+b3y+c3z=d3

    Augmented matrix is given by

    [[a1,b1,c1,d1],[a2,b2,c2,d2],[a3,b3,c3,d3]]

    Has to be transformed to

    Procedure of Gauss Jordan EliminationMethod:

    For solving a system of threelinear equations in three unknowns by

    Gauss Jordan elimination method,

    elementary row operation are performed onthe augmented matrix as follow

    STEP 1:

    Transform the element at

    a11 position to 1, by a suitable

    elementary row transformation

    using the element at a21 or a31

    Position or otherwise.

    Transform the non-zeroelements, if any, at a21,a31position as zeros(otherelements of the first column) byusing the element 1 at a11position. If at the end of step 1,there is a non-zero element ata22 or a32 position, go to step2.Otherwise skip it.

    Step 2:

    Transform the element at a22position as 1 by a suitableelementary row transformationusing the element at a32position or otherwise.

    Transform the other non-zeroelements, if any, of the second

    column (i.e., the non-zeroelements, if any, at a12 and a32positions) as zeros, by using theelement 1 at a22 position. At theend of step 2 or after skipping itfor reasons specified above,examine the element at a33position. If it is non-zero, gotostep3.Otherwise, stop.

    Step 3:

    Transform the element at a33position as 1 by dividing R3 witha suitable number.

    Transform the other non-zeroelements if any of the thirdcolumn (i.e., the non-zeroelements, if any, at a13 , a23

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    11/12

    position) as zeros by using the 1present at a33 position.

    Example Problems on Gauss Jordan

    Elimination Method:

    Problem: Solve the following equations byGauss- Jordan Elimination method

    3x+4y+5z=18

    2x-y+8z=13

    5x-2y+7z=20

    Solution: The augmented Matrix is

    [[3,4,5,18],[2,-1,8,13],[5,-2,7,20]]

    On applying operation R1 --> R1- R2, we get

    [[1,5,-3,5],[2,-1,8,13],[5,-2,7,20]]

    On applying R2 -->R2 - 2R1,R3--> R3 - 5R1 ,we get

    [[1,5,-3,5],[0,-11,14,3],[0,-27,22,-

    5]]

    On applying R2 --> -5R2+2R3, we

    get

    [[1,5,-3,5],[0,1,-26,-25],[0,-27,22,-

    5]]

    On applying R1 --> R1 - 5R2, R3--> R3+27R2, we obtain

    [[1, 0,127, 130], [0, 1,-26,-25],

    [0,0,-680,-680]]

    On applying R3 -->R3/(-680), weget

    [[1,0,127,130],[0,1,-26,-25],

    [0,0,1,1]]

    On applying R1 --> R1-127R3, R2--> R2+26R3 ,we obtain

    [[1,0,0,3],[0,1,0,1],[0,0,1,1]]

    Hence the solution is x=3,y=1,z=1.

  • 8/8/2019 Term Paper RB6001B33 MTH 101

    12/12

    References:-

    1. Atkinson, Kendall A. (1989),

    an Introduction to NumericalAnalysis (2nd Ed.)

    2. Calinger, Ronald (1999),AContextual History of

    Mathematics.

    3. Katz, Victor J. (2004),AHistory of Mathematics,

    Brief Version, Addison-

    Wesley.

    4. www.purplemath.com/modules/systlin6.htm.

    5. www.math.oregonstate.edu/home/.../vcalc/gauss/gauss.html.

    http://en.wikipedia.org/wiki/Addison-Wesleyhttp://en.wikipedia.org/wiki/Addison-Wesleyhttp://www.purplemath.com/modules/systlin6.htmhttp://www.purplemath.com/modules/systlin6.htmhttp://en.wikipedia.org/wiki/Addison-Wesleyhttp://en.wikipedia.org/wiki/Addison-Wesleyhttp://www.purplemath.com/modules/systlin6.htmhttp://www.purplemath.com/modules/systlin6.htm