Last time, we saw how abstraction simplifies ideas.

After removing enough detail, a photo of lions turns into the notion of quantity (where *n* happens to be 3 in this case).

Let's apply this to a function like f(x) = x^{2}. What's the simplified essence?

Here were my first thoughts as I worked through the idea:

**Abstraction 1: Multiple shapes**

First, look at a few representations of x^{2}. The common cliche is that it represents a square of side x, but we can be more creative. What about a rectangle with sides frac(1)(2)x and 2x? How about a portion of a circle? (If text(area) = π r^{2} then frac(1)(π) (32%) should leave us with r^{2}.)

**Abstraction 2: Examine the specific changes**

Next, look at the changes that happen with each of our shapes. The square gets equal lengths added to each side. The rectangle gets a "long, skinny" and "short, fat" added to each side. (The corners can be ignored for now.)

The changes to the circle are the simplest, with a small arc being added.

**Abstraction 3: Make the changes general**

Like the lion scenario above, we have a unique representation of each change ("three lion icons"). Let's make the changes generic (three lines) by finding a common format.

Here, we "melt down" each change until it resembles a straight line. Because the square, rectangle, and circle all represent x^{2}, the same line can describe the changes they undergo. Neat!

Now that's some nice abstractin', let's keep it going:

**Abstraction 4: Separate the line**

The orange "change line" is actually a transition between a starting and ending position. If we represent the start and end as blue dots, the height of the line is the amount of change between them.

Notice how we make an angled line as well: the input change (blue line) and output change (orange line) trace out the rate of change (green line).

**Abstraction 5: Show every state and angle**

Rather than picking specific starting and endpoint positions, graph *every* position (blue curve) and *every* rate of change (green line at each point).

The blue curve actually *generates* the green line: at any point, we can draw the tangent line and see the "change angle" to the next neighbor.

Here's where I get excited. On a graph, we're used to literal representations: we need a bigger line to represent a bigger change. But an angle (a certain ratio of height:width) represents every number in the same amount of space!

0:1 is 0 degrees

1:1 is 45 degrees

2:1 is 63.4 degrees (arctan(2) = 63.4)

100:1 is 89.4 degrees (arctan(100) = 89.4)

By using an angle, we've curled the number line into a format that fits into any space. Even a giant number like 10,000,000,000 can be written with the same effort as "1". Must bigger numbers take up more room?

We have a clean abstraction: **The curve shows every possible scenario, and the angle quantifies the rate of change**. In a way, the curve "writes down" its rate of change at every point.

Yowza. Maybe we discussed this in class, but I didn't think of it this way until trying to abstract each step.

This was a peek into an organic "aha-finding" technique: start with a specific idea, keep generalizing, and see what insights emerge.

Happy math.

]]>Let's change the generic "Math teaches you to think" to a more specific "Math helps us simplify ideas". We hide detail after detail to reveal an essential truth.

Is this style of thinking necessary? Required for survival? Usually not. But it's often interesting.

What's the simplest drawing you can recognize as a face? What's the simplest joke that's still funny? The simplest exercise that grows a muscle? Would knowing that improve your art, humor, or fitness?

What's in this picture?

A computer says "millions of pixels" and you say "three lions". In seconds you threw away countless details to reveal a deeper insight.

What happened? We abstracted the scenario into something simpler.

- Remove background from foreground
- Remove differences between each animal
- Remove "animal-ness" (treat lions as generic "lines")
- Remove need to count objects with literal lines
- Remove need to specify a fixed number ("n happens to be 3 today")

We tend to call the steps we're explicitly aware of "math". Once it becomes natural, it's just "effortless seeing". (Wouldn't it be nice to move more concepts into the "effortless" category?)

Let's try the "math simplification" on a bigger idea: learning.

What does learning involve? At its bare essence, what do we need?

`Learning = Insight + Enthusiasm`

Insight (for me) comes from Analogies, Diagrams, Examples, Plain English descriptions, and Technical definitions. (Read more about the ADEPT method)

Enthusiasm comes from humor, warmth, empathy, and being treated like a human (not math robot).

A good lesson has both. But wait: is enthusiasm enough by itself? Hrm. Maybe it's better written:

`Learning = Insight * Enthusiasm`

- If you have 0 for either, you aren't really learning.
- "Negative insight" is learning something false.
- "Negative enthusiasm" is hating something, even to the point of discouraging others.
- "Negative insight with negative enthusiasm" could be discouraging others from learning something false (which is good, right?).

This is just playing with words and pseudo-equations. Sure. But seeing how enthusiasm impacts education reveals a truth: an educational experience can become negative when enthusiasm points the wrong way.

The equations above don't have to be "right". They're helping us work through an idea. The math approach is to isolate the key factors and figure out how they're related.

For something like a car, the key elements seem to be:

`Car = Propulsion * Control`

Traditionally, the details of propulsion involve a gas engine, and the details of control require a human driver. But we're interested in abstraction: are these details we can hide?

Maybe propulsion can be electric. Maybe control can be from a computer. A self-driving electric car satisfies the essence of the equation with different details. (Just like 1 apple + 2 apples = 3 apples works as well as 1 lion + 2 lions = 3 lions.)

Asking the right question is difficult, and critical. For this problem, what are the essential variables? What counts, and what can be thrown away?

A lot of people argue that "math helps your programming". Yes, but not in the way you think.

Most programmers don't use anything beyond algebra and basic statistics. (Yes, yes, if you're working on a video game physics engine you can sit down.)

