Defactoring: Difference between revisions

Cmloegcmluin (talk | contribs)
Cmloegcmluin (talk | contribs)
Line 468: Line 468:


<math>\left[ \begin{array} {rrr}
<math>\left[ \begin{array} {rrr}
3 & -2 & 4 \\
3 & -2 & 4 \\
1 & 0 & 2 \\
1 & 0 & 2 \\
0 & 1 & 0 \\
0 & 1 & 0 \\
\end{array} \right]</math>
\end{array} \right]</math>


Line 478: Line 476:


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


Line 496: Line 490:


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


Line 512: Line 502:


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


Line 528: Line 514:


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


Line 544: Line 526:


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


Line 560: Line 538:


<math>\left[ \begin{array} {l} \begin{array} {rrr}
<math>\left[ \begin{array} {l} \begin{array} {rrr}
1 & 0 & 0 \\
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
0 & 0 & 1 \\
\end{array} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{array} {r}
1 & -2 & 2 \\
0 & 0 & 1 \\
-\frac12 & \frac32 & -1 \\
\end{array} \end{array} \right]</math>
As with the Hermite decomposition, we have a convenient way to check our work at the end, which involves matrix multiplication. With Hermite, we verified that left-multiplying our original matrix by the unimodular matrix resulted in the HNF. With inversion, we verify that left-multiplying<ref>or right-multiplying, in this case; it doesn't matter</ref> our original matrix by the inverse results in the identity matrix. And indeed:
<math>\begin{array} {1}
\left[ \begin{array} {rrr}
3 & -2 & 4 \\
1 & 0 & 2 \\
0 & 1 & 0 \\
\end{array} \right]


\end{array} & \rule[-7.5mm]{0.375mm}{18mm} & \begin{array} {r}
& × &  


\left[ \begin{array} {rrr}
1 & -2 & 2 \\
1 & -2 & 2 \\
0 & 0 & 1 \\
0 & 0 & 1 \\
-\frac12 & \frac32 & -1 \\
-\frac12 & \frac32 & -1 \\
\end{array} \right]
& = &


\end{array} \end{array} \right]</math>
\left[ \begin{array} {rrr}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array} \right]
 
\end{array} </math>


I chose this matrix specifically to demonstrate the importance of the unimodularity of the other matrix produced by the Hermite decomposition. A unimodular matrix is defined by having a determinant of ±1. And what does this have to do with inverses? Well, take a look at the determinant of our original matrix here, {{vector|{{map|3 -2 4}} {{map|1 0 2}} {{map|0 1 0}}}}. It's 2. The determinant of an invertible matrix will tell you what the LCM of all the denominators in the inverse will be<ref>If you're familiar with the formula for the Moore-Penrose pseudoinverse of rectangular matrices, you may recognize this fact as akin to how you multiply the outside of the pseudoinverse by the reciprocal of the determinant of the matrix.</ref><ref>This may also shed some light on the fact that the only square matrices that are not invertible are those with determinants equal to 0.</ref> And so, the fact that the other matrix produced by the Hermite decomposition is unimodular means that not only is it invertible, if it has only integer terms (which it will, being involved in HNF), then its inverse will also have only integer terms. And this is important because the inverse of a Hermite unimodular matrix is just one step away from the defactored form of an input matrix.
I chose this matrix specifically to demonstrate the importance of the unimodularity of the other matrix produced by the Hermite decomposition. A unimodular matrix is defined by having a determinant of ±1. And what does this have to do with inverses? Well, take a look at the determinant of our original matrix here, {{vector|{{map|3 -2 4}} {{map|1 0 2}} {{map|0 1 0}}}}. It's 2. The determinant of an invertible matrix will tell you what the LCM of all the denominators in the inverse will be<ref>If you're familiar with the formula for the Moore-Penrose pseudoinverse of rectangular matrices, you may recognize this fact as akin to how you multiply the outside of the pseudoinverse by the reciprocal of the determinant of the matrix.</ref><ref>This may also shed some light on the fact that the only square matrices that are not invertible are those with determinants equal to 0.</ref> And so, the fact that the other matrix produced by the Hermite decomposition is unimodular means that not only is it invertible, if it has only integer terms (which it will, being involved in HNF), then its inverse will also have only integer terms. And this is important because the inverse of a Hermite unimodular matrix is just one step away from the defactored form of an input matrix.