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

From Robotics
Jump to: navigation, search
Line 1: Line 1:
{{Navigation|before=[[Determinant of a 4-by-4 matrix]]|overview=[[Matrix inversion|Vektorrechnung]]|next=[[Adjugate formula]]}}
+
{{Navigation|before=[[Determinant of a 4-by-4 matrix]]|overview=[[Matrix inversion|Vektorrechnung]]|next=[[Adjugate Formula]]}}
  
 
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/>

Revision as of 17:04, 9 May 2014

← Back: Determinant of a 4-by-4 matrix Overview: Vektorrechnung Next: Adjugate Formula

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

Example: Gauß-Jordan-Algorithm for a 4-by-4 matrix


\begin{align}
\mathbf{A}_e  = 
&\left[\begin{array}{cccc}
1 & 2 & 0 & 0\\
3 & 0 & 1 & 1\\
0 & 1 & 0 & 0\\
0 & 0 & 2 & 1
\end{array}\right]\\ \\
(\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]
\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}\\ \\
\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}