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

Cmloegcmluin (talk | contribs)
m null-space: clarification
Cmloegcmluin (talk | contribs)
null-space: anti-transpose
Line 503: Line 503:
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, vertically flip (let's call it v-flip) the matrix:
So here's our starting point, the meantone|magic comma basis:


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


Next, transpose the matrix. That means the first column becomes the first row, the second column becomes the second row, etc.
First, take its anti-transpose. Or in other words, flip it across its anti-diagonal, the terms coming out from the top-right corner (highlighted in blue here and in the previous matrix to help demonstrate):


<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
-1 & 4 & -4 \\
5 & -1 & \color{blue}-10 \\
5 & -1 & -10
-1 & \color{blue}4 & -4
\end{array} \right]
\end{array} \right]
</math>
</math>
Line 526: Line 526:
<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
5 & -1 & -10 \\
-1 & 4 & -4 \\
-1 & 4 & -4 \\
5 & -1 & -10 \\
\hline
\hline
1 & 0 & 0 \\
1 & 0 & 0 \\
Line 539: Line 539:
<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
5 & -1 & -30 \\
-1 & 4 & 0 \\
-1 & 4 & 0 \\
5 & -1 & -30 \\
\hline
\hline
1 & 0 & -4 \\
1 & 0 & -4 \\
Line 550: Line 550:


\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
5 & 19 & -30 \\
-1 & 0 & 0 \\
-1 & 0 & 0 \\
5 & 19 & -30 \\
\hline
\hline
1 & 4 & -4 \\
1 & 4 & -4 \\
Line 561: Line 561:


\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
5 & 19 & -570 \\
-1 & 0 & 0 \\
-1 & 0 & 0 \\
5 & 19 & -570 \\
\hline
\hline
1 & 4 & -76 \\
1 & 4 & -76 \\
Line 572: Line 572:


\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
5 & 19 & \color{lime}0 \\
-1 & 0 & \color{lime}0 \\
-1 & 0 & \color{lime}0 \\
5 & 19 & \color{lime}0 \\
\hline
\hline
1 & 4 & \color{green}44 \\
1 & 4 & \color{green}44 \\
Line 591: Line 591:
</math>
</math>


Transpose it:
Anti-transpose it:
 
<math>
\left[ \begin{array} {rrr}
44 & 30 & 19
\end{array} \right]
</math>
 
And finally, horizontally flip it (let's call this an h-flip):


<math>
<math>
Line 609: Line 601:
And ta-da! You’ve found a mapping-row basis from a comma basis, and it is {{vector|{{map|19 30 44}}}}. In other words, you've found a mapping-row 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 mapping-row.
And ta-da! You’ve found a mapping-row basis from a comma basis, and it is {{vector|{{map|19 30 44}}}}. In other words, you've found a mapping-row 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 mapping-row.


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 Gauss-Jordan 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.
So why the anti-transpose sandwich? What we (and everyone) want in a canonical mapping is to have a triangle of zeros in the bottom left corner. What we want in a comma basis is also to have a triangle of zeros in the bottom left corner. But the comma basis is on the other side of duality from the mapping, so it must be transposed before we can apply our nullSpaceBasis[] function to it, because that function is designed for mappings. But when we transpose the comma basis we end up with the triangle of zeros in the top right. If we take the null-space of that and then transpose it back again, we don't get our canonical form of the mapping, we get a mapping with a triangle of zeros in the top right. The way to fix this is to anti-transpose instead of transpose, before and after taking the null-space. Because when you anti-transpose the comma basis, you still turn columns into rows, but this time the triangle of zeros stays on the bottom left.


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:
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 anti-transposed comma basis:


{| class="wikitable"
{| class="wikitable"
Line 641: Line 633:




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 anti-transpose. Just start at the augmentation step:


<math>
<math>