27 julio 2010

Gaussian Elimination


In linear algebra, Gaussian elimination algorithm for solving systems of linear equations, finding the rank of a matrix, and calculating the inverse of an invertible square matrix. Gaussian elimination is named after German mathematician and scientist Carl Friedrich Gauss. is an

Elementary row operations are used to reduce a matrix to row echelon form. Gauss–Jordan elimination, an extension of this algorithm, reduces the matrix further to reduced row echelon form. Gaussian elimination alone is sufficient for many applications.

The process 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 of elementary 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 form using elementary row operations while the second reduces it to reduced row echelon form, or row canonical form.
Another point of view, which turns out to be very useful to analyze the algorithm, is that Gaussian elimination computes a matrix decomposition. The three elementary row operations 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 the original matrix as the product of a uniquely determined invertible matrix and a uniquely determined reduced row-echelon matrix.

EXAMPLE

Suppose the goal is to find and describe the solution(s), if any, of the following system of linear equations:

\begin{alignat}{7}
2x &&\; + \;&& y             &&\; - \;&&
 z  &&\; = \;&& 8 & \qquad (L_1) \\
-3x &&\; - \;&& y             &&\; + 
\;&& 2z &&\; = \;&& -11 & \qquad (L_2) \\
-2x &&\; + \;&& y &&\; +\;&& 2z  
&&\; = \;&& -3 &  \qquad (L_3)
\end{alignat}
The algorithm is as follows: eliminate x from all equations below L1, and then eliminate y from all equations below L2. This will put the system into triangular form. Then, using back-substitution, each unknown can be solved for.
In the example, x is eliminated from L2 by adding \begin{matrix}\frac{3}{2}\end{matrix} 
L_1 to L2x is then eliminated from L3 by adding L1 to L3. Formally:
L_2 + \frac{3}{2}L_1 \rightarrow L_2
L_3 + L_1 \rightarrow L_3
The result is:
\begin{alignat}{7}
2x &&\; + \;&& y             &&\; - \;&&
 z  &&\; = \;&& 8 &  \\
\frac{1}{2}y            &&\; + \;&& \frac{1}{2}z 
&&\; = \;&& 1 & \\
2y &&\; +\;&& z  &&\; = \;&& 5 &  
\end{alignat}
Now y is eliminated from L3 by adding − 4L2 to L3:
L_3 + -4L_2 \rightarrow L_3
The result is:
\begin{alignat}{7}
2x &&\; + \;&& y             &&\; - \;&&
 z  &&\; = \;&& 8 &  \\
\frac{1}{2}y            &&\; + \;&& \frac{1}{2}z 
&&\; = \;&& 1 & \\
-z  &&\; = \;&& 1 &  
\end{alignat}
This result is a system of linear equations in triangular form, and so the first part of the algorithm is complete.
The second part, back-substitution, consists of solving for the unknowns in reverse order. It can thus be seen that
z = -1 \quad (L_3)
Then, z can be substituted into L2, which can then be solved to obtain
y = 3 \quad (L_2)
Next, z and y can be substituted into L1, which can be solved to obtain
x = 2 \quad (L_1)
The system is solved.
Some systems cannot be reduced to triangular form, yet still have at least one valid solution: for example, if y had not occurred in L2 andL3 after the first step above, the algorithm would have been unable 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 it contains at least one free variable. The solution set can then be expressed parametrically (that is, in terms of the free variables, so that if values for the free variables are chosen, a solution will be generated).
In practice, one does not usually deal with the systems in terms of equations but instead makes use of the augmented matrix (which is also suitable for computer manipulations). 

For example:
\begin{alignat}{7}
2x &&\; + \;&& y             &&\; - \;&&
 z  &&\; = \;&& 8 & \qquad (L_1) \\
-3x &&\; - \;&& y             &&\; + 
\;&& 2z &&\; = \;&& -11 & \qquad (L_2) \\
-2x &&\; + \;&& y &&\; +\;&& 2z  
&&\; = \;&& -3 &  \qquad (L_3)
\end{alignat}
Therefore, the Gaussian Elimination algorithm applied to the augmented matrix begins with:
\left[ \begin{array}{ccc|c}
2 & 1 & -1 & 8 \\
-3 & -1 & 2 & -11 \\
-2 & 1 & 2 & -3
\end{array} \right]
which, at the end of the first part(Gaussian elimination, zeros only under the leading 1) of the algorithm, looks like this:
\left[ \begin{array}{ccc|c}
1 & \frac{1}{2} & \frac{-1}{2} & 4 \\
0 & 1 & 1 & 2 \\
0 & 0 & 1 & -1
\end{array} \right]
That is, it is in row echelon form.
At the end of the algorithm, if the Gauss–Jordan elimination(zeros under and above the leading 1) is applied:
\left[ \begin{array}{ccc|c}
1 & 0 & 0 & 2 \\
0 & 1 & 0 & 3 \\
0 & 0 & 1 & -1
\end{array} \right]
That is, it is in reduced row echelon form, or row canonical form.

No hay comentarios:

Publicar un comentario