miércoles, 21 de julio de 2010

Gauss jodan and LU descomposition

Gauss jordan elimination

This is a variation of Gaussian elimination. Gaussian elimination gives us tools to solve large linear systems numerically. It is done by manipulating the given matrix using the elementary row operations to put the matrix into row echelon form. To be in row echelon form, a matrix must conform to the following criteria:

1. If a row does not consist entirely of zeros, then the first non zero number in the row is a 1.

2. If there are any rows entirely made up of zeros, then they are grouped at the bottom of the matrix.

3. In any two successive rows that do not consist entirely of zeros, the leading 1 in the lower row occurs farther to the right that the leading 1 in the higher row.



From this form, the solution is easily(relatively) derived. The variation made in the Gauss-Jordan method is called back substitution. Back substitution consists of taking a row echelon matrix and operating on it in reverse order. Normally the matrix is simplified from top to bottom to achieve row echelon form. When Gauss-Jordan has finished, all that remains in the matrix is a main diagonal of ones and the augmentation, this matrix is now in reduced row echelon form. For a matrix to be in reduced row echelon form, it must be in row echelon form and submit to one added criteria:

• Each column that contains a leading 1 has zeros everywhere else.
Since the matrix is representing the coefficients of the given variables in the system, the augmentation now represents the values of each of those variables. The solution to the system can now be found by inspection and no additional work is required.

Example:

From:http://www.krellinst.org/AiS/textbook/unit2/example_projects/starter/math/matrix/gauss.html




Gauss Jordan


flowchart



LU Decomposition

Definition 1 Let A be an nm matrix. An LU decomposition (sometimes also called an LU factorization) of A , if it exists, is an nn unit lower triangular matrix L and an nm matrix U, in (upper) echelon form, such that
A=LU
The LU factorization is closely related to the row reduction algorithm. In a very real sense, the factorization is a record of the steps taken in row reducing a matrix to echelon form. The matrix L ``encodes'' the sequence of row replacement operations that row reduce the given matrix A to echelon form U .


From:Steven Chapra Metodos Numericos quinta edición

For U, there is a phase similar to that used in the method of Gauss, however, the main diagonal is not converted into one, if not changed by a factor, as follows:


From:Autor's blog

Factor1=a21/a11
And for three Equation
Factor2= a31/a11

The number of factors depends on the number of equations in the system and will be n-1 factors (n number of equations); now to reduce the system to an upper triangular matrix is the following
Equation _2 = -factor1*Equation_1+Equation_2.

So the equation changes completely and two below the pivot will be zero, and Equation 3 will be the same process:

Equation _3 = -factor2*Equation_1+Equation_3.

And
Equation _n = -factor(n-1)*Equation_1+Equation_n.

Where n is the number of equations in the system


From:Autor's Blog

Following the method based on Gauss, now will eliminate the variables below the second pivot, in this case the pivot is a'22 position and will as in the previous steps.
The factor to use is:
Factor_1’= a’32 /a’22


From:Autor's Blog

The process is the same for certain systems of equations.
The factors calculated are those which form the matrix [L], as follows:


From:Autor's Blog

And [U][L]= [A].

For the next step is working with the substitutions, forward and backward.
First calculating a vector [D] by:
[L][D]=[B]
Using forward substitution.
And then I know [D], we calculate [X] that are our variables.
[U][X]=[D]

Example:



Bibliografy
Steven Chapra, Metodos numericos quinta edicion
http://planetmath.org/encyclopedia/LUDecomposition.html
http://www.krellinst.org/AiS/textbook/unit2/example_projects/starter/math/matrix/gauss.html

No hay comentarios:

Publicar un comentario