Jekyll2019-05-19T05:33:10+00:00http://mitchgordon.me/feed.xmlMitchell A. GordonIntelligence, math, computing, and enough philosophy to stop doing philosophyThe Non-Existence of The Abstract Plane2019-05-12T00:00:00+00:002019-05-12T00:00:00+00:00http://mitchgordon.me/philosophy/2019/05/12/non-existence-of-abstract-plane<p>I mostly think about abstract ideas. I study machine learning and natural
language processing, so I spend all day learning calculus and linear algebra
(abstract) to try to teach computers what the word “happy” means (also
abstract). That way, when you ask Siri or Alexa to find you a happy family
photo, they’ll actually be able to do it.</p>
<p>Most of my problems come from the fact that these things are abstract, and
therefore hard to define. For example, to teach a computer what “happy” means,
first you have to be able to define “happy” in terms of numbers and pixels.
This is non-trivial. Some might say it’s impossible; “happy” is too abstract to
really define concretely. It’s an idea that lives in the “abstract plane.” (And
yet you could probably find me a happy photo if you tried.)</p>
<blockquote>
<p>For a large class of cases … it can be explained thus: the meaning of a word
is its use in the language.<br />
- Ludwig Wittgenstein</p>
</blockquote>
<p>Similarly, mathematical abstractions caused me a lot of headaches. I never
seemed to be able to ground myself when talking about mathematics; it felt like
math also existed in the “abstract plane” - outside of the real, physical
universe - where the rules constantly changed depending on the context. Example:
<script type="math/tex">\frac{d}{dx}f(x)</script> means the derivative of a function <script type="math/tex">f(x)</script>. But then, at
some point in school, people started <a href="https://math.stackexchange.com/questions/47092/physicists-not-mathematicians-can-multiply-both-sides-with-dx-why">multiplying both
sides</a>
of an equation by <script type="math/tex">dx</script>. What the hell? What does that mean? Why was that
allowed?</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/find_x.jpg" />
<h6>A valid proof if I've ever seen one.</h6>
</div>
<p>This post is about the most helpful thing I’ve done in my studies: throw out the
“abstract plane.” I don’t think it exists. In fact, I think it’s a lazy,
non-scientific way of thinking, and getting rid of it has been the only way I’ve
been able to distinguish sense from nonsense when talking about math and
language.</p>
<p>I’m about to get pretty pedantic about what I mean by “abstract” here, so a
little thought experiment might make things clearer.</p>
<h2 id="the-copy-universe-thought-experiment">The Copy-Universe Thought Experiment</h2>
<p>Imagine we want to make a simulated copy of our universe. We want our copy-universe to behave
exactly like the original, so that in 10 seconds, or 10 days, both the universes
are still indistinguishable. What do we need to copy?</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/mirror_planet.jpg" />
<h6>Source - <a href="https://www.theonion.com/astronomers-discover-planet-identical-to-earth-with-orb-1819577220">The Onion</a></h6>
</div>
<p>Well, from high-school chemistry we know that everything in the universe is made
out of matter, so we’ll probably need that. So we can copy all the atoms and
molecules exactly. You know, the wood molecules stuck together to form your
kitchen table, the oxygen atoms bouncing off your skin, etc.</p>
<p>Is that all we need? Well, I suppose we’ll also need to keep track of energy
levels, right? How fast are the particles are moving and what direction are they
moving in? We’d also probably want to copy light, too. (Or is light matter?
Photons are like waves and particles, right? Whatever. )</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/molecules.jpg" />
<h6>Source - <a href="https://www6.slac.stanford.edu/news/2015-04-01-scientists-track-ultrafast-creation-catalyst-x-ray-laser.aspx">Stanford</a></h6>
</div>
<p>Anyway, here’s the million dollar question:</p>
<h4 id="is-there-some-abstract-plane-that-i-also-need-to-copy-to-my-copy-universe">Is there some “abstract plane” that I also need to copy to my copy-universe?</h4>
<p>How would we even do that? We already copied everything we could think of. What’s left?
If the abstract plane really never interacts with the physical universe, then it
should equally never interact with our simulated copy-universe. So why do we need it?</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/galileo.jpg" />
<h6>Definitely knows about triangles. By <a href="https://en.wikipedia.org/wiki/en:Justus_Sustermans" class="extiw" title="w:en:Justus Sustermans">Justus Sustermans</a> - <a rel="nofollow" class="external free" href="http://www.nmm.ac.uk/mag/pages/mnuExplore/PaintingDetail.cfm?ID=BHC2700">Link</a>, Public Domain, <a href="https://commons.wikimedia.org/w/index.php?curid=230543">Link</a></h6>
</div>
<p>Consider: if I make a perfect physical copy of Galileo, but I “forget” the
abstract plane, it’s not like Galileo won’t know what a triangle is anymore. His
brain, which is made out of atoms and neurons, which we copied, will still be
exactly the same, and Galileo will do his usual Galileo things. He’ll still be
able to walk around, breathe, and talk about triangles. There’s no reason to
believe there’s some special property of his brain that would behave differently
in the presence of an abstract plane. His brain is just a machine, with wet
cogs. It’s just atoms, moving in accordance with the usual laws of physics.<sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup></p>
<p>So the abstract idea of “triangles” doesn’t really live in the abstract plane;
it lives in the physical brains / neural circuits of everyone who knows what a
triangle is and can name them.</p>
<p>You can tell I’m kind of waving my hands with the physics here. There’s probably
all sorts of things I’ve missed (dark matter, quantum effects, etc.). But I’ll
leave the quantum theory to the physicists. For my intents and purposes,
thinking about brains and stuff, I’ll answer with a resounding no, we don’t have
to worry about the abstract plane.</p>
<h2 id="practical-physicalism">Practical Physicalism</h2>
<p>So what’s the alternative? How should we think about abstract things? Ideally,
any new idea we encounter should be broken down in terms of our existing model
of how the world works. This is <a href="https://fs.blog/2018/04/first-principles/">first
principles</a> thinking, where you
maintain a core set of fundamental knowledge and build up all other concepts on
top of those. Abstract ideas shouldn’t be an exception, they should be included
in our single, unified model of How Things Work. If we let them live in the
“abstract plane” where anything goes, we stop being able to apply reason and
common-sense to them.</p>
<div style="text-align: center">
<iframe width="317" height="200" src="https://www.youtube.com/embed/NV3sBlRgzTI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<h6>Richard Feynman and Elon Musk love this type of thinking. </h6>
</div>
<p>But what should that core set be? For me, talking about brains and happiness and
stuff, classical physics is good enough. At the end of the day, everything that
matters to me can be conceptualized as groups of atoms or the movement of atoms
over time. This is very close to Stephen Wolfram’s <a href="https://www.wolframscience.com/nks/">new kind of
science</a>, where everything in the natural
world can be viewed as a mechanistic computation. The universe is a machine,
whose parts follow some basic rules through time. It’s also very close to the
philosophy of <a href="https://plato.stanford.edu/entries/physicalism/">physicalism</a>,
which asserts that everything is physically manifested.</p>
<p>Physicalism makes some bold claims about <em>everything</em>, which I can’t really
support. Instead, I use what I’ve been calling <strong>Practical Physicalism</strong>:
everything that matters <em>to me</em> must be physically manifested. Here’s a simple
litmus test for whether something is physically manifested:</p>
<p>Can you touch it, see it, or otherwise sense it? If not, could you
theoretically build a device that would let you measure / observe it
indirectly? If so, that thing is physically manifested and worth discussing.</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/telescope.jpg" />
<h6>Source - <a href="https://www.pinterest.com/pin/373376625333051908/">Pinterest</a></h6>
</div>
<p>It’s a very practical definition, hence the name. And to me, it makes a lot of
sense. If something is truly “abstract,” and you can never see it, touch it, or
observe it, even indirectly or theoretically… if it never impacts your world,
even minutely, then why should you care about it? If something is truly
abstract, it’s not worth discussing, because it will never impact any event in
your life.</p>
<p>This forces us to define abstract things concretely, in terms of physics, rather
than letting them be some ethereal non-existence. Even if the only physical
manifestation is some esoteric neural circuit in your brain, that can’t be
observed any other way than cracking open your skull and measuring the
electrical potentials.</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/concreteness_dog.png" />
<h6>Source - <a href="https://www.aclweb.org/anthology/N18-1199">Quantifying the visual concreteness of words and topics
in multimodal datasets</a></h6>
</div>
<p>It also allows us to start thinking about <em>how</em> concrete or abstract things are.
For example, check out <a href="https://www.aclweb.org/anthology/N18-1199">this paper</a>
on operationalizing and quantifying “abstract-ness” and “concreteness” for
specific machine learning datasets that are grounded in pictures. That might
help us solve our “happiness” problem.</p>
<p>So I’ve said that this way of thinking has really helped me come to terms with
math and language, but I haven’t said <em>how</em>. That’s a longer discussion, so I
think I’ll save it for another post.</p>
<blockquote>
<p>All models are wrong, but some are useful. - George Box</p>
</blockquote>
<p>And yes, all models are wrong. But I think this model of thinking is very useful,
especially in a field like machine learning and natural language processing where
all we do is think about thinking. Dispelling the “abstract plane” idea early on
will benefit everyone, I think.</p>
<p>- Mitchell</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:1">
<p>What if brains <em>are</em> special? That is, they don’t obey the normal laws of
physics, like gravity? Well, then maybe we could call that effect the
“abstract plane,” and say that its observable, physical manifestation is to
subvert gravity (or electromechanics etc.) to make our brains behave
differently than normal physical systems. This would be fine. We can update
the physics textbooks. My problem isn’t the existence or non-existence of
the abstract plane, but its usage as an excuse to do lazy science /
engineering. <a href="#fnref:1" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>I mostly think about abstract ideas. I study machine learning and natural language processing, so I spend all day learning calculus and linear algebra (abstract) to try to teach computers what the word “happy” means (also abstract). That way, when you ask Siri or Alexa to find you a happy family photo, they’ll actually be able to do it.People Used to Be Computers2019-05-10T00:00:00+00:002019-05-10T00:00:00+00:00http://mitchgordon.me/programming/2019/05/10/people-were-computers<p>Did you know people used to be computers? Yeah, back in the day, before we had
calculators or CPUs, people still needed to crunch the numbers. For example,
NASA, when they were building rockets, needed to run all kinds of numbers to
make things work. So they would actually employ people to sit down with a pencil
and paper and do the additions and multiplications necessary to solve their
physics equations. ( That’s what <a href="https://en.wikipedia.org/wiki/Hidden_Figures">Hidden
Figures</a> is about, I think. )</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/human_computers.jpg" />
<h6>By NACA (NASA) - Dryden Flight Research Center Photo Collection - <a rel="nofollow" class="external free" href="http://www.dfrc.nasa.gov/Gallery/Photo/Places/HTML/E49-54.html">http://www.dfrc.nasa.gov/Gallery/Photo/Places/HTML/E49-54.html</a>, Public Domain, <a href="https://commons.wikimedia.org/w/index.php?curid=885426">Link</a></h6>
</div>
<p>Similarly, programming used to mean setting a schedule for, like, a play or
something. It still does, really. So programming a computer, at the time, meant
setting a schedule for some person to do a bunch of rote arithmetic (additions
and multiplications). And then when they were done, you used their answer to
build your spaceship.</p>
<div style="text-align: center">
<img widht="200px" height="200px" src="http://mitchgordon.me/assets/program.jpg" />
<h6>By <a href="//commons.wikimedia.org/wiki/User:Mindspillage" title="User:Mindspillage">Kat Walsh</a> - <span class="int-own-work" lang="en">Own work</span>, <a href="http://creativecommons.org/licenses/by-sa/3.0/" title="Creative Commons Attribution-Share Alike 3.0">CC BY-SA 3.0</a>, <a href="https://commons.wikimedia.org/w/index.php?curid=2549398">Link</a></h6>
</div>
<p>This is still true. Except now the computers aren’t people any more. They’re
robots. And when you program the robot, you basically give it a schedule of
additions and multiplications to perform. What those numbers end up meaning,
when the robot spits out the answer, is up to you.</p>
<p>I think this is the nicest way to describe what programming is to new people.
You can even keep the analogy around when you’re talking about more advanced
concepts. Consider runtime analysis: if I tell my computer (person) to solve a
problem using this program (or step by step schedule of arithmetic), will it take
them more or less time than if I give them a different program (schedule)?</p>
<p>Or try abstractions and system design: if I have a <em>really</em> long program
(schedule), it might get confusing for my computer (person) and me to keep track
of what everything means. (Why were we doing this addition on line 455 again?)
Abstraction is just figuring out how to break up that program (schedule) into
logical chunks, to make it easier for both of us to keep track of what’s going
on. And if we’re lucky, we can re-use some of those chunks, so the whole schedule
becomes shorter.</p>
<p>I could probably keep going all day, but last one: concurrency and distributed
systems. What if I hired ten people instead of one? Could I get my answer faster?
How would I have to change my program (schedule), so that everyone works together
without duplicating work? Is it even possible?</p>
<p>So yeah, next time you teach middleschoolers how to code, try this analogy. I think
it’s nice.</p>
<p>- Mitchell</p>Did you know people used to be computers? Yeah, back in the day, before we had calculators or CPUs, people still needed to crunch the numbers. For example, NASA, when they were building rockets, needed to run all kinds of numbers to make things work. So they would actually employ people to sit down with a pencil and paper and do the additions and multiplications necessary to solve their physics equations. ( That’s what Hidden Figures is about, I think. )The Importance of Not Taking Math Too Seriously2019-05-09T00:00:00+00:002019-05-09T00:00:00+00:00http://mitchgordon.me/math/2019/05/09/the-importance-of-not-taking-math-too-seriously<p>I used to take math really seriously. As a student, I worried about getting the
“right” answer or figuring out the “right” way to think about things. While
there’s nothing wrong with trying to be correct, these feelings really impeded
my ability to do good math. Anxiety makes it hard to learn new things or see
things from a different perspective, which is exactly what you need to do
good math. Instead, I started seeing math as a <em>creative</em> endeavor, and I figured
out that I do my best work when I’m having fun.</p>
<blockquote>
<p>You know, for a mathematician, he did not have enough imagination. But he has become a poet and now he is fine.<br />
- D. Hilbert</p>
</blockquote>
<p>I used to see the same thing happen when I tried to write songs or essays. If you
try to write the perfect song on your first try, you’ll never be able to write a
single word. You’ll freeze up.</p>
<p>In writing classes, a lot of people are taught to do what I call “vomitting on
paper.” You just write whatever’s on your mind, stream of conscious style. Get a
bunch of stuff down and then go back and revise. Move things around, maybe
organize stuff into bullet points. Delete some stuff. Rinse and repeat.</p>
<blockquote>
<p>There is no such thing as good writing. There is only good rewriting.<br />
- Harry Shaw, <em>Errors in English and How to Correct Them</em></p>
</blockquote>
<p>This is what I do with a lot of my blog posts. If I really want to polish, I’ll
iterate a lot. For other posts (like this one) maybe just once is enough.</p>
<p>Similarly with song writing, what I like to do is just sit down and turn on the
recorder on my phone. Always, 100% of the time. Even if I have no idea what I’m
going to play, or if I’m just fooling around. That’s because my best creative
work happens when I’m in the moment, just playing around, not worried about
sounding dumb or playing the wrong thing. And if the recorder’s on, I can always
go back and remember those moments, taking the best ones and stitching them
together into something coherent.</p>
<p>So you can kind of apply this to math, right? Most people wouldn’t
say that math is like writing an essay or a song. But really it is. And it’s
just as creative.</p>
<p>This is the problem with math homework and tests. The kids are worried about
getting bad grades, so they don’t take risks; their imagination just shuts
down. But really, to see <em>why</em> an answer might be true, you have to throw a
bunch of stuff at the wall and see what sticks. A lot of math problems can’t be
solved by just applying formulas and shuffling around symbols. You really have
to see <a href="https://betterexplained.com/articles/math-and-analogies/">the
analogies</a> and know
where you’re going, so each step you take is in the right direction.</p>
<blockquote>
<p>One should not try to prove anything that is not almost obvious. - Alexandre Grothendieck</p>
</blockquote>
<p>Really, writing a proof is just something you do <em>after</em> you’ve basically solved
the problem. It’s for the benefit of other people (and yourself), so that you
can prove to them (and yourself) that something is true. But it doesn’t really
reflect how you got there.</p>
<blockquote>
<p>We often hear that mathematics consists mainly of “proving theorems.” Is a writer’s job mainly that of “writing sentences?” - Gian-Carlo Rota</p>
</blockquote>
<p>So my process for doing math is more or less the same as writing songs and
essays. I get a copious amount of paper, write down my problem, and then I write
down anything that comes to mind, as it comes to mind. If I need to draw
pictures, I draw pictures. If I need to write down an equation and annotate what
each part really means, I do that.</p>
<p>This helps me really “go down the rabbit hole” so to speak. If I try to solve a
math problem in my head without writing anything down, I can only keep track of
1 or 2 possibilities, and follow those ideas a few steps each. But if I write
everything down, it’s like I have inifinite brain space. And then I’m not afraid
to try crazy ideas.</p>
<p>But the key thing, again, is playing around. If I ever feel like doing the math
is a chore, I know I’m going to have a bad time, and that’s the only time when math
ever really feels “hard.”</p>
<p>- Mitchell</p>I used to take math really seriously. As a student, I worried about getting the “right” answer or figuring out the “right” way to think about things. While there’s nothing wrong with trying to be correct, these feelings really impeded my ability to do good math. Anxiety makes it hard to learn new things or see things from a different perspective, which is exactly what you need to do good math. Instead, I started seeing math as a creative endeavor, and I figured out that I do my best work when I’m having fun.Koan of Will2019-04-02T00:00:00+00:002019-04-02T00:00:00+00:00http://mitchgordon.me/zen/2019/04/02/koan-of-will<p>The student saw a monk sitting in the courtyard. He did not move.</p>
<p>For forty nights and days, the student returned to the courtyard to watch the monk, who still did not move.</p>
<p>On the fortieth day, the monk died and still did not move.</p>
<p>The student asked the master, “why has he done this?”</p>
<p>“To demonstrate his free will,” the master replied.</p>
<p>“Why?”</p>
<p>“Someone told him he did not have any,” the master replied.</p>
<p>“Were they right?”</p>
<p>“It does not matter. He is dead now.”</p>
<p>- 金道</p>The student saw a monk sitting in the courtyard. He did not move.Koan of Music2019-03-28T00:00:00+00:002019-03-28T00:00:00+00:00http://mitchgordon.me/zen/2019/03/28/koan-of-music<p>The student sought enlightenment.</p>
<p>“Master, what is best?”</p>
<p>The master answered, “play me the best music, and I will tell you the best way to live.”</p>
<p>So the student purchased a lute from a local merchant and played the master a song.</p>
<p>“That is not best,” the master said.</p>
<p>So the student traveled to the city and sought out the most famous lute players. She spent a year there, mastering seven genres.</p>
<p>She returned to the master and played her best seven songs.</p>
<p>“That is not best,” the master said.</p>
<p>In a fury, the student smashed the lute on the ground repeatedly, making a great cacophony.</p>
<p>“Ah, finally! You have played the best music… for me.”</p>
<p>The student was enlightened.</p>
<p>- 金道</p>The student sought enlightenment.Multiplying Complex Numbers2019-03-18T00:00:00+00:002019-03-18T00:00:00+00:00http://mitchgordon.me/math/2019/03/18/multiplying-complex-numbers<!-- Load the Paper.js library -->
<script src="/assets/js/acorn.js"></script>
<script type="text/javascript" src="/assets/js/paper-full.min.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->
<script type="text/paperscript" canvas="myCanvas">
ORIGIN = new Point(300, 150)
SCALE = 10
// (a + bi)(c + di)
// = (a + bi)c + (a + bi)di
var yaxis = new Path([ORIGIN.x, 0], [ORIGIN.x, ORIGIN.y * 2]);
var xaxis = new Path([0, ORIGIN.y], [ORIGIN.x * 2, ORIGIN.y]);
yaxis.strokeColor = 'black'
xaxis.strokeColor = 'black'
yaxis.dashArray = [4, 4]
xaxis.dashArray = [4, 4]
function convertVec(vec){
// Convert a linear algebra vector into a Paper vector
return new Point(vec.x, -vec.y) * SCALE
}
function convertPaperPos(pos) {
// Convert a paper pos to a linear algebra vector
var paperVec = pos - ORIGIN;
return new Point(paperVec.x, -paperVec.y) / SCALE
}
function showText(content, pos, color='black') {
var text = new PointText(pos);
text.justification = 'left';
text.fillColor = color;
text.content = content;
text.fontFamily = 'CMSY10'
return text;
}
function showVec(vec, {name=null, start=new Point(0,0), color='black'} = {}) {
vec = convertVec(vec);
start = ORIGIN + convertVec(start);
end = vec+start;
if (name != null) {
namePos = start + (vec / 2) + vec.normalize(15).rotate(90)
var nameText = showText(name, namePos)
}
vectorItem = new Group([
new Path([start, end]),
new Path([end, end-vec.normalize(10).rotate(30)]),
new Path([end, end-vec.normalize(10).rotate(-30)]),
nameText
]);
vectorItem.strokeColor = color;
return vectorItem
}
var mouseVec;
var a = 10; var b = 2; var c = 2; var d = 1;
var x = new Point(a, b);
var drawGroup;
function onFrame(event) {
if (drawGroup) drawGroup.remove();
y = new Point(c,d);
rightAngle = new Path();
rightAngle.moveTo(ORIGIN + convertVec((x*d).rotate(90)) + convertVec(x).rotate(90).normalize(10))
rightAngle.lineTo(ORIGIN + convertVec((x*d).rotate(90)) + convertVec(x).rotate(90).normalize(10) + convertVec(x).normalize(10))
rightAngle.lineTo(ORIGIN + convertVec((x*d).rotate(90)) + convertVec(x).normalize(10))
rightAngle.strokeColor = 'black'
drawGroup = new Group([
rightAngle,
showVec(x, {name: 'a+bi', color: 'red'}),
// showVec(x * c),
showVec((x * d).rotate(90), {name:"(a+bi)*di", color:"blue"}),
showVec(x * c, {start:(x * d).rotate(90), name: "(a+bi)*c", color: 'green'}),
showVec((x * d).rotate(90) + (x * c), {name: "(a+bi)(c+di)"}),
showText("θ", ORIGIN + convertVec((x * d).rotate(90) + (x * c)).normalize(20).rotate(20), color='purple'),
showText(`a = ${a.toFixed(2)}, b = ${b.toFixed(2)}, |a + bi| = ${x.length.toFixed(2)}`, ORIGIN + new Point(50, 50), color='red'),
showText(`c = ${c.toFixed(2)}, `, ORIGIN + new Point(50, 70), color='green'),
showText(`d = ${d.toFixed(2)}`, ORIGIN + new Point(100, 70), color='blue'),
showText(`θ = 90 - arctan(c/d) = arctan(d/c) = ${(Math.atan(d/c) / 2 / Math.PI * 360).toFixed(2)}`, ORIGIN + new Point(50, 90), color='purple'),
showText(`|(a+bi)(c+di)| = ${x.length.toFixed(2)} * ${y.length.toFixed(2)} = ${(x.length * y.length).toFixed(2)}`, ORIGIN + new Point(50, 110)),
]);
}
function onMouseMove(event) {
mouseVec = convertPaperPos(event.point)
c = mouseVec.project(x).length / x.length
d = mouseVec.project(x.rotate(90)).length / x.length
}
</script>
<p>I’ve been interested in complex numbers lately<sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup>, but something bothered me
about complex multiplication: <strong>why is multiplying two numbers the same as adding
their angles and multiplying their lengths</strong>? Luckily, I’m
starting to figure out that <a href="https://betterexplained.com/articles/math-and-analogies/">analogies are what make math
beautiful</a>, and that
doing good math often feels like playing around.</p>
<p>So, what analogies can we use? First, complex numbers can be vectors on a plane.
Second, doing arithmetic (multiplying, adding, etc.) can be <a href="https://betterexplained.com/articles/rethinking-arithmetic-a-visual-guide/">a geometric
transformation</a>.</p>
<p>So instead of asking, “what does <script type="math/tex">(a+bi)(c+di)</script> mean?” We can ask “what
geometric transformation is the same as multiplying by <script type="math/tex">(c+di)</script>?”</p>
<p>To start, we can apply the distributive rule:</p>
<script type="math/tex; mode=display">(a+bi)(c+di) = \textcolor{green}{(a+bi)c} + \textcolor{blue}{(a+bi)di}</script>
<p>So now, instead of one transformation, we have three simpler transformations:</p>
<p><span style="color: green">1. Scale your original complex number by c.</span></p>
<p><span style="color: blue">2. Scale your original complex number by d, then
rotate it by 90 degrees.</span> <br />
(Multiplying by i is the same as rotating by 90).</p>
<p><span>3. Add those together.</span></p>
<p>When you add two vectors together, it’s the same as putting the tail of one at
the end of the other, and then drawing a vector to the result. If we plot some
examples, we can see the geometry of these transformations<sup id="fnref:2"><a href="#fn:2" class="footnote">2</a></sup>: (it should move if
you mouse over it)</p>
<div style="text-align: center">
<canvas id="myCanvas" height="300" width="600"></canvas>
</div>
<p>This trick is what
<a href="https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw">3blue1brown</a> uses in
all his videos: create visual / geometric analogues for abstract concepts to
gain an intuitive and deeper understanding that connects with existing
experience. This is just one type of useful analogy, but it’s super useful, so I
want to keep practicing it.</p>
<p>Anyway, we’re interested in the black transformed vector: <script type="math/tex">(a+bi)(c+di)</script>.</p>
<p>What is the angle <script type="math/tex">\color{purple}\theta</script> between our original number and the
transformed one? From the geometry, we can see <script type="math/tex">\color{purple}\theta</script> is 90
degrees minus the angle formed by the right triangle. Luckily, we know the
length of the sides of that triangle is the same as our original complex number,
scaled by some scalars c and d:</p>
<script type="math/tex; mode=display">\textcolor{purple}{\theta} = 90 - \arctan(\frac{\textcolor{green}{c \|a+bi\|}}{\textcolor{blue}{d \|a+bi\|}}) = 90 - \arctan(\textcolor{green}{c}/\textcolor{blue}{d}) = \arctan(\textcolor{blue}{d} /\textcolor{green}{c})</script>
<p>Where <script type="math/tex">\color{red}\|a+bi\|</script> just means the length of <script type="math/tex">\color{red}(a+bi)</script>.
Notice that <script type="math/tex">\arctan(\textcolor{blue}{d} /\textcolor{green}{c})</script> is the same
as the angle of our multiplier, <script type="math/tex">(c+di)</script>. <strong>So multiplying by <script type="math/tex">(c+di)</script>
effectively rotates a complex number by the angle of <script type="math/tex">(c+di)</script>!</strong></p>
<p>If you play with the sketch above, you can see that when <script type="math/tex">d=0</script>, there’s no
rotation, when <script type="math/tex">c=0</script>, there’s a 90 degree rotation, and when <script type="math/tex">c=d</script>, the
rotation is exactly 45 degrees.</p>
<p>What about the length? Again, we can use the sides of our right triangle:</p>
<script type="math/tex; mode=display">\|(a+bi)(c+di)\| = \sqrt{\textcolor{green}{(c\|a+bi\|)^2} + \textcolor{blue}{(d\|a+bi\|)^2}} \\
= \sqrt{(c^2+d^2)\|a+bi\|^2} \\
= \sqrt{\|c+di\|^2\|a+bi\|^2} \\
= \|c+di\|\|a+bi\|</script>
<p><strong>So multiplying by <script type="math/tex">(c+di)</script> scales a number by the length of <script type="math/tex">(c+di)</script>.</strong></p>
<p>Now, we could have always figured this stuff out by applying definitions and
doing a bunch of algebra. But thinking about the geometry just makes it
feel… obvious. Note that we ignored some very important cases (what about
negative numbers?), but we can figure that out later.</p>
<p>What’s nice about having the intution is that extensions come just as naturally.
For example: finding the multiplicative inverse of a complex number. In other
words, what number undoes the transformation of multiplying by <script type="math/tex">(c+di)</script>?
Obviously it would need to rotate by the opposite angle, and then scale by the
inverse scale. More
<a href="https://betterexplained.com/articles/intuitive-arithmetic-with-complex-numbers/">here</a>.</p>
<p>So yeah, complex numbers are cool. Not sure why I never used them before, but it
seems like they would be cool <a href="https://medium.com/intuitionmachine/should-deep-learning-use-complex-numbers-edbd3aac3fb8">to use in machine
learning.</a>
What’s even cooler is that all of this complex business naturally derives from a
simple question: “how can we solve a polynomial with no real solutions?” When
you answer it, you get all this crazy geometry that’s closely related to
oscillations and trigonometry. Wild.</p>
<p>- Mitchell</p>
<div class="footnotes">
<ol>
<li id="fn:1">
<p>If you’re also interested, I highly recommend checking out BetterExplained’s <a href="https://betterexplained.com/articles/a-visual-intuitive-guide-to-imaginary-numbers/">visual intuitive guide to complex numbers</a>. If you’re really interested, check out the whole series! They go over the details of complex arithmetic, as well as euler’s formula and the Fourier Transform. Finally, you can check out 3blue1brown’s video on <a href="https://www.youtube.com/watch?v=mvmuCPvRoWQ">euler’s formula with introductory group theory</a> and <a href="https://www.youtube.com/watch?v=spUNpyF58BY">the Fourier Transform</a> for some of that and more (god I love Grant). <a href="#fnref:1" class="reversefootnote">↩</a></p>
</li>
<li id="fn:2">
<p>Multiplication is associative, so the picture we drew could also (c+di) as the original number and (a+bi) as the transformation. That would create a symmetric picture around our black product vector. Neat. <a href="#fnref:2" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Koan of Truth2019-03-13T00:00:00+00:002019-03-13T00:00:00+00:00http://mitchgordon.me/zen/2019/03/13/koan-of-truth<p>The student asked the master, “what is truth?”</p>
<p>The master grabbed his pet dog from the floor and presented it to the student.</p>
<p>“This is Truth.”</p>
<p>“That is not what I meant,” said the student.</p>
<p>“But that is what you asked,” said the master.</p>
<p>- 金道</p>The student asked the master, “what is truth?”Koan of Rock2019-03-10T00:00:00+00:002019-03-10T00:00:00+00:00http://mitchgordon.me/zen/2019/03/10/koan-of-rock<p>The master took his student to a field, where there stood a giant rock.</p>
<p>“Move this rock,” he said.</p>
<p>The student took a step to the left.</p>
<p>The master was pleased.</p>
<p>- 金道</p>The master took his student to a field, where there stood a giant rock.Koan of Names2019-03-06T00:00:00+00:002019-03-06T00:00:00+00:00http://mitchgordon.me/zen/2019/03/06/koan-of-names<p>The master asked her student, “what is a ball?”</p>
<p>“It is round. It rolls, and sometimes bounces,” the student replied.</p>
<p>The master reached into her robe, revealing a perfect sphere. “What is this?” she asked.</p>
<p>The student replied that it was a ball.</p>
<p>“Then it will roll?”</p>
<p>“On even ground,” the student replied.</p>
<p>The master placed the sphere on the ground and kicked it. It split into two perfect halves and did not roll.</p>
<p>The student objected to the trick. It was not a ball after all; it was two halves of a ball stuck together.</p>
<p>The master replied, “I did not name it. The ball did not name itself. You called it a ball because you expected it to roll. So it is with all things.”</p>
<p>The master then chopped the ball into many pieces, until it became dust and dissolved into the wind.</p>
<p>“Names are useful, but they are not truth. The names you create are your ignorance of the world.”</p>
<p>- 金道</p>The master asked her student, “what is a ball?”The MU Puzzle2018-05-01T00:00:00+00:002018-05-01T00:00:00+00:00http://mitchgordon.me/math/2018/05/01/MU-puzzle<p>In the 1920’s, an American logician named Emil Post invented a formal system commonly called a <a href="https://en.wikipedia.org/wiki/Post_canonical_system">Post production system</a>. A Post production system has three parts: an alphabet (like the English alphabet), an initial set of words that are assumed to exist, and a set of production rules. To use the system, you start with the intial words and apply the production rules to make new words out of the ones you already have, ad infinitum. Given these three parts the formal system is defined, and all the words that you could possibly create with this system are implicitly determined (but not necessarily known).</p>
<p>I bring up Emil’s system because I’ve been reading <a href="https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach">Gödel, Escher, Bach</a> by Douglas Hofstadter, and he uses it to propose a fun puzzle. Well, he really uses it as a simple example of a formal system, with which he demonstrates fundamental concepts (like decision processes and incompleteness). I really only care about the puzzle, however, which will be the subject of today’s post. By the way, GEB is an amazing book (as far as I can tell having read the first two chapters), and I highly recommend it.</p>
<p>In Hofstadter’s specific instance of a Post production system, the alphabet has three letters: <em>M</em>, <em>I</em>, and <em>U</em>. So any word that exists in our system will be composed of <em>M</em>, <em>I</em>, or <em>U</em>. Some examples: <em>MUM</em>, <em>IUIU</em>, <em>UUUUUIIII</em>, etc.</p>
<p>There are four rules in Hofstadter’s system for changing existing words into new words.</p>
<p><strong>Rule 1.</strong><br />
If a word ends in <em>I</em>, you can add <em>U</em> to the end. For example, <em>MI</em> may become <em>MIU</em>. <em>MUUUMUUI</em> may become <em>MUUUMUUIU</em>.</p>
<p><strong>Rule 2.</strong><br />
If a word is of the form <em>Mx</em>, you may add <em>Mxx</em> to your list of existing words. Notice that “x” is not in our alphabet, it’s a variable representing some collection of letters. Some examples:<br />
<em>MUM</em> may become <em>MUMUM</em><br />
<em>MIU</em> may become <em>MIUIU</em><br />
<em>MU</em> may become <em>MUU</em></p>
<p><strong>Rule 3.</strong><br />
If <em>III</em> occurs in a word, you may make a new word with <em>U</em> in place of <em>III</em>. Examples:<br />
<em>UMIIIMU</em> could become <em>UMUMU</em><br />
<em>MIIII</em> could become <em>MIU</em> or <em>MUI</em><br />
<em>IIMII</em> can’t become anything using this rule, since three <em>I</em>’s are not connected<br />
<em>MIII</em> could become <em>MU</em></p>
<p><strong>Rule 4.</strong><br />
If <em>UU</em> occurs in a word, you may get rid of it. Examples:<br />
From <em>UUU</em>, get <em>U</em><br />
From <em>MUUUIII</em> get <em>MUIII</em></p>
<p>Notice that multiple rules may apply to a word at the same time. It is up to you to decide which rules to use and when.</p>
<p>And now that we have the system, finally we can state the puzzle: <strong>starting with <em>MI</em>, can you get <em>MU</em>?</strong></p>
<p>Note that the puzzle <em>does not</em> ask “how do you get to <em>MU</em> from <em>MI</em>” but rather “is it possible to get to <em>MU</em> from <em>MI</em>?” If it is possible, how do you do it? If it’s not possible, can you prove that it’s not?</p>
<p>If you’re trying this at home, have fun with it. Start with <em>MI</em> and write down some new words using the rules. See if you can identify some patterns.</p>
<p>For the solution, I’ll be writing a post soon about how I went about solving it. If you’re impatient, the solution is all over the internet.</p>
<p>- Mitchell</p>In the 1920’s, an American logician named Emil Post invented a formal system commonly called a Post production system. A Post production system has three parts: an alphabet (like the English alphabet), an initial set of words that are assumed to exist, and a set of production rules. To use the system, you start with the intial words and apply the production rules to make new words out of the ones you already have, ad infinitum. Given these three parts the formal system is defined, and all the words that you could possibly create with this system are implicitly determined (but not necessarily known).