The key lesson from math is how it abstracted the vast complexity of the world. Here are a few fundamental types of "quantity":

- integers (whole numbers)
- floats (decimal numbers)
- hexadecimal numbers (whole numbers with a simpler way to use powers of 2)
- null (an unset number, different from zero)

Programmers don't need math skills so they can crank through arithmetic. They need math to see examples of the world getting simpler.

Any piece of data (text, images, video, etc.) can be expressed as a giant list of numbers, a combination of the above elements. That's pretty simple.

What other metaphors from math (functions, structure, change, chance) can help us simplify our code?

Bret Victor has a wonderful essay on the Ladder Of Abstraction.

If a new concept is difficult for me, I wonder if I'm at the right level of detail. There's no all-purpose answer like "less detail is better". Sometimes you're staring at your feet and need to zoom out, sometimes you're in the clouds and need to zoom in.

Analogies, Diagrams, Examples, Plain English and Technical definitions, throw them at the wall and trial-and-error a way to better understanding. Like getting an eye exam, move closer or further from an idea until it snaps into focus.

Happy math.

]]>Sure, except your photos come out like this:

(An old-timey selfie. Source.)

The dilemma: You need a camera for the photo, but don't want the camera *in* the photo. The instrument shouldn't appear inside the subject. (*Hubert, you're leaving scalpels in the patient again.*)

So, we need an isolated photo of a shiny object. What can we do?

**Shrink it down**: Make the camera as small as possible. Microscopic, a fleck of dust. But even that speck will show up on the sphere. Take the photo, and fix the blemish with our best guess given the surrounding pixels.**Go invisible**: Make the camera unobservable to the subject: make it from perfectly transparent glass, or actively camouflage with your surroundings (like an octopus). The camera is there, looking at the subject, but the subject cannot notice it.

In Calculus, a function like f(x) = x^{2} is our subject. Limits (shrinking) and infinitesimals (invisibility) are how we take photos without our reflection getting in the way.

Consider a function like f(x) = 2x + 3. If I take a photo with my camera, I get:

- Before: f(x) = 2x + 3
- After: f(x + text(camera)) = 2(x + text(camera)) + 3 = 2x + 3 + 2text(camera)

We have the original function, and put the camera into the scene. The result is the original function (2x + 3) and the camera observing "2". That is, the camera thinks "2" is how much the function has changed. (And yes, frac(d)(dx) 2x + 3 = 2.)

Ok. Now take a function like f(x) = x^{2}. Again, let's put the camera into the scene to observe changes:

- Before: f(x) = x
^{2} - After: f(x + text(camera)) = (x + text(camera))
^{2}= x^{2}+ 2x · text(camera) + text(camera)^{2}

Hrm. The camera is directly observing some changes (2x · text(camera)) but there's another text(camera)^{2} term: the camera is observing its own reflection! The term text(camera)^{2} only exists because we have a camera in the first place. It's an illusion.

What's the fix?

List all the changes the camera sees:

Figure out what the camera directly observed. We divide to see what was "attached" to the camera:

Remove "reflections" where the camera saw itself:

From a technical perspective, the last step happens by shrinking the camera to zero (limits) or letting the camera be invisible (infinitesimals).

Neat, eh? We're reframing the process of finding the derivative: make a change, see what the direct effects are, remove the artifacts. The concept of "what the camera directly sees" and the camera's "reflection" help settle my mind about throwing away terms that appear to be there.

In math, we have fancy terms like *linear* and *non-linear* functions. We can think in terms of "shiny" or "dull" functions.

Linear functions are dull because they only have terms like x or constant values -- the camera can attach directly, and there's no reflection. Non-linear functions have self-interactions (like x^{2}) which means the camera has a chance to see itself. Reflections need to be removed.

With multiple subjects [f(x), g(x)] or multiple cameras (for the x, y and z axis) we get cross terms like df · dg or dx · dy. The goal is the same: remove unnecessary self- and cross-reflections from the final result. Show what the camera directly sees.

A few related blog posts on limits:

Regular calculus books use dx as the camera to detect change. The goal is to introduce a change (dx), then get the difference (f(x + dx) - f(x)).

This difference (for example, 2x · dx + dx^{2}) isolates the changes that dx is directly responsible for ("sees"). We can then divide by dx to get the change as a rate (how much we got out for how much we put in).

The concern is the same: the change dx may have reflections (dx^{2}) that need to be removed.

The Hawthorne Effect is where people behave differently when being studied. The study itself is appearing in the results.

If you ask people to enter a study about their eating, exercise, reading, or sleeping habits, those behaviors will change. (Gotta look good for the camera! Where are those Greek philosophers I'd always meant to read?)

Math gives us a few suggestions:

**Shrink the effect:**Make the study as non-intrusive as possible (like an iPhone passively monitoring your steps). Even then, figure out how much the results are skewed and adjust for this. (*You left your phone on the washing machine again, you sly dog.*)**Make the observations invisible:**Imagine you don't know when the study is going to start. "Sometime in the next 20 years we'll silently observe your grocery shopping habits. Sign here." Hrm. You won't change your behavior for 20 years "just in case", so you'll just be you.

Think math only applies to equations? Hah. Only if we don't internalize the underlying concept.

Happy math.

]]>Ok. For that difficult concept, what *finally* made it click? It's usually:

