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

Cmloegcmluin (talk | contribs)
wedge, vee, meet, join, union, intersection, breed, cross
Cmloegcmluin (talk | contribs)
→multimaps: minors
Line 1,158: Line 1,158:
# Convert each of those combinations to a square <span><math>r×r</math></span> matrix by slicing a column for each prime out of the map basis and putting them together.
# Convert each of those combinations to a square <span><math>r×r</math></span> matrix by slicing a column for each prime out of the map basis and putting them together.
# Take each matrix's determinant.
# Take each matrix's determinant.
# Set the results inside <span><math>r</math></span> brackets
# Set the results inside <span><math>r</math></span> brackets.


And you've got your multimap!
And you've got your multimap!
Another way to think about this is that you've found all of the '''[https://en.wikipedia.org/wiki/Minor_(linear_algebra) minors]''' of the matrix, where a minor is the determinant of a square submatrix. So we can think of multimaps as lists of minors.


Now, if you want the canonical multimap, two further steps are required:
Now, if you want the canonical multimap, two further steps are required:
Line 1,209: Line 1,211:


So just set these inside a number brackets equal to the rank, and we’ve got {{multicovector|1 4 4}}.
So just set these inside a number brackets equal to the rank, and we’ve got {{multicovector|1 4 4}}.
Wolfram Alpha won't be able to put the answer in brackets for you, but it can calculate the list of minors at least. The only trick is that you have to tell it the rank of your matrix as the second argument:
{| class="wikitable"
|+WolframAlpha code ([https://www.wolframalpha.com/input/?i=Minors%5B%7B%7B1%2C0%2C-4%7D%2C%7B0%2C1%2C4%7D%7D%2C+2%5D try it])
!input
!output
|-
|<code>Minors[{{1,0,-4},{0,1,4}}, 2]</code>
|<nowiki>{{1, 4, 4}}</nowiki>
|}


Let's go for the canonical multimap. The first term is positive, so no sign changes are necessary. And these have no GCD, or in other words, their GCD is 1. So we're already there.
Let's go for the canonical multimap. The first term is positive, so no sign changes are necessary. And these have no GCD, or in other words, their GCD is 1. So we're already there.


This method even works on an equal temperament, e.g. {{map|12 19 28}}. The rank is 1 so each combination of primes has only a single prime: they’re <span><math>(2)</math></span>, <span><math>(3)</math></span>, and <span><math>(5)</math></span>. The square matrices are therefore <span><math>\begin{bmatrix}12\end{bmatrix} \begin{bmatrix}19\end{bmatrix} \begin{bmatrix}28\end{bmatrix}</math></span>. The determinant of a 1×1 matrix is defined as the value of its single term, so now we have 12 19 28. <span><math>r</math></span> = 1, so we set the answer inside one layer of brackets, so our monocovector is {{map|12 19 28}}. Going for the canonical multimap, we check that the leading term is positive, and no GCD. Both yes. So, this looks the same as what we started with, which is fine.
This method even works on an equal temperament, e.g. {{map|12 19 28}}. The rank is 1 so each combination of primes has only a single prime: they’re <span><math>(2)</math></span>, <span><math>(3)</math></span>, and <span><math>(5)</math></span>. The square matrices are therefore <span><math>\begin{bmatrix}12\end{bmatrix} \begin{bmatrix}19\end{bmatrix} \begin{bmatrix}28\end{bmatrix}</math></span>. The determinant of a 1×1 matrix is defined as the value of its single term, so now we have 12 19 28. <span><math>r</math></span> = 1, so we set the answer inside one layer of brackets, so our monocovector is {{map|12 19 28}}.  
 
{| class="wikitable"
|+WolframAlpha code ([https://www.wolframalpha.com/input/?i=Minors%5B%7B%7B12%2C19%2C28%7D%7D%2C+1%5D try it])
!input
!output
|-
|<code>Minors[<nowiki>{{12,19,28}}</nowiki>, 1]</code>
|<nowiki>{{12, 19, 28}}</nowiki>
|}
 
Going for the canonical multimap, we check that the leading term is positive, and no GCD. Both yes. So, this looks the same as what we started with, which is fine.


Let’s try a slightly harder example now: a rank-3 temperament, and in the 7-limit. There are four different ways to take 3 of 4 primes: <span><math>(2,3,5)</math></span>, <span><math>(2,3,7)</math></span>, <span><math>(2,5,7)</math></span>, and <span><math>(3,5,7)</math></span>.
Let’s try a slightly harder example now: a rank-3 temperament, and in the 7-limit. There are four different ways to take 3 of 4 primes: <span><math>(2,3,5)</math></span>, <span><math>(2,3,7)</math></span>, <span><math>(2,5,7)</math></span>, and <span><math>(3,5,7)</math></span>.
Line 1,255: Line 1,279:


In natural language, that’s each element of the first row times the determinant of the square matrix from the other two columns and the other two rows, summed but with an alternating pattern of negation beginning with positive. If you ever need to do determinants of matrices bigger than 3×3, see [https://www.mathsisfun.com/algebra/matrix-determinant.html this webpage]. Or, you can just use an online calculator.
In natural language, that’s each element of the first row times the determinant of the square matrix from the other two columns and the other two rows, summed but with an alternating pattern of negation beginning with positive. If you ever need to do determinants of matrices bigger than 3×3, see [https://www.mathsisfun.com/algebra/matrix-determinant.html this webpage]. Or, you can just use an online calculator.
And so our results are <span><math>-2</math></span>, <span><math>3</math></span>, <span><math>1</math></span>, <span><math>-11</math></span>. Set these inside triply-nested brackets, because it’s a trimap for a rank-3 temperament, and we get {{multicovector|rank=3|-2 3 1 -11}}.


{| class="wikitable"
{| class="wikitable"
|+WolframAlpha code ([https://www.wolframalpha.com/input/?i=Determinant%5B%7B%7B1%2C0%2C1%7D%2C%7B0%2C1%2C1%7D%2C%7B0%2C0%2C-2%7D%7D%5D try it])
|+WolframAlpha code ([https://www.wolframalpha.com/input/?i=Minors%5B%7B%7B1%2C0%2C1%2C4%7D%2C%7B0%2C1%2C1%2C-1%7D%2C%7B0%2C0%2C-2%2C3%7D%7D%2C+3%5D try it])
!input
!input
!output
!output
|-
|-
|<code>Determinant[{{1,0,1},{0,1,1},{0,0,-2}}]</code>
|<code>Minors[{{1,0,1,4},{0,1,1,-1},{0,0,-2,3}}, 3]</code>
|<nowiki>-2</nowiki>
|<nowiki>{{-2, 3, 1, -11}}</nowiki>
|}
|}
And so our results are <span><math>-2</math></span>, <span><math>3</math></span>, <span><math>1</math></span>, <span><math>-11</math></span>. Set these inside triply-nested brackets, because it’s a trimap for a rank-3 temperament, and we get {{multicovector|rank=3|-2 3 1 -11}}.


Now for canonical form. We need the first term to be positive; this doesn’t make a difference in how things behave, but is done because it canonicalizes things (we could have found the result where the first term came out positive by simply changing the order of the rows of our map basis, which doesn’t affect how it works as a mapping at all, or mean there's anything different about the temperament). And so we change the signs<ref>If it helps you, you could think of this sign-changing step as paired with the GCD extraction step, if you think of it like extracting a GCD of -1.</ref>, and our list ends up as <span><math>2</math></span>, <span><math>-3</math></span>, <span><math>-1</math></span>, <span><math>11</math></span>. There's no GCD to extract. So now we have {{multicovector|rank=3|2 -3 -1 11}}.
Now for canonical form. We need the first term to be positive; this doesn’t make a difference in how things behave, but is done because it canonicalizes things (we could have found the result where the first term came out positive by simply changing the order of the rows of our map basis, which doesn’t affect how it works as a mapping at all, or mean there's anything different about the temperament). And so we change the signs<ref>If it helps you, you could think of this sign-changing step as paired with the GCD extraction step, if you think of it like extracting a GCD of -1.</ref>, and our list ends up as <span><math>2</math></span>, <span><math>-3</math></span>, <span><math>-1</math></span>, <span><math>11</math></span>. There's no GCD to extract. So now we have {{multicovector|rank=3|2 -3 -1 11}}.