Defactoring: Difference between revisions
Cmloegcmluin (talk | contribs) →by hand: HNF and inverse by hand |
Cmloegcmluin (talk | contribs) |
||
| Line 569: | Line 569: | ||
===== putting it all together ===== | ===== putting it all together ===== | ||
In the Wolfram Language algorithm described above, the input matrix is first transposed and then Hermite decomposed. In fact, this is due to a limitation of the built-in <code>HermiteDecomposition[]</code> function in Wolfram Language. The HNF is well understood both in its more common and default row-style as well as a column-style, so it might be expected for Wolfram Language to provide an option for the <code>HermiteDecomposition[]</code> function to perform it by columns. The transposition our code does is a workaround for this lack. | In the Wolfram Language algorithm described above, the input matrix is first transposed and then Hermite decomposed. In fact, this is due to a limitation of the built-in <code>HermiteDecomposition[]</code> function in Wolfram Language. The HNF is well understood both in its more common and default row-style as well as a column-style, so it might be expected for Wolfram Language to provide an option for the <code>HermiteDecomposition[]</code> function to perform it by columns. The transposition our code does is a workaround for this lack. | ||
When doing a column-style Hermite decomposition by hand, we have two options. The first option is to mimic what we're doing in the code: transpose the matrix, and then do a Hermite decomposition as demonstrated above. The second option would be to augment the matrix to the bottom (instead of to the right), then use elementary column operations instead of elementary row operations (such that it looks more similar to the process for computing the null-space by hand). Here, we'll be demonstrating the first option, because we might as well follow the same approach as the code unless we have a compelling reason not to, and we don't: if we rotate everything 90 degrees like this, we have to learn to recognize the ### | |||
Because column-style Hermite decomposition is | Because column-style Hermite decomposition is | ||