- An analogy
- A diagram
- An example
- A friendly, plain-English description

Rarely is it because we're lacking:

- A technical definition
- A new technology
- A gamified incentive
- "more time" (I lack motivation, not time)

The limiting factor -- the thing holding me back -- is how I approach a concept.

Imagine you're teleported to a Roman classroom. Kids -- heck, the adults -- are struggling with multiplication. (*IV times VII is really hard!*)

What do you fix: Flip the classroom? Gamify things? Invent a printing press to distribute more worksheets?

Helpful, in time. But the first fix should be a simple discussion:

Hey, I'm from the future. Yes, it's pretty nice. But first, we need to fix your concept of a number. Individual lines for digits is cumbersome. Instead, think in groups of ones, tens, hundreds, and so on. Now multiplication is built into your numbers, and arithmetic gets a lot easier. Let me show you...

Boom. The "Roman Numeral Problem" is not fixed with better tech. Just a better understanding.

Ok. Imagine a time traveler (you, 6 months from now) is going to tutor you today. What would they suggest?

**Imaginary numbers:**Don't try to conceptualize "the square root of a negative number". That's really clunky. Think about rotations instead.

**Trigonometry:**Don't try to memorize SOH-CAH-TOA and a mess of equations. Visualize a single diagram and the connections jump out.

**Calculus:**Don't force yourself through epsilon-delta proofs. Practice breaking things apart, putting them together, and get a feel for the patterns.

**Fourier Transform:**Don't simply memorize the formula. Internalize the notion of a*cycle recipe*and practice going from a pattern, to the recipe, and back.

Focus on the problems a time traveler would fix first.

While drafting this post, a comment came in:

So, I just started learning about imaginary numbers in math class, and I was so confused. I understood the idea, but not the practical application or really what i was. I am a person who needs to understand a concept fully, I have trouble accepting that i=the square root of -1. I was googling it and I only got more confused. Then, I found your article on imaginary numbers, and all of a sudden, I got it. I could visualize it, even though I have no specific examples of their importance, I can understand why and how they could be important. It clicked. It doesn't make me want to go do my worksheet on adding and subtracting them, but in math tomorrow, I will be a much happier camper. -Abby

It drives me crazy to see endless tutorials on imaginary numbers that don't address the *fundamental confusion* of how a negative number can have a square root. You can give me all the videos and interactive quizzes you want, I'm not truly learning until you explain the notion of a rotation.

This misprioritization shows up everywhere:

Fix the plot, then worry about special effects.

Fix the recipe, then worry about decor.

Fix the melody, then worry about the instruments.

Fix the analogy, then worry about the presentation format.

Identify what's held you back and fix that first.

Happy math.

Technology helps with certain limitations (access, distribution, cost). But the quality of the source material is still up to us. I'd prefer handwritten letters with Socrates to a HD video conference with Carrot Top.

Veritasium has a great video on these lines ("This Will Revolutionize Education"):

If we think the limiting factor in education is still distribution, we'll focus on technical solutions.

But you know what? We've had Shakespeare online for a few decades now. Modern kids must be poetry experts because of free access to quality literature, right?

It's not an access problem any more. It's a motivation, interest, enthusiasm, understanding-what's-actually-going-on problem. Let's fix that first.

]]>