Douglas Blumeyer's RTT How-To: Difference between revisions
Cmloegcmluin (talk | contribs) →canonical form: wolfram computable notebook shared link |
Cmloegcmluin (talk | contribs) →null-space: wolfram language computable notebook link for null-space |
||
Line 609: | Line 609: | ||
And ta-da! You’ve found a map basis from a comma basis, and it is {{vector|{{map|19 30 44}}}}. In other words, you've found a map basis which is a row-basis for the mapping row-space of the same temperament for which the comma basis we started with is a basis for the null-space. Feel free to try this with any other combination of two commas tempered out by this map. | And ta-da! You’ve found a map basis from a comma basis, and it is {{vector|{{map|19 30 44}}}}. In other words, you've found a map basis which is a row-basis for the mapping row-space of the same temperament for which the comma basis we started with is a basis for the null-space. Feel free to try this with any other combination of two commas tempered out by this map. | ||
So why why did we need to do those extra reversals at the beginning and end? Besides, I never said we ''must'' find get the zeroes in the top half on the top right of the augmented matrix when doing column Gaussian elimination, so wasn't rearranging the columns pointless? Well, the reason I told you to do it was because if you're going to adapt this process to a math program like Wolfram Alpha or perhaps even general computer code, you ''will'' need that step, because the way the null-space algorithm is implemented, it ''will'' try to get those zeroes on the right. So I understand this is a bit of a hand-wavy answer, and perhaps one day someone else can edit this with harder facts. But based on observation, if you do not do the reversing, you end up with an incorrect answer, and in particular, it has got zeroes on the wrong side of the matrix than you would expect. Unfortunately, to the best of my Wolfram Alpha ability, I'm unable to make the entire process work in one go | So why why did we need to do those extra reversals at the beginning and end? Besides, I never said we ''must'' find get the zeroes in the top half on the top right of the augmented matrix when doing column Gaussian elimination, so wasn't rearranging the columns pointless? Well, the reason I told you to do it was because if you're going to adapt this process to a math program like Wolfram Alpha or perhaps even general computer code, you ''will'' need that step, because the way the null-space algorithm is implemented, it ''will'' try to get those zeroes on the right. So I understand this is a bit of a hand-wavy answer, and perhaps one day someone else can edit this with harder facts. But based on observation, if you do not do the reversing, you end up with an incorrect answer, and in particular, it has got zeroes on the wrong side of the matrix than you would expect. | ||
Unfortunately, to the best of my Wolfram Alpha ability, I'm unable to make the entire process work in one go with Wolfram Alpha. Here is just the part where you take the null-space of the already v-flipped and transposed comma basis: | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 619: | Line 621: | ||
|{44,30,19} | |{44,30,19} | ||
|} | |} | ||
It is possible to do the entire operation with Wolfram Language in general, which you can play with in a Wolfram computable notebook: | |||
{| class="wikitable" | |||
|+Wolfram Language code ([https://www.wolframcloud.com/obj/7063aca4-1fb1-439a-9b0c-faf1cb6558b0 try it]) | |||
!input | |||
!output | |||
|- | |||
|<code>antiTranspose[m_] := Transpose[Reverse[m,{1,2}]]</code> | |||
<code>nullSpaceBasis[m_] := Transpose[Reverse[NullSpace[m]]]</code> | |||
<code>antiNullSpaceBasis[m_] := antiTranspose[nullSpaceBasis[antiTranspose[m]]]</code> | |||
<code>antiNullSpaceBasis[{{-4,-10},{4,-1},{-1,5}}]</code> | |||
|{19,30,44} | |||
|} | |||
Now the null-space function, to take you from {{vector|{{map|19 30 44}}}} back to the matrix, is pretty much the same thing, but simpler! No need to transpose or flip like that. Just start at the augmentation step: | Now the null-space function, to take you from {{vector|{{map|19 30 44}}}} back to the matrix, is pretty much the same thing, but simpler! No need to transpose or flip like that. Just start at the augmentation step: |