Difference between revisions of "Gauß-Jordan-Algorithm"

From Robotics
Jump to: navigation, search
(Created page with " The Gauß-Jordan-Algorithm was developed to solve systems of linear equations. But it can also be used to determine the inverse of an n-by-n square matrix. <br/><br/> The alg...")
 
Line 2: Line 2:
 
The Gauß-Jordan-Algorithm was developed to solve systems of linear equations. But it can also be used to determine the inverse of an n-by-n square matrix. <br/><br/>
 
The Gauß-Jordan-Algorithm was developed to solve systems of linear equations. But it can also be used to determine the inverse of an n-by-n square matrix. <br/><br/>
 
The algorithm is based on the formula <math>\mathbf{A}\mathbf{A}^{-1}=\mathbf{I}_n</math>. First the block matrix <math>(\mathbf{A}|\mathbf{I}_n)</math> is build. On this matrix the Gauß-Jordan-Algorithm is applied. By using various conversion steps like interchanging of rows and addtition of factorized rows to other rows the block matrix is converted so that the left block equals the identity matrix <math>\mathbf{I}_n</math>. The right block then corresponds to the inverse of <math>\mathbf{A}</math>.<br/><br/>
 
The algorithm is based on the formula <math>\mathbf{A}\mathbf{A}^{-1}=\mathbf{I}_n</math>. First the block matrix <math>(\mathbf{A}|\mathbf{I}_n)</math> is build. On this matrix the Gauß-Jordan-Algorithm is applied. By using various conversion steps like interchanging of rows and addtition of factorized rows to other rows the block matrix is converted so that the left block equals the identity matrix <math>\mathbf{I}_n</math>. The right block then corresponds to the inverse of <math>\mathbf{A}</math>.<br/><br/>
[[Datei:RobWiki_GaußJordanAlgorithm.png|Gauß-Jordan-Algorithm]]<br/><br/>
+
[[File:RobWiki_GaußJordanAlgorithm.png|Gauß-Jordan-Algorithm]]<br/><br/>
  
 
   <math>\begin{align}
 
   <math>\begin{align}

Revision as of 15:48, 9 May 2014

The Gauß-Jordan-Algorithm was developed to solve systems of linear equations. But it can also be used to determine the inverse of an n-by-n square matrix.

The algorithm is based on the formula \mathbf{A}\mathbf{A}^{-1}=\mathbf{I}_n. First the block matrix (\mathbf{A}|\mathbf{I}_n) is build. On this matrix the Gauß-Jordan-Algorithm is applied. By using various conversion steps like interchanging of rows and addtition of factorized rows to other rows the block matrix is converted so that the left block equals the identity matrix \mathbf{I}_n. The right block then corresponds to the inverse of \mathbf{A}.

Gauß-Jordan-Algorithm

 \begin{align}
(\mathbf{A}_e|\mathbf{I}_n) = 
&\left[\begin{array}{cccc|cccc}
1 & 2 & 0 & 0 & 1 & 0 & 0 & 0\\
3 & 0 & 1 & 1 & 0 & 1 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1
\end{array}\right]\\ \\
&\text{--------------------------------------------------------------------------------------}\\ \\
&\left[\begin{array}{cccc|cccc}
1 & 2 & 0 & 0 & 1 & 0 & 0 & 0\\
3 & 0 & 1 & 1 & 0 & 1 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1
\end{array}\right]
\begin{array}{c}
\\
\updownarrow\text{interchange row II and row III}\\
\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
1 & 2 & 0 & 0 & 1 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
3 & 0 & 1 & 1 & 0 & 1 & 0 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1
\end{array}\right]
\begin{array}{c}
\text{substract 2 times row II}\\
\\
\\
\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
1 & 0 & 0 & 0 & 1 & 0 & -2 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
3 & 0 & 1 & 1 & 0 & 1 & 0 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1
\end{array}\right]
\begin{array}{c}
\\
\\
\text{substract 3 times row I}\\
\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
1 & 0 & 0 & 0 & 1 & 0 & -2 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 1 & 1 & -3 & 1 & 6 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1
\end{array}\right]
\begin{array}{c}
\\
\\
\updownarrow\text{interchange row III and row IV}\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
1 & 0 & 0 & 0 & 1 & 0 & -2 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 2 & 1 & 0 & 0 & 0 & 1\\
0 & 0 & 1 & 1 & -3 & 1 & 6 & 0
\end{array}\right]
\begin{array}{c}
\\
\\
\text{substract row IV}\\
\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
1 & 0 & 0 & 0 & 1 & 0 & -2 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 1 & 0 & 3 & -1 & -6 & 1\\
0 & 0 & 1 & 1 & -3 & 1 & 6 & 0
\end{array}\right]
\begin{array}{c}
\\
\\
\\
\text{substract row III}\\
\end{array}\\
&\qquad\qquad\quad\quad\Downarrow\\
&\left[\begin{array}{cccc|cccc}
{\color{Green}\mathbf{1}} & 0 & 0 & 0 & 1 & 0 & -2 & 0\\
0 & {\color{Green}\mathbf{1}} & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & {\color{Green}\mathbf{1}} & 0 & 3 & -1 & -6 & 1\\
0 & 0 & 0 & {\color{Green}\mathbf{1}} & -6 & 2 & 12 & -1
\end{array}\right]\\ 
&\qquad\quad\mathbf{I}_n\qquad\qquad\qquad\mathbf{A}_e^{-1}\\ \\
&\text{--------------------------------------------------------------------------------------}\\ \\
\mathbf{A}_e^{-1}  = 
&\left[\begin{array}{cccc}
1 & 0 & -2 & 0\\
0 & 0 & 1 & 0\\
3 & -1 & -6 & 1\\
-6 & 2 & 12 & -1
\end{array}\right]
\end{align}