<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BetterExplained &#187; Math</title>
	<atom:link href="http://betterexplained.com/articles/category/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://betterexplained.com</link>
	<description>Learning shouldn&#039;t hurt. Let&#039;s share the insights that made difficult ideas click.</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:45:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Intuitive Understanding Of Euler&#8217;s Formula</title>
		<link>http://betterexplained.com/articles/intuitive-understanding-of-eulers-formula/</link>
		<comments>http://betterexplained.com/articles/intuitive-understanding-of-eulers-formula/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 18:55:21 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
				<category><![CDATA[Calculus]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://betterexplained.com/?p=686</guid>
		<description><![CDATA[Euler's identity seems baffling:



It emerges from a more general formula:



Yowza -- we're relating an imaginary exponent to sine and cosine! And somehow plugging in pi gives -1? Could this ever be intuitive?

Not according to 1800s mathematician Benjamin Peirce:


It is absolutely paradoxical; we cannot understand it, and we don't know what it means, but we have [...]]]></description>
			<content:encoded><![CDATA[<p>Euler's identity seems baffling:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/2acd58c7dcd28737fd97b42365ffb335.gif' title='\displaystyle{e^{i\pi} = -1}' alt='\displaystyle{e^{i\pi} = -1}' align=absmiddle /></p>

<p>It emerges from a more general formula:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/7b46af39dd17362a0a03d90c6cb89fdb.gif' title='\displaystyle{ e^{ix} = cos(x) + i sin(x)}' alt='\displaystyle{ e^{ix} = cos(x) + i sin(x)}' align=absmiddle /></p>

<p>Yowza -- we're relating an <em>imaginary exponent</em> to sine and cosine! And somehow plugging in pi gives -1? Could this ever be intuitive?</p>

<p>Not according to 1800s mathematician Benjamin Peirce:</p>

<blockquote>
It is absolutely paradoxical; we cannot understand it, and we don't know what it means, but we have proved it, and therefore we know it must be the truth.<br />
</blockquote>

<p>Argh, this attitude makes my blood boil! Formulas are not magical spells to be memorized: we must, must, <strong>must</strong> find an insight. Here's mine:</p>

<p><strong>Euler's formula describes two equivalent ways to move in a circle.</strong></p>

<p>That's it? This stunning equation is about spinning around? Yes -- and we can understand it by building on a few analogies:</p>


<ul>
<li>Starting at the number 1, see multiplication as a <a href="http://betterexplained.com/articles/rethinking-arithmetic-a-visual-guide/">transformation</a> that changes the number (1 * e^(i*pi))</li>
<li>Regular <a href="http://betterexplained.com/articles/an-intuitive-guide-to-exponential-functions-e/">exponential growth</a> continuously increases 1 by some rate; <a href="http://betterexplained.com/articles/a-visual-intuitive-guide-to-imaginary-numbers/">imaginary</a> exponential growth continuously <em>rotates</em> a number</li>
<li>Growing for "pi" units of time means going pi <a href="http://betterexplained.com/articles/intuitive-guide-to-angles-degrees-and-radians/">radians</a> around a circle</li>
<li>Therefore, e^(i*pi) means starting at 1 and rotating pi (halfway around a circle) to get to -1</li>
</ul>



<p>That's the high-level view -- let's dive into the details. By the way, if someone tries to impress you with "e^(i*pi) = -1", ask them about <em>i</em> to the <i>i</i>th power. If they can't think it through, Euler's formula is still a magic spell to them.</p>

<p><strong>Update:</strong> While writing, I thought a <a href="http://www.youtube.com/watch?v=qpOj98VNJi4">companion video</a> might help explain the ideas more clearly:</p>

<p><object width="520" height="317"><param name="movie" value="http://www.youtube.com/v/qpOj98VNJi4&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x5d1719&amp;color2=0xcd311b&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qpOj98VNJi4&amp;hl=en_US&amp;fs=1?rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="520" height="317"></embed></object></p>

<p>It follows the post -- watch together, or at your leisure.</p>

<h2>Understanding cos(x) + i * sin(x)</h2>

<p>The equals sign is overloaded. Sometimes we mean "set one thing to another" (like x = 3) and others we mean "these two things describe the same concept" (like sqrt(-1) = i).</p>

<p>Euler's formula is the latter: it gives two formulas which explain how to move in a circle. If we examine circular motion using trig, and travel x radians:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/euler/circle_traverse.png" /></p>


<ul>
<li>cos(x) is the x-coordinate (horizontal distance) </li>
<li>sin(x) is the y-coordinate (vertical distance)  </li>
</ul>



<p>The statement</p>

<p><img src='http://betterexplained.com/latexrender/pictures/7dceae636a34a7e235b324845b03d7b4.gif' title='\displaystyle{cos(x) + i \cdot sin(x)}' alt='\displaystyle{cos(x) + i \cdot sin(x)}' align=absmiddle /></p>

<p>is a clever way to smush the x and y coordinates into a single number. The analogy "complex numbers are 2-dimensional" helps us interpret a single complex number as a position on a circle.</p>

<p>When we set x to pi, we're traveling "pi" units along the outside of the unit circle. Because the total circumference is 2*pi, plain old pi is halfway around, putting us at -1.</p>

<p>Neato: The right side of Euler's formula (cos(x) + i*sin(x)) describes circular motion with imaginary numbers. Now let's figure out how the <em>e</em> side of the equation accomplishes it.</p>

<h2>What is Imaginary Growth?</h2>

<p>Combining x- and y- coordinates into a complex number is tricky, but manageable. But what does an imaginary <em>exponent</em> mean?</p>

<p>Let's step back a bit. When I see "3^4" I think of it like this:</p>


<ul>
<li>3 is the <em>end result</em> of growing instantly (using e) at a rate of ln(3). 3 = e^ln(3)</li>
<li>3^4 is the same as growing to 3, but then growing for 4x as long. So 3&#94;4 = e&#94;(ln(3) * 4) = 81</li>
</ul>



<p>Instead of seeing numbers on their own, you can think of them as something e had to "grow to". Real numbers, like 3, give an interest rate of ln(3) [1.1] and that's what e "collects" as its going along, growing continuosly.</p>

<p>Regular growth is simple -- it keeps "pushing" a number in the same (real) direction it was going. 3 &#215; 3 pushes in the original direction, making it 3 times larger (9).</p>

<p><img src="http://betterexplained.com/wp-content/uploads/euler/imaginary_growth.png" /></p>

<p>Imaginary growth is different -- the "interest" we earn is in a different direction! It's like a jet engine that's was strapped on sideways -- instead of going forward, we start pushing at 90 degrees.</p>

<p>The neat thing about a constant orthogonal (perpendicular) push is that it doesn't speed you up or slow you down -- it rotates you! Taking any number and multiplying by <em>i</em> will not change its magnitude, just the direction it points.</p>

<p>Intuitively, here's how I see <strong>continuous imaginary growth rate</strong>: "When I grow, don't push me forward or back in the direction I'm already going. Rotate me instead."</p>

<h2>But Shouldn't We Spin Faster and Faster?</h2>

<p>I wondered that too. Regular growth compounds in our original direction, so we go 1, 2, 4, 8, 16, multiplying 2x each time and staying in the real numbers. We can consider this e(ln(2)*x): grow instantly at a rate of ln(2) for "x" seconds.</p>

<p>And hey -- if our growth rate was twice that (2*ln(2)), it would look the same as growing for twice as long (2x vs x). The magic of e lets us swap rate and time; 2 seconds at ln(2) is the same growth as 1 second at 2*ln(2).</p>

<p>Now, imagine we have some imaginary growth rate (R*i) which rotates us: e^R*i becomes imaginary and grows to "i". Well, if we double that, we get i&#94;2 (-1) and as we keep going we just spin around the circle.</p>

<p>Now imagine we double that rate (2R*i). Would that spin us off the circle? Nope! Having a rate of 2R*i means we just spin twice as fast, or alternatively, spin at a rate of R for twice as long.</p>

<p>Once we realize that some exponential growth rate can take us from 1 to i, increasing that rate just spins us faster. We'll never escape the circle.</p>

<p>However, if our growth rate is complex (a+bi vs Ri) then the real part (a) will grow us like normal, while the imaginary part (bi) rotates us. But let's not get fancy: Euler's formula, e^(i*x), is about the <em>purely imaginary</em> growth that keeps us on the circle (more later).</p>

<h2>A Quick Sanity Check</h2>

<p>While writing, I had to clarify a few questions for myself:</p>

<p><strong>Why e^x -- aren't we rotating 1?</strong></p>

<p><em>e</em> represents the process of starting at 1 and growing continuously at 100% interest for 1 unit of time.</p>

<p>When we write <em>e</em> we're capturing that entire process in a single number -- e represents all the whole rigamarole of continuous growth. So really, e^x is saying "start at 1 and grow continuously at 100% for x seconds", and starts from 1 like we want.</p>

<p><strong>But what does i as an exponent do?</strong></p>

<p>For normal exponents like 3^4 we ask:</p>


<ul>
<li>What is the implicit growth rate? It's growing from 1 to 3.</li>
<li>How do we change that growth rate? We make it 4x larger (^4).</li>
</ul>



<p>Converting to "e" format, we say our instantaneous growth rate is ln(3) and make it 4x larger: ln(3) * 4. The top exponent (4) just scaled our growth.</p>

<p>When the top exponent is i (like 3^i), we get the same growth (ln(3)) but multiply it by <em>i</em>. So instead of growing at ln(3), we're growing at ln(3) * i.</p>

<p>The top exponent <em>modifies</em> the growth rate inherent in the bottom part.</p>

<h2>The Nitty Gritty Details</h2>

<p>Let's take a closer look. Remember this definition of <em>e</em>:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/84fd17d3417c5d065f224c96675ae48d.gif' title='\displaystyle{e = \lim_{n\to\infty} \left( 1 + \frac{100\%}{n} \right)^n}' alt='\displaystyle{e = \lim_{n\to\infty} \left( 1 + \frac{100\%}{n} \right)^n}' align=absmiddle /></p>

<p>That 1/n represents the interest we earned in each microscopic period. We assumed the interest was real -- but what if it were imaginary?</p>

<p><img src='http://betterexplained.com/latexrender/pictures/9ca3dd28cb9f89b0a7b2d18d7082f8cd.gif' title='\displaystyle{e = \lim_{n\to\infty} \left( 1 + \frac{100\%\cdot i}{n} \right)^n}' alt='\displaystyle{e = \lim_{n\to\infty} \left( 1 + \frac{100\%\cdot i}{n} \right)^n}' align=absmiddle /></p>

<p><img src="http://betterexplained.com/wp-content/uploads/euler/imaginary_interest.png" /></p>

<p>Now, our newly formed interest adds to us in the 90-degree direction. Surprisingly, this does not change our length -- this is a tricky concept, because it appears to make a triangle where the hypotenuse must be larger. We're dealing with a limit, and the extra distance is within the error margin we specify. This is something I want to tackle another day, but take my word: continuous perpendicular growth will rotate you. This is the heart of sine and cosine, where your change is perpendicular to your current position, and you move in a circle.</p>

<p>We apply <em>i</em> units of growth in infinitely small increments, each pushing us at a 90-degree angle. There is no "faster and faster" rotation - instead, we crawl along the perimeter a distance of |i| = 1 (magnitude of i).</p>

<p>And hey -- the distance crawled around a circle is an angle in radians! We've found another way to describe circular motion!</p>

<p><strong>To get circular motion:</strong> Change continuously by rotating at 90-degree angle (aka imaginary growth rate).</p>

<p>So, Euler's formula is saying "exponential, imaginary growth traces out a circle". And this path is the same as moving in a circle using sine and cosine in the imaginary plane. </p>

<p>In this case, the word "exponential" is confusing because we travel around the circle at a constant rate. In most discussions, exponential growth is assumed to have a cumulative, compounding effect.</p>

<h2>Some Examples</h2>

<p>You don't really believe me, do you? Here's a few examples, and how to think about them intuitively.</p>

<p><strong>Example: e^i</strong></p>

<p>Where's the x? Ah, it's just 1. Intuitively, without breaking out a calculator, we know that this means "travel 1 radian along the unit circle". In my head, I see "e" <em>trying</em> to grow 1 at 100% all in the same direction, but i keeps moving the ball and forces "1" to grow along the edge of a circle:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/ae1e0668adbadcd1f7bea31dbcff6241.gif' title='\displaystyle{e^i = cos(1) + i \cdot sin(1) = .5403 + .8415i}' alt='\displaystyle{e^i = cos(1) + i \cdot sin(1) = .5403 + .8415i}' align=absmiddle /></p>

<p>Not the prettiest number, but there it is. Remember to put your calculator in radian mode when punching this in.</p>

<p><strong>Example: 3^i</strong></p>

<p>This is tricky -- it's not in our standard format. But remember, <img src='http://betterexplained.com/latexrender/pictures/c088b0aa18cca5739cf517b549fbb15a.gif' title='\displaystyle{3^i = 1 \cdot 3^i}' alt='\displaystyle{3^i = 1 \cdot 3^i}' align=absmiddle /> -- the real question is "How do we transform 1"?</p>

<p>We want an initial growth of 3x at the end of the period, or an instantaneous rate of ln(3). But, the <em>i</em> comes along and changes that rate of ln(3) to "i * ln(3)": </p>

<p><img src='http://betterexplained.com/latexrender/pictures/0c8f3767a010f4ca6add335f7bee43a3.gif' title='\displaystyle{3^i = (e^{ln(3)})^i = e^{ln(3)\cdot i}}' alt='\displaystyle{3^i = (e^{ln(3)})^i = e^{ln(3)\cdot i}}' align=absmiddle /></p>

<p>We <em>thought</em> we were going to transform at a regular rate of ln(3) (a little faster than 100% continuous growth since e is about 2.718). But oh no, <em>i</em> spun us around: now we're transforming at an imaginary rate which means we're just rotating about. If <em>i</em> was a regular number like 4, it would have made us grow 4x faster. Now we're growing at a speed of ln(3), but sideways. </p>

<p>We should expect a complex number on the unit circle -- there's nothing in the growth rate to increase our size. Solving the equation: </p>

<p><img src='http://betterexplained.com/latexrender/pictures/4180ffeee698f2208c07fb5384f91901.gif' title='\displaystyle{3^i = e^{ln(3) \cdot i} = cos(ln(3)) + i \cdot sin(ln(3)) = .4548 + .8906i}' alt='\displaystyle{3^i = e^{ln(3) \cdot i} = cos(ln(3)) + i \cdot sin(ln(3)) = .4548 + .8906i}' align=absmiddle /></p>

<p>So, rather than ending up "1" unit around the circle (like e^i) we end up ln(3) units around.</p>

<p><strong>Example: i^i</strong></p>

<p>A few months ago, this would have had me tears. Not today! Let's break down the transformations:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/a48a992232a8911b7cce8cf3c7b0381d.gif' title='\displaystyle{i^i = 1 \cdot i^i}' alt='\displaystyle{i^i = 1 \cdot i^i}' align=absmiddle /></p>

<p>We start with 1 and want to change it. Like solving 3^i, what's the instantaneous growth rate represented by <em>i</em> as a base?</p>

<p>Hrm. Normally we'd do ln(x) to get the growth rate needed to reach x it the end of 1 unit of time. But for an imaginary rate? We need to noodle this over. </p>

<p>In order to start with 1 and grow to <em>i</em> we need to start rotating at the outset. How fast? Well, we need to get 90 degrees (pi/2 radians) in 1 unit of time. So our rate is "i * pi/2". Remember our rate must be imaginary since we're rotating, not growing! Plain old "pi/2" is about 1.57 and results in regular growth.</p>

<p>This should make sense: to turn 1.0 to <em>i</em> at the end of 1 unit, we should rotate pi/2 radians (90 degrees) in that amount of time. So, to get "i" we can use e^(i * pi/2).</p>

<p><img src='http://betterexplained.com/latexrender/pictures/b7abfa157b0af38a0f55fdb57daa2612.gif' title='\displaystyle{i = e^{i * \frac{\pi}{2}}}' alt='\displaystyle{i = e^{i * \frac{\pi}{2}}}' align=absmiddle /></p>

<p>Phew. That describes i as the base. How about the exponent?</p>

<p>Well, the <em>other</em> i tells us to change our rate -- yes, that rate we spent so long figuring out! So rather than rotating at a speed of i * pi/2, which is what a base of <em>i</em> means, we transform the rate to:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/337b4a4acc58dc5f3db90b14ac789602.gif' title='\displaystyle{\frac{\pi}{2}i \cdot i = \frac{\pi}{2} \cdot -1 = -\frac{\pi}{2}}' alt='\displaystyle{\frac{\pi}{2}i \cdot i = \frac{\pi}{2} \cdot -1 = -\frac{\pi}{2}}' align=absmiddle /></p>

<p>The i's cancel and make the growth rate real again! We rotated our rate and pushed ourselves into the negative numbers. And a negative growth rate means we're shrinking -- we should expect i^i to make things smaller. And it does: </p>

<p><img src='http://betterexplained.com/latexrender/pictures/ae77d7310bad7af54c5996ca77234c74.gif' title='\displaystyle{i^i = e^{- \frac{\pi}{2}} \sim .2}' alt='\displaystyle{i^i = e^{- \frac{\pi}{2}} \sim .2}' align=absmiddle /></p>

<p>Tada! (Search "i^i" on Google to use its calculator)</p>

<p>Take a breather: You can intuitively figure out how imaginary bases and imaginary exponents should behave. Whoa.</p>

<p>And as a bonus, you figured out ln(i) -- to make e^x become i, make e rotate pi/2 radians.</p>

<p><img src='http://betterexplained.com/latexrender/pictures/7c0fa4de0660efe2c0e9cb5607e873de.gif' title='\displaystyle{ln(i) = i \cdot \frac{\pi}{2}}' alt='\displaystyle{ln(i) = i \cdot \frac{\pi}{2}}' align=absmiddle /></p>

<p><strong>Example: (i^i)&#94;i</strong></p>

<p>A double imaginary exponent? If you insist. First off, we know what our growth rate will be inside the parenthesis:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/75dec4aa2a2bdd2a18b963ec3198d2f4.gif' title='\displaystyle{i^i = (e^{\frac{\pi}{2}i})^i = e^{-\frac{\pi}{2}}}' alt='\displaystyle{i^i = (e^{\frac{\pi}{2}i})^i = e^{-\frac{\pi}{2}}}' align=absmiddle /></p>

<p>We get a negative (shrinking) growth rate of -pi/2. And now we modify that rate <em>again</em> by <em>i</em>:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/d03f3fae5e27aee0ff5e2754cd994888.gif' title='\displaystyle{{(i^i)^i = (e^{-\frac{\pi}{2}})^i = e^{-\frac{\pi}{2}i}}' alt='\displaystyle{{(i^i)^i = (e^{-\frac{\pi}{2}})^i = e^{-\frac{\pi}{2}i}}' align=absmiddle /></p>

<p>And now we have a negative rotation! We're going around the circle a rate of -pi/2 per unit time. How long do we go for? Well, there's an implicit "1" unit of time at the very top of this exponent chain; the implied default is to go for 1 time unit (just like e = e^1). 1 time unit gives us a rotation of -pi/2 radians (-90 degrees) or -i!</p>

<p><img src='http://betterexplained.com/latexrender/pictures/c864006c97d5ba579b712416b0c5abf9.gif' title='\displaystyle{(i^i)^i = -i}' alt='\displaystyle{(i^i)^i = -i}' align=absmiddle /></p>

<p>And, just for kicks, if we squared that crazy result:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/881c41a6765c5f40b6a2c8f75982c4c9.gif' title='\displaystyle{((i^i)^i)^2 = -1}' alt='\displaystyle{((i^i)^i)^2 = -1}' align=absmiddle /></p>

<p>It's "just" twice the rotation: 2 is a regular number so doubles our rotation rate to a full -180 degrees in a unit of time. Or, you can look at it as applying -90 degree rotation twice in a row.</p>

<p>At first blush, these are really strange exponents. But with our analogies we can take them in stride.</p>

<h2>Complex Growth</h2>

<p>We can have real and imaginary growth at the same time: the real portion scales us up, and the imaginary part rotates us around:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/euler/complex_growth.png" /></p>

<p>A complex growth rate like (a + bi) is a mix of real and imaginary growth. The real part a, means "grow at 100% for <em>a</em> seconds" and the imaginary part b means "rotate for <em>b</em> seconds". Remember, rotations don't get the benefit of compounding since you keep 'pushing' in a different direction -- rotation adds up linearly.</p>

<p>With this in mind, we can represent any point on any sized circle using (a+bi)! The radius is e^a and the angle is determined by e&#94;(b*i). It's like putting the number in the expand-o-tron for two cycles: once to grow it to the right size (a seconds), another time to rotate it to the right angle (b seconds). Or, you could rotate it first and the grow!</p>

<p>Let's say we want to know the growth amount to get to 6 + 8i. This is really asking for the natural log of an imaginary number: how do we grow e to get (6 + 8i)? </p>


<ul>
<li>Radius: How big of a circle do we need? Well, the magnitude is sqrt(6^6 + 8&#94;8) = sqrt(100) = 10. Which means we need to grow for ln(10) = 2.3 seconds to reach that amount.</li>
<li>Amount to rotate: What's the angle of that point? We can use arctan to figure it out: atan(8/6) = 53 degrees = .93 radian. </li>
<li>Combine the result: ln(6+8i) = 2.3 + .93i</li>
</ul>



<p>That is, we can reach the random point (6 + 8i) if we use e^(2.3 + .93i).</p>

<h2>Why Is This Useful?</h2>

<p>Euler's formula gives us another way to describe motion in a circle. But we could already do that with sine and cosine -- what's so special?</p>

<p>It's all about perspective. Sine and cosine describe motion in terms of a <em>grid</em>, plotting out horizontal and vertical coordinates.</p>

<p><img src="http://betterexplained.com/wp-content/uploads/euler/equal_paths.png" /></p>

<p>Euler's formula uses polar coordinates -- what's your angle and distance? Again, it's two ways to describe motion:</p>


<ul>
<li>Grid system: Go 3 units east and 4 units north</li>
<li>Polar coordinates: Go 5 units at an angle of 71.56 degrees</li>
</ul>



<p>Depending on the problem, polar or rectangular coordinates are more useful. Euler's formula lets us convert between the two to use the best tool for the job. Also, because e^(ix) can be converted to sine and cosine, we can rewrite formulas in trig as variations on e, which comes in very handy (no need to memorize sin(a+b), you can derive it -- more another day). And it's beautiful that every number, real or complex, is a variation of e.</p>

<p>But utility, schmutility: the most important result is the realization that baffling equations can become intuitive with the right analogies. Don't let beautiful equations like Euler's formula remain a magic spell -- <a href="http://betterexplained.com/articles/developing-your-intuition-for-math/">build on the analogies</a> you know to see the insights inside the equation.</p>

<p>Happy math.</p>

<h2>Appendix</h2>

<p>The screencast was fun, and feedback is definitely welcome. I think it helps the ideas pop, and walking through the article helped me find gaps in my intuition.</p>

<p>References:</p>


<ul>
<li>Brian Slesinsky has a neat <a href="http://slesinsky.org/brian/misc/eulers_identity.html">presentation on Euler's formula</a></li>
<li>Visual Complex Analysis has a great discussion on Euler's formula -- see p. 10 in the <a href="http://books.google.com/books?id=ogz5FjmiqlQC&amp;%23038;dq=visual+complex+analysis&amp;%23038;printsec=frontcover&amp;%23038;source=bn&amp;%23038;hl=en&amp;%23038;ei=4zBCTN3hIIfUtQPS4IHLDA&amp;%23038;sa=X&amp;%23038;oi=book_result&amp;%23038;ct=result&amp;%23038;resnum=6&amp;%23038;ved=0CDwQ6AEwBQ%23v=onepage&amp;%23038;q&amp;%23038;f=false">Google Book Preview</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://betterexplained.com/articles/intuitive-understanding-of-eulers-formula/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Fun With Modular Arithmetic</title>
		<link>http://betterexplained.com/articles/fun-with-modular-arithmetic/</link>
		<comments>http://betterexplained.com/articles/fun-with-modular-arithmetic/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 19:55:39 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[arithmetic]]></category>
		<category><![CDATA[modulo]]></category>
		<category><![CDATA[numbers]]></category>

		<guid isPermaLink="false">http://betterexplained.com/?p=579</guid>
		<description><![CDATA[A reader recently suggested I write about modular arithmetic (aka &#8220;taking the remainder&#8221;). I hadn&#8217;t given it much thought, but realized the modulo is extremely powerful: it should be in our mental toolbox next to addition and multiplication.
Instead of hitting you in the face with formulas, let&#8217;s explore an idea we&#8217;ve been subtly exposed to [...]]]></description>
			<content:encoded><![CDATA[<p>A reader recently suggested I write about modular arithmetic (aka &#8220;taking the remainder&#8221;). I hadn&#8217;t given it much thought, but realized the modulo is extremely powerful: it should be in our mental toolbox next to addition and multiplication.</p>
<p>Instead of hitting you in the face with formulas, let&#8217;s explore an idea we&#8217;ve been subtly exposed to for years. There&#8217;s a <a class=" external" title="http://www.math.rutgers.edu/~erowland/modulararithmetic.html" href="http://www.math.rutgers.edu/~erowland/modulararithmetic.html">nice article on modular arithmetic</a> that inspired this post.</p>
<h3>Odd, Even and Threeven</h3>
<p>Shortly after discovering whole numbers (1, 2, 3, 4, 5&#8230;) we realized they fall into two groups:</p>
<ul>
    <li>Even: divisible by 2 (0, 2, 4, 6..)</li>
    <li>Odd: not divisible by 2 (1, 3, 5, 7&#8230;)</li>
</ul>
<p>Why&#8217;s this distinction important? It&#8217;s the beginning of abstraction &#8212; we&#8217;re noticing the <em>properties</em> of a number (like being even or odd) and not just the number itself (&#8221;37&#8243;).</p>
<p>This is huge &#8212; it lets us explore math at a deeper level and find relationships between <em>types</em> of numbers, not specific ones. For example, we can make rules like this:</p>
<ul>
    <li>Even x Even = Even</li>
    <li>Odd x Odd = Odd</li>
    <li>Even x Odd = Even</li>
</ul>
<p>These rules are general &#8212; they work at the property level. (Intuitively, I have a <a class=" external" title="http://betterexplained.com/articles/another-look-at-prime-numbers/" href="http://betterexplained.com/articles/another-look-at-prime-numbers/">chemical analogy</a> that &#8220;evenness&#8221; is a molecule some numbers have, and cannot be removed by multiplication.)</p>
<p>But even/odd is a very specific property: division by 2. What about the number 3? How about this:</p>
<ul>
    <li>&#8220;Threeven&#8221; means a number is divisbile by 3 (0, 3, 6, 9&#8230;)</li>
    <li>&#8220;Throdd&#8221; means you are <em>not</em>&nbsp;divisible by 3 (1, 2, 4, 5, 7, 8&#8230;)</li>
</ul>
<p>Weird, but workable. You&#8217;ll notice a few things: there&#8217;s two types of throdd. A number like &#8220;4&#8243; is 1 away from being threeven (remainder 1), while the number 5 is two away (remainder 2).</p>
<p>Being &#8220;threeven&#8221; is just another property of a number. Perhaps not as immediately useful as even/odd, but it&#8217;s there: we can make rules like &#8220;threeven x threeven = threeven&#8221; and so on.</p>
<p>But it&#8217;s getting crazy. We can&#8217;t make new words all the time.</p>
<h3>Enter the Modulo</h3>
<p>The modulo operation (abbreviated &#8220;mod&#8221;, or &#8220;%&#8221; in many programming languages) is the remainder when dividing. For example,&nbsp;&#8221;5 mod 3 = 2&#8243; which means 2 is the remainder when you divide 5 by 3.</p>
<p>Converting everyday terms to math, an &#8220;even number&#8221; is one where it&#8217;s &#8220;0 mod 2&#8243; &#8212; that is, it has a remainder of 0 when divided by 2. An odd number is &#8220;1 mod 2&#8243; (has remainder 1).</p>
<p>Why&#8217;s this cool? Well, our &#8220;odd/even&#8221; rules become this:</p>
<ul>
    <li style="list-style-type: disc; ">Even x Even = 0 x 0 = 0 [even]</li>
    <li style="list-style-type: disc; ">Odd x Odd = 1 x 1 = 1 [odd]</li>
    <li style="list-style-type: disc; ">Even x Odd = 0 x 1 = 0 [even]</li>
</ul>
<p>Cool, huh? Pretty easy to work out &#8212; we converted &#8220;properties&#8221; into actual equations and found some new facts.</p>
<p>What&#8217;s even x even x odd x odd? Well, it&#8217;s 0 x 0 x 1 x 1 = 0. In fact, you can see if there&#8217;s an even being multiplied <em>anywhere </em>the entire result is going to be zero&#8230; I mean even <img src='http://betterexplained.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h3>Clock Math</h3>
<p>The sneaky thing about modular math is we&#8217;ve already been using it for keeping time &#8212; sometimes called &#8220;clock arithmetic&#8221;.</p>
<p>For example: it&#8217;s 7:00 (am/pm doesn&#8217;t matter). Where will the hour hand be in 7 hours?</p>
<p>Hrm. 7 + 7 = 14, but we can&#8217;t show &#8220;14:00&#8243; on a clock. So it must be 2. We do this reasoning intuitively, and in math terms:</p>
<ul>
    <li>(7 + 7) mod 12 = (14) mod 12 = 2 mod 12 [2 is the remainder when 14 is divided by 12]</li>
</ul>
<p>The equation &#8220;14 mod 12 = 2 mod 12&#8243; means, &#8220;14 o&#8217;clock&#8221; and &#8220;2 o&#8217;clock&#8221; look the same on a 12-hour clock. They are <strong>congruent</strong>, indicated by a triple-equals sign: 14 ≡ 2 mod 12.</p>
<p>Another example: it&#8217;s 8:00. Where will the big hand be in 25 hours?</p>
<p>Instead of adding 25 to 8, you might realize that 25 hours is just &#8220;1 day + 1 hour&#8221;. So, the clock will end up 1 hour ahead, at 9:00.</p>
<ul>
    <li>(8 + 25) mod 12 ≡ (8) mod 12 + (25) mod 12 ≡ (8) mod 12 + (1) mod 12 ≡ 9 mod 12</li>
</ul>
<p>You intuitively converted 25 to 1, and added that to 8.</p>
<h3>Fun Property: Math just works</h3>
<p>Using clocks as an analogy, we can figure out whether the rules of modular arithmetic &#8220;just work&#8221; (they do).</p>
<p><strong>Addition/Subtraction</strong></p>
<p>Let&#8217;s say two times look the same on our clock (&#8221;2:00&#8243;&nbsp;and &#8220;14:00&#8243;).&nbsp;If we add the same &#8220;x&#8221; hours to both, what happens?</p>
<p>Well, they change to the same amount on the clock! 2:00 +&nbsp;5 hours ≡ 14:00 +&nbsp;5 hours &#8212; both will show 7:00.</p>
<p>Why? Well, we never cared about the excess &#8220;12:00&#8243; that the 14 was carrying around. We can just add 5 to the 2 remainder that both have, and they advance the same. For all congruent numbers (2 and 14), adding and subtracting has the same result.</p>
<p><strong>Multiplication</strong></p>
<p>It&#8217;s harder to see whether multiplication stays the same. If 14 ≡ 2 (mod 12), can we multiply both sides and get the same result?</p>
<p>Let&#8217;s see &#8212; what happens when we multiply by 3?</p>
<p>Well, 2:00 * 3 ≡ 6:00. But what&#8217;s &#8220;14:00&#8243; * 3?</p>
<p>Remember, 14 = 12 +&nbsp;2. So, we can say</p>
<ul>
    <li>14 *&nbsp;3 = (12 + 2) *&nbsp;3 = (12 * 3) +&nbsp;(2 *&nbsp;3) mod 12</li>
</ul>
<p>The first part (12 *&nbsp;3)&nbsp;can be ignored! The &#8220;12 hour overflow&#8221; that 14 is carrying around just gets repeated a few times. But who cares? We ignore the overflow anyway.</p>
<p>When multiplying, it&#8217;s only the remainder that matters, which is the same 2 hours for 14:00 and 2:00. Intuitively, this is how I see that multiplication doesn&#8217;t change relationships with modular math (you can multiply both sides of a modular relationship and get the same result). See the <a class=" external" title="http://www.math.rutgers.edu/~erowland/modulararithmetic.html" href="http://www.math.rutgers.edu/~erowland/modulararithmetic.html">above link</a> for more rigorous proofs &#8212; these are my <a class=" external" title="http://betterexplained.com/articles/learning-to-learn-pencil-then-ink/" href="http://betterexplained.com/articles/learning-to-learn-pencil-then-ink/">intuitive pencil lines</a>.</p>
<h3>Uses Of Modular Arithmetic</h3>
<p>Now the fun part &#8212; why is modular arithmetic useful?</p>
<p><strong>Simple time calculations</strong></p>
<p>We do this intuitively, but it&#8217;s nice to give it a name. You have a flight arriving at 3pm. It&#8217;s getting delayed 14 hours. What time will it land?</p>
<p>Well, 14 ≡ 2 mod 12. So I&nbsp;think of it as &#8220;2 hours and an am/pm switch&#8221;, so I know it will be &#8220;3 +&nbsp;2 = 5am&#8221;.</p>
<p>This is a bit more involved than a plain modulo operator, but the principle is the same.</p>
<p><strong>Putting Items In Random Groups </strong></p>
<p>Suppose you have people who bought movie tickets, with a confirmation number. You want to divide them into 2 groups.</p>
<p>What do you do? &#8220;Odds over here, evens over there&#8221;. You don&#8217;t need to know how many tickets were issued (first half, second half), everyone can figure out their group instantly (without contacting a central authority), and the scheme works as more people buy tickets.</p>
<p>Need 3 groups? Divide by 3 and take the remainder (aka mod 3). You&#8217;ll have groups &#8220;0&#8243;, &#8220;1&#8243; and &#8220;2&#8243;.</p>
<p>In programming, taking the modulo is how you can fit items into a hash table: if your table has N entries, convert the item key to a number, do mod N, and put the item in that bucket (perhaps keeping a linked list there). As your hash table grows in size, you can recompute the modulo for the keys.</p>
<p><strong>Picking A Random Item</strong></p>
<p>I use the modulo in real life. Really. We have 4 people playing a game and need to pick someone to go first. <em>Play the mod N mini-game!</em> Give people numbers 0, 1, 2, and 3.</p>
<p>Now everyone goes &#8220;one, two, three, shoot!&#8221; and puts out a random number of fingers. Add them up and divide by 4 &#8212; whoever gets the remainder exactly goes first. (For example: if the sum of fingers is 11, whoever had &#8220;3&#8243; gets to go first, since 11 mod 4 = 3).</p>
<p>It&#8217;s fast and it works.</p>
<p><strong>Running Tasks On A Cycle</strong></p>
<p>Suppose tasks need to happen on a certain schedule:</p>
<ul>
    <li>Task A runs 3x/hour</li>
    <li>Task B runs 6x/hour</li>
    <li>Task C runs 1x/hour</li>
</ul>
<p>How do you store this information and make a schedule? One way:</p>
<ul>
    <li>Have a timer running every minute (keep track of the minute as &#8220;n&#8221;)</li>
    <li>3x / hour means once every 60/3 = 20 minutes. So task A runs whenever &#8220;n % 20 == 0&#8243;</li>
    <li>Task B runs whenever &#8220;n % 10 == 0&#8243;</li>
    <li>Task C runs whenever &#8220;n % 60 == 0&#8243;</li>
</ul>
<p>Oh, you need task C1 which runs 1x per hour, but not the same time as task C?&nbsp;Sure, have it run when &#8220;n mod 60 == 1&#8243; (still once per hour, but not the same as C1).</p>
<p>Mentally I see a cycle I want to &#8220;hit&#8221;&nbsp;at various intervals, so I insert a mod. The neat thing is that the hits can overlap independently. It&#8217;s a bit like XOR in that regard (each XOR can be layered &#8212; but that&#8217;s another article!).</p>
<p>Similarly, when programming you can print every 100th log item by doing:&nbsp;if (n % 100 == 0){ print&#8230; }.</p>
<p>It&#8217;s a very flexible, simple way to have items run on a schedule. In fact, it&#8217;s the way to answer the <a class=" external" title="http://www.codinghorror.com/blog/archives/000781.html" href="http://www.codinghorror.com/blog/archives/000781.html">FizzBuzz sanity check</a>. If you don&#8217;t have the modulo operation in your batbelt the question becomes much more tricky.</p>
<p><strong>Finding Properties Of Numbers</strong></p>
<p>Suppose I told you this:</p>
<ul>
    <li>a = (47 *&nbsp;2 *&nbsp;3)</li>
</ul>
<p>What can you deduce quickly? Well, &#8220;a&#8221; must be even, since it&#8217;s equal to something which involves multiplication by 2.</p>
<p>If I also told you:</p>
<ul>
    <li>a = (39 *&nbsp;7)</li>
</ul>
<p>You&#8217;d balk. Not because you &#8220;know&#8221; the two products are different, but because one is clearly even, and the other is odd. There&#8217;s a problem: a can&#8217;t be the same number in both since the <em>properties don&#8217;t match up</em>.</p>
<p>Things like &#8220;even&#8221;, &#8220;threeven&#8221; and &#8220;mod n&#8221;&nbsp;are properties that are more general than individual numbers, and which we can check for consistency. So we can use modulo to figure out whether numbers are consistent, without knowing what they are!</p>
<p>If I tell you this:</p>
<ul>
    <li>3a + 5b = 8</li>
    <li>3a + b = 2</li>
</ul>
<p>Can these equations be solved with the integers? Let&#8217;s see:</p>
<ul>
    <li>3a + 5b = 8&#8230; let&#8217;s &#8220;mod 3 it&#8221;: 0 + 2b ≡ 2 mod 3, or b ≡ 1 mod 3</li>
    <li>3a + b = 2&#8230; let&#8217;s &#8220;mod 3 it&#8221;: 0 + b ≡ 2 mod 3), or b ≡ 2 mod 3</li>
</ul>
<p>A contradication, good fellows! B can&#8217;t be both &#8220;1 mod 3&#8243; and &#8220;2 mod 3&#8243; &#8212; it&#8217;s as absurd as being even and odd at the same time!</p>
<p>But there&#8217;s one gotcha: numbers like &#8220;1.5&#8243; are neither even nor odd &#8212; they aren&#8217;t integers! The modular properties apply to integers, so what we can say is that b cannot be an <em>integer</em>.</p>
<p>Because, in fact, we can solve that equation:</p>
<ul>
    <li>(3a + 5b) &#8211; (3a +b) = 8 &#8211; 2</li>
    <li>4b = 6</li>
    <li>b = 1.5</li>
    <li>3a + 1.5 = 2, so 3a = 0.5, and a = 1/6</li>
</ul>
<p>Don&#8217;t get seduced by the power of modulo! Know its limits: it applies to integers.</p>
<p><strong>Cryptography</strong></p>
<p>Playing with numbers has very important uses in cryptography. It&#8217;s too much to cover here, but modulo is used in <a href="http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange" title="http://en.wikipedia.org/wiki/Diffie–Hellman_key_exchange" class=" external">Diffie-Hellman Key Exchange</a> &#8212; used in setting up SSL connections to encrypt web traffic.</p>
<p><strong>Plain English</strong></p>
<p>Geeks love to use technical words in regular contexts. You might hear &#8220;X is the same as Y modulo Z&#8221;&nbsp;which means roughly &#8220;Ignoring Z, X and Y are the same.&#8221;</p>
<p>For example:</p>
<ul>
    <li>b and B are identical, modulo capitalization</li>
    <li>The iTouch and iPad are identical, modulo size <img src='http://betterexplained.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<h3>Onward and Upward</h3>
<p>It&#8217;s strange thinking about the &#8220;utility&#8221;&nbsp;of the modulo operator &#8212; it&#8217;s like someone asking why exponents are useful. In everyday life, not very, but it&#8217;s a tool to understand patterns in the world, and create your own.</p>
<p>In general, I see a few general use cases:</p>
<ul>
    <li>Range reducer:&nbsp;take an input, mod N, and you have a number from 0 to N-1.</li>
    <li>Group assigner:&nbsp;take an input, mod&nbsp;N, and you have it tagged as a group from 0 to N-1. This group can be agreed upon by any number of parties &#8212; for example, different servers that know N = 20 can agree what group ID=57 belongs to.</li>
    <li>Property deducer: treat numbers according to properties (even, threeven, and so on) and work out principles derived at the property level</li>
</ul>
<p>I&#8217;m sure there&#8217;s dozens more uses I&#8217;ve missed &#8212; feel free to comment below. Happy math!</p>]]></content:encoded>
			<wfw:commentRss>http://betterexplained.com/articles/fun-with-modular-arithmetic/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>A Friendly Chat About Whether 0.999&#8230; = 1</title>
		<link>http://betterexplained.com/articles/a-friendly-chat-about-whether-0-999-1/</link>
		<comments>http://betterexplained.com/articles/a-friendly-chat-about-whether-0-999-1/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 09:41:20 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
				<category><![CDATA[Calculus]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[hyperreal]]></category>
		<category><![CDATA[limit]]></category>

		<guid isPermaLink="false">http://betterexplained.com/?p=431</guid>
		<description><![CDATA[Does .999&#8230; = 1? The question invites the curiosity of students and the ire of pedants. A famous joke illustrates my point:


A man is lost at sea in a hot air balloon. He sees a lighthouse approaching in the fog. &#8220;Where am I?&#8221; he shouts desperately through the wind. &#8220;You&#8217;re in a balloon!&#8221; he hears [...]]]></description>
			<content:encoded><![CDATA[<p>Does .999&#8230; = 1? The question invites the curiosity of students and the ire of pedants. A famous joke illustrates my point:</p>

<blockquote>
A man is lost at sea in a hot air balloon. He sees a lighthouse approaching in the fog. &#8220;Where am I?&#8221; he shouts desperately through the wind. &#8220;You&#8217;re in a balloon!&#8221; he hears as he drifts off into the distance. <br />
</blockquote>

<p>The response is correct but unhelpful. When people ask about 0.999&#8230; they aren&#8217;t saying &#8220;Hey, could you find the limit of a convergent series under the axioms of the real number system?&#8221; (Really? Yes, Really!)</p>

<p>No, there&#8217;s a broader, more interesting subtext: <i>What happens when one number gets infinitely close to another?</i></p>

<p>It&#8217;s a rare thing when people wonder about math: <strong>let&#8217;s use the opportunity!</strong> Instead of bluntly offering technical definitions to satisfy some need for rigor, let&#8217;s allow ourselves to explore the question.</p>

<p>Here&#8217;s my quick summary:</p>


<ul>
<li><strong>The meaning of 0.999&#8230; depends on our assumptions about how numbers behave.</strong></li>
<li>A common <em>assumption</em> is that numbers cannot be &#8220;infinitely close&#8221; together &#8212; they&#8217;re either the same, or they&#8217;re not. With these rules, 0.999&#8230; = 1 since we don&#8217;t have a way to represent the difference.</li>
<li>If we allow the idea of &#8220;infinitely close numbers&#8221;, then yes, 0.999&#8230; can be less than 1.</li>
</ul>



<p>Math can be about questioning assumptions, pushing boundaries, and wondering &#8220;What if?&#8221;. Let&#8217;s dive in.</p>

<h2>Do Infinitely Small Numbers Exist?</h2>

<p>The meaning of 0.999&#8230; is a tricky concept, and depends on what we allow a number to be. Here&#8217;s an example: Does &#8220;3 &#8211; 4&#8243; mean anything to you? </p>

<p>Sure, it&#8217;s -1. Duh. But the question is only simple because you&#8217;ve embraced the advanced idea of negatives: you&#8217;re ok with numbers being <em>less than nothing</em>. In the 1700s, when negatives were brand new, the concept of &#8220;3-4&#8243; was eyed with great suspicion, if allowed at all. (Geniuses of the time thought negatives &#8220;wrapped around&#8221; after you passed infinity).</p>

<p>Infinitely small numbers face a similar predicament today: they&#8217;re new, challenge some long-held assumptions, and are considered &#8220;non-standard&#8221;.</p>

<h2>So, Do Infinitesimals Exist?</h2>

<p>Well, do negative numbers exist? Negatives exist if you allow them and have consistent rules for their use.</p>

<p>Our current number system assumes the long-standing <a href="http://en.wikipedia.org/wiki/Archimedean_property">Archimedean property:</a> if a number is smaller than every other number, it must be zero. More simply, <em>infinitely small numbers don&#8217;t exist</em>.</p>

<p>The idea should make sense: numbers should be zero or not-zero, right? Well, it&#8217;s &#8220;true&#8221; in the same way numbers must be there (positive) or not there (zero) &#8212; it&#8217;s true because we&#8217;ve implicitly excluded other possibilities.</p>

<p>But, it&#8217;s no matter &#8212; let&#8217;s see where the Archimedean property takes us.</p>

<h2>The Traditional Approach: 0.999&#8230; = 1</h2>

<p>If we assume infinitely small numbers don&#8217;t exist, we can show 0.999&#8230; = 1.</p>

<p>First off, we need to figure out what 0.999&#8230; means. Most mathematicians see the problem like this:</p>


<ul>
<li>0.999&#8230; represents a series of numbers: 0.9, 0.99, 0.999, 0.9999, and so on</li>
<li>The question: does this series get <em>so close</em> (converge) to a result that we cannot tell it apart?</li>
</ul>



<p>This is the reasoning behind <em>limits</em>: Does our &#8220;thing to examine&#8221; get <em>so darn close</em> to another number that we can&#8217;t tell them apart, no matter how hard we try?</p>

<p>&#8220;Well,&#8221; you say, &#8220;How do you tell numbers apart?&#8221;. Great question. The simplest way to compare is to subtract:</p>


<ul>
<li>if a &#8211; b = 0, they&#8217;re the same</li>
<li>if a &#8211; b is not zero, they&#8217;re different</li>
</ul>



<p>The idea behind limits is to find some point at which &#8220;a &#8211; b&#8221; becomes zero (less than any number); that is, we can&#8217;t tell the &#8220;number to test&#8221; and our &#8220;result&#8221; as different.</p>

<h2>The Error Tolerance</h2>

<p>It&#8217;s still tough to compare items when they take such different forms (like an infinite series). The next clever idea behind limits: define an <em>error tolerance</em>:</p>


<ul>
<li>You give me your tolerance for error / accuracy level (call it &#8220;e&#8221;)</li>
<li>I&#8217;ll see whether I can get the two things to fall within that tolerance</li>
<li>If so, they&#8217;re equal! If we can&#8217;t tell them apart, no matter how hard we try, they must be the same.</li>
</ul>



<p>Suppose I sell you a raisin granola bar, claiming it&#8217;s 100 grams. You take it home, examine the non <span class="caps">FDA</span>-approved wrapper, and decide to see if I&#8217;m lying. You put the snack on your scale and it shows 100 grams. The scale is accurate to 1 gram. Did I trick you?</p>

<p>You couldn&#8217;t know: as far as you can tell, within your accuracy, the granola bar is indeed 100 grams. Our current problem is similar: I&#8217;m selling you a &#8220;granola bar&#8221; weighing 1 gram, but sneaky me, I&#8217;m actually giving you one weighing 0.999&#8230; grams. Can you tell the difference?</p>

<p>Ok, let&#8217;s work this out. Suppose your error tolerance is 0.1 gram. Then if you ask for 1, and I give you 0.99, the difference is 0.01 (one hundredth) and you don&#8217;t know you&#8217;ve been tricked! 1 and .99 look the same to you.</p>

<p>But that&#8217;s child&#8217;s-play. Let&#8217;s say your scale is accurate to 1e-9 (.000000001, a billionth of a gram). Well then, I&#8217;ll sell you a candy bar that is .999999999999 (only one <em>trillionth</em> of a gram off) and you&#8217;ll be fooled again! Hah!</p>

<p>In fact, instead of picking a specific tolerance like 0.01, let&#8217;s use a general one (e):</p>


<ul>
<li>Error tolerance: e</li>
<li>Difference: Well, suppose e has &#8220;n&#8221; digits of precision. Let 0.999&#8230; expand until we have a difference requiring <strong>n+1</strong> digits of precision to detect.</li>
<li>Therefore, the tolerance can always be less than e! And the difference appears to be zero.</li>
</ul>



<p>See the trick? Here&#8217;s a visual way to represent it:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/0.999/visualizing_0.999.png" alt="visualizing 0.999..." title = "visualizing 0.999..." /></img></p>

<p>The straight line is what you&#8217;re expecting: 1.0, that perfect granola bar. The curve is the number of digits we expand 0.999&#8230; to. The idea is to expand 0.999&#8230; until it falls within &#8220;e&#8221;, your tolerance:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/0.999/beating_the_error_margin.png" alt="beating the error margin" title = "beating the error margin" /></img></p>

<p>At some point, <em>no matter what you pick for e</em>, 0.999&#8230; will get close enough to satisfy us mathematically.</p>

<p>(As an aside, 0.999&#8230; isn&#8217;t a <em>growing process</em>, it&#8217;s a final result on its own. The curve represents the idea that we can approximate 0.999&#8230; with better and better accuracy &#8212; this is fodder for another post).</p>

<p>With limits, <strong>if the difference between two things is smaller than any margin we can dream of, they must be the same.</strong></p>

<h2>Assuming Infinitesimals Exist</h2>

<p>This first conclusion may not sit well with you &#8212; you might feel tricked. And that&#8217;s ok! We seem to be ignoring something important when we say that 0.999&#8230; equals 1 because <em>we</em>, with our finite precision, cannot tell the difference.</p>

<p>Newer number systems have developed the idea that infinitesimals exist. Specifically:</p>


<ul>
<li>Infinitely small numbers can exist: they aren&#8217;t zero, but look like zero to us.</li>
</ul>



<p>This seems to be a confusing idea, but I see it like this: atoms don&#8217;t exist to cavemen. Once they&#8217;ve cut a rock into grains of sand, they can go no further: that&#8217;s the smallest unit they can imagine. Things are either grains, or not there. They can&#8217;t <em>imagine</em> the concept of atoms too small for the naked eye.</p>

<p>Compared to other number systems, we&#8217;re cavemen. What we call &#8220;tiny numbers&#8221; are actually gigantic. In fact, there can be another &#8220;dimension&#8221; of numbers too small for us to detect &#8212; numbers that differ <em>only</em> in this tiny dimension look identical to us, but are different under an infinitely powerful microscope.</p>

<p>I interpret 0.999&#8230; like this: Can we make a number a bit less than 1 in this new, infinitely small dimension? </p>

<h2>Hyperreal Numbers</h2>

<p>Hyperreal numbers are one system that uses this &#8220;tiny dimension&#8221; to examine infinitely small numbers. In this, infinitesimals are usually called &#8220;h&#8221;, and are considered to be 1/H (where big H is infinity).</p>

<p>So, the idea is this:</p>


<ul>
<li>0.999&#8230; &lt; 1  [We're assuming it's allowed to be smaller, and infinitely small numbers exist]</li>
<li>0.999&#8230; + h = 1   [h is the infinitely small number that makes up the gap]</li>
<li>0.999&#8230; = 1 &#8211; h [Equivalently, we can subtract an infinitely small amount from 1]</li>
</ul>



<p>So, 0.999&#8230; is just a <em>tiny</em> bit less than 1, and the difference is h!</p>

<h2>Back to Our Numbers</h2>

<p>The problem is, &#8220;h&#8221; doesn&#8217;t exist back in our macroscopic world. Or rather, h looks the same as zero to us &#8212; we can&#8217;t tell that it&#8217;s a tiny atom, not the lack of any matter altogether. Here&#8217;s one way to visualize it:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/0.999/infinitesimal_difference.png" alt="infinitesimal difference" title="infinitesimal difference" /></img></p>

<p>When we switch back to our world, it&#8217;s called taking the &#8220;standard part&#8221; of a number. It essentially means we throw away all the h&#8217;s, and convert them to zeroes. So,</p>


<ul>
<li>0.999&#8230; = 1 &#8211; h [there is an infinitely small difference]</li>
<li>St(0.999&#8230;) = St(1 &#8211; h) = St(1) &#8211; St(h) = 1 &#8211; 0 = 1 [And to us, 0.999... = 1]</li>
</ul>



<p>The happy compromise is this: in <em>a more accurate dimension</em>, 0.999&#8230; and 1 are different. But, when we, with our finite accuracy, try to describe the difference, we cannot: 0.999&#8230; and 1 look identical.</p>

<h2>Lessons Learned</h2>

<p>Let&#8217;s hop back to our world. The purpose of &#8220;Does 0.999&#8230; equal 1?&#8221; is <em>not</em> to spit back the answer to a limit question. That&#8217;s interpreting the query as &#8220;Hey, <em>within our system</em> what does 0.999&#8230; represent?&#8221;</p>

<p>The question is about exploration. It&#8217;s really, &#8220;Hey, I&#8217;m wondering about numbers infinitely close together (.999&#8230; and 1). How do we handle them?&#8221;</p>

<p>Here&#8217;s my response:</p>


<ul>
<li>Our idea of a number has evolved over thousands of years to include new concepts (integers, decimals, rationals, reals, negatives, imaginary numbers&#8230;).</li>
<li>In our current system, we haven&#8217;t allowed infinitely small numbers. As a result, 0.999&#8230; = 1 because we don&#8217;t allow there to be a gap between them (so they must be the same).  </li>
<li>In other number systems (like the <em>hyperreal numbers</em>), 0.999&#8230; is less than 1. Here, infinitely small numbers are allowed to exist, and this tiny difference (h) is what separates 0.999&#8230; from 1.</li>
</ul>



<p>There are life lessons here: can we extend our mental model of the world? Negatives gave us the conception that every number can have an opposite. And you know what? It turns out matter can have an opposite too (Dark matter destroys regular mass when they come in contact, just like 3 + (-3) = 0).</p>

<p>Let&#8217;s think about infinitesimals, a tiny dimension beyond our accuracy:</p>


<ul>
<li>Some theories of physics reference tiny &#8220;curled up&#8221; dimensions which are embedded into our own. These dimensions may be infinitely small compared to our own &#8212; we never notice them. To me, &#8220;infinitely small dimensions&#8221; are a way to describe something which is there, but undetectable to us.</li>
<li>The physical sciences use &#8220;significant figures&#8221; and error margins to specify the inherent inaccuracy of our calculations. We <em>know</em> that reality is different from what we actually measure: infinitesimals help make this distinction explicit.</li>
<li>Making models: An infinitely small dimension can help us create <a href="http://betterexplained.com/articles/why-do-we-need-limits-and-infinitesimals/">simple but accurate models</a> to solve problems in our world. The idea of &#8220;simple but accurate enough&#8221; is at the heart of <a href="http://betterexplained.com/articles/a-betterexplained-guide-to-calculus/">calculus</a>.</li>
</ul>



<p>Math isn&#8217;t just about solving equations. Expanding our perspective with strange new ideas helps disparate subjects click. Don&#8217;t be afraid wonder &#8220;What if?&#8221;.</p>

<h2>Appendix: Where&#8217;s the Rigor?</h2>

<p>When writing, I like to envision a super-pedant, concerned more with satisfying (and demonstrating) his rigor than educating the reader. This mythical(?) nemesis inspires me to focus on intuition. I really should give Mr. Rigor a name.</p>

<p>But, rigor has a use: it helps ink the pencil-lines we&#8217;ve sketched out. I&#8217;m not a mathematician, but others have <a href="http://arxiv.org/abs/0811.0164">written about the details</a> of interpreting 0.999&#8230; and 1 or less than 1:</p>

<blockquote>
&#8220;So long as the number system has not been specified, the students&#8217; hunch that .999&#8230; can fall infinitesimally short of 1, can be justified in a mathematically rigorous fashion.&#8221;<br />
</blockquote>

<p>My goal is to educate, entertain, and spread interest in math. Can you think of a more salient way to get non-math majors interested in the ideas behind analysis? Limits aren&#8217;t going to market themselves.</p>]]></content:encoded>
			<wfw:commentRss>http://betterexplained.com/articles/a-friendly-chat-about-whether-0-999-1/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 8/14 queries in 0.015 seconds using disk

Served from: betterexplained.com @ 2010-07-29 21:48:49 -->