Douglas Blumeyer's RTT How-To: Difference between revisions

Cmloegcmluin (talk | contribs)
normal → canonical
Cmloegcmluin (talk | contribs)
h-flip and v-flip
Line 501: Line 501:
And interestingly enough, as you'll soon see, the process is almost the same to take the null-space as it is to undo it.
And interestingly enough, as you'll soon see, the process is almost the same to take the null-space as it is to undo it.


Working this out by hand goes like this (it is a standard linear algebra operation, so if you're comfortable with it already, you can skip this and other similar parts of these materials):
Working this out by hand goes like this (it is a standard linear algebra operation, so if you're comfortable with it already, you can skip this and other similar parts of these materials).


First, transpose the matrix. That means the first column becomes the first row, the second column becomes the second row, etc.
First, vertically flip (let's call it v-flip) the matrix:


<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
-4 & 4 & -1 \\
-1 & 5 \\
-10 & -1 & 5
4 & -1 \\
-4 & -10 \\
\end{array} \right]
\end{array} \right]
</math>
</math>


Now, reverse each row.
Next, transpose the matrix. That means the first column becomes the first row, the second column becomes the second row, etc.


<math>
<math>
Line 598: Line 599:
</math>
</math>


And reverse it:
And finally, horizontally flip it (let's call this an h-flip):


<math>
<math>
Line 608: 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 (it is possible with Wolfram Language in general, which you can play with in a Wolfram computable notebook), so here is just the part where you take the null-space of the already transposed and reversed comma basis:
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 (it is possible with Wolfram Language in general, which you can play with in a Wolfram computable notebook<ref>To try this out, visit https://www.wolframcloud.com/ and input <code>{{-4,-10},{4,-1},{-1,5}} // Reverse // Transpose // NullSpace // Transpose // Reverse // Transpose</code></ref>), so 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 620:
|}
|}


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 reverse 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:


<math>
<math>