Defactoring algorithms: Difference between revisions

ArrowHead294 (talk | contribs)
m Hermite decomposition by hand: Arrays with {c} are much better at representing augmented matrices
ArrowHead294 (talk | contribs)
m Inversion by hand: Change to array format
Line 420: Line 420:


<math>
<math>
\left[ \begin{array} {l} \begin{matrix}
\left[ \begin{array} {ccc|ccc}
3 & -2 & 4 \\
3 & -2 & 4 1 & 0 & 0 \\
1 & 0 & 2 \\
1 & 0 & 2  &  0 & 1 & 0 \\
0 & 1 & 0 \\
0 & 1 & 0 0 & 0 & 1 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{matrix} \end{array} \right]
</math>
</math>


Line 436: Line 432:


<math>
<math>
\left[ \begin{array} {l} \begin{matrix}
\left[ \begin{array} {ccc|ccc}
1 & 0 & 2 \\
1 & 0 & 2 0 & 1 & 0 \\
0 & 1 & 0 \\
0 & 1 & & 0 & 0 & 1 \\
3 & -2 & 4 \\
3 & -2 & & 1 & 0 & 0 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
0 & 1 & 0 \\
0 & 0 & 1 \\
1 & 0 & 0 \\
\end{matrix} \end{array} \right]
</math>
</math>


Okay, now let's target the bottom-right entry. How can we make that 3 into a 0? Let's subtract the 1st row from the 3rd row 3 times:
Okay, now let's target the bottom-right entry. How can we make that 3 into a 0? Let's subtract the 1st row from the 3rd row 3 times:


<math>\left[ \begin{array} {l} \begin{matrix}
<math>\left[ \begin{array} {ccc|ccc}
\color{blue}1 & \color{blue}0 & \color{blue}2 \\
\color{blue}1 & \color{blue}0 & \color{blue}2 & \color{blue}0 & \color{blue}1 & \color{blue}0 \\
0 & 1 & 0 \\
0 & 1 & 0  &  0 & 0 & 1 \\
\color{red}0 & \color{red}-2 & \color{red}-2 \\
\color{red}0 & \color{red}-2 & \color{red}-2  & \color{red}1 & \color{red}-3 & \color{red}0 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
\color{blue}0 & \color{blue}1 & \color{blue}0 \\
0 & 0 & 1 \\
\color{red}1 & \color{red}-3 & \color{red}0 \\
\end{matrix} \end{array} \right]
</math>
</math>


Line 464: Line 452:
<math>
<math>
\left[ \begin{array} {l} \begin{matrix}
\left[ \begin{array} {l} \begin{matrix}
1 & 0 & 2 \\
1 & 0 & 2 &  0 & 1 & 0 \\
\color{blue}0 & \color{blue}1 & \color{blue}0 \\
\color{blue}0 & \color{blue}1 & \color{blue}0 \color{blue}0 & \color{blue}0 & \color{blue}1 \\
\color{red}0 & \color{red}0 & \color{red}-2 \\
\color{red}0 & \color{red}0 & \color{red}-2  &  \color{red}1 & \color{red}-3 & \color{red}2 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
0 & 1 & 0 \\
\color{blue}0 & \color{blue}0 & \color{blue}1 \\
\color{red}1 & \color{red}-3 & \color{red}2 \\
\end{matrix} \end{array} \right]
</math>
</math>


Line 478: Line 462:
<math>
<math>
\left[ \begin{array} {l} \begin{matrix}
\left[ \begin{array} {l} \begin{matrix}
\color{red}1 & \color{red}0 & \color{red}0 \\
\color{red}1 & \color{red}0 & \color{red}0 & \color{red}1 & \color{red}-2 & \color{red}2 \\
0 & 1 & 0 \\
0 & 1 & 0  &  0 & 0 & 1 \\
\color{blue}0 & \color{blue}0 & \color{blue}-2 \\
\color{blue}0 & \color{blue}0 & \color{blue}-2 & \color{blue}1 & \color{blue}-3 & \color{blue}2 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
\color{red}1 & \color{red}-2 & \color{red}2 \\
0 & 0 & 1 \\
\color{blue}1 & \color{blue}-3 & \color{blue}2 \\
\end{matrix} \end{array} \right]
</math>
</math>


Line 492: Line 472:
<math>
<math>
\left[ \begin{array} {l} \begin{matrix}
\left[ \begin{array} {l} \begin{matrix}
1 & 0 & 0 \\
1 & 0 & 0 &  1 & -2 & 2 \\
0 & 1 & 0 \\
0 & 1 & 0 &  0 & 0 & 1 \\
\color{red}0 & \color{red}0 & \color{red}1 \\
\color{red}0 & \color{red}0 & \color{red}1 & \color{red}-\frac12 & \color{red}\frac32 & \color{red}-1 \\
\end{matrix} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{matrix}
\end{array} \right]
1 & -2 & 2 \\
0 & 0 & 1 \\
\color{red}-\frac12 & \color{red}\frac32 & \color{red}-1 \\
\end{matrix} \end{array} \right]
</math>
</math>