Saturday, October 29, 2011

Note Taking in Math Class

I'm a math undergrad with a real passion for mathematics (enough to try to maintain a blog about it). As of today, I'm taking four math classes, have a gpa of 3.9, and spend a good amount of my time tutoring. Also, I don't take notes.

I'm not sure what place note taking has in a math classroom. The books that I spent more than $100 a piece on (way too much!) cover all the same content that my classmates' notes do. If I forget the definition of the Laplace Transform, then I don't need notes to look back on, I have a book. Failing that, I have Wikipedia, Wolfram's Math World, and Paul's Online Math Notes. If I need to have problem worked out, I have Khan Academy or any other of a variety of YouTube videos. My school, and I imagine every other school in the world, is packed with thousands of books, many of which are about differential equations. If I need help with Laplace Transforms, or any other topic in math, I have a plethora of sources to reference. Why then, on top of all that, should I take notes?

Further, I think taking notes in math class have negative consequences. Sometimes I look around and notice my classmates too absorbed in their note taking to actually be paying attention in class. The professor might add a bit of interesting information verbally, and my classmates are often too busy copying what's on the board to hear it. Also, there is the problem of divided attention: if your attention is being put into your notes, you are not working on comprehending the material. I assume that these students go back over their notes at a later time and try to make sense of the material then, but that has to be very tough when there is no professor to offer insights.

So why do so many students take notes? I suspect it's because of years of programming by high school and elementary school teachers. I also think it's because students have developed skills that are appropriate for other classes (note taking is very valuable in English or history class) and mistakenly believe that those good habits will translate to their math classes. I think all of this negatively impacts math students' education.

Monday, October 24, 2011

Wrong vs. Not Helpful

In solving a problem, students inevitably make mistakes. This is how we learn. However, there is a huge difference between being wrong and being not helpful.


Suppose a student is asked to solve the following for x:

Seeing the 2 next to the x, a student may try to divide both sides by 2. This can be done correctly, but let's assume that the distributive rule is momentarily forgotten:

This leads to the incorrect answer of x = 1, whose falsity can be demonstrated by substituting 1 in for x in the original equation (which would give 6 = 10).

Not Helpful

Now imagine that the student takes the same equation, and subtracts 2x from both sides, giving:

This is not wrong, subtracting 2x is not a violation of any mathematical rule, but neither is it helpful. A student who attacks a problem like this may still be in need of assistance, but a different type of assistance from before.

My Point

This distinction is obvious to educators. It is not, however, necessarily obvious to students. And it needs to be made obvious to students. There is a rampant misconception of math that there is a right way and a wrong way of doing math, and if you're not not doing it correctly, you're wrong. (I previously wrote about that here.) Sometimes you're doing something useless that is not necessarily wrong. And that is ok.

I think a good way to get this distinction across is by way of analogy. Consider chess: there is a notable difference between a wrong move (moving a rook diagonally) and a foolish one (exposing yourself to checkmate).

Friday, September 16, 2011

Six Study Tips for Math

Math is Hard. It really, really is. There are thousands of tips on how to succeed in math class, here are some that I think are especially important.

Create Your Own Problems

Solving someone else's math problems demonstrates and ability to follow rules. Creating your own problems shows an understanding of the subject. It also forces creativity, an essential (and often overlooked) skill in mathematics.

Compare and contrast problems

Post game Analysis is so underrated. After doing 5 or 6 problems, ask yourself: which of these was the hardest? The easiest? What did all the problems have in common? What made them unique?

Don't Do Your Homework All at Once

If you decided to start training for a marathon, you wouldn't start by going outside and just running for four hours straight. Instead, you would run a little each day until you got into shape. Math is no different. Study or do homework for 20 minutes to half hour at a time. Then read a book, or make dinner, or call a friend... whatever. Just don't sit and do math for hours on end, it's counterproductive.

Do math in your downtime

Play math games; practice your arithmetic. I like factoring numbers in my head (the time on a digital clock, licence plates), it keeps me sharp, and it strengthens my ability to visualize difficult problems.

Read the Textbook

Yes, I know it's poorly written, all text books are. And no, you're not going to understand after one read through. But reading the text will at least familiarize yourself with the vocab and notation.

Later, when getting help (in class, from a tutor, from a friend) reflect on what you read. Why didn't you understand it when you read it? Do you understand it now? Over time you will learn to read math books.

The Internet is Awesome

Read the Wikipedia article on what ever it is you're studying. Look at the pictures. Google the subject, or watch lectures on YouTube. The more versions of a lesson you get, the more likely you are to gain insight.

Monday, August 8, 2011

Math: Discovered or Invented?

In my previous post, I offered up two classes of truths: Discovered Truths (The Earth is round) and Created Truths (Darth Vader is Luke Skywalker's Dad). Then I asked what class mathematical truths (2+2=4) belong to. Here are some possible answers:

Math is Discovered

Math, like science, is something we discover. Before there was anyone to count them, one dinosaur and one dinosaur made two dinosaurs. Before we had a word for 50, it was still the sum of two squares in two different ways (7²+1² = 5²+5² = 50).

Math is Created

Math is an art and, like the arts, is a creation. We create the truths in math. Mathematical objects like triangles and the number 17 are created by mathematicians, thus any truths about them are constructed.

Math is A Priori

Unlike the arts, which are dependent on our imaginations, or the sciences, which are dependent on the physical universe, math is A Priori, independent of everything. If there were no physical universe, 1+1 would still equal 2 (though there would be no way to express it). Math does not fit into the categories of "Discovered Truths" and "Invented Truths," Rather, they get their own category: A Priori Truths.

There is No Truth

Truth is a convenient fiction. Language is just a series of meaningless sounds (or symbols) that are used to invoke specific behaviors in others (or oneself). But just because those sounds/symbols succeed in creating reactions in others, doesn't mean they actually mean anything. There is no meaning therefore, there is no truth [footnote 1].

All Truths Are Created

We create our language(s), we express all of our truths with language, therefore we create all of our truths. Any "truth" of science (or math) is a construct of our minds and hence a created truth.

All Truths Are Discovered

Every possible linguistic expression is essentially a number (See Jorge Borges, Library of Babel), all numbers exist independently of us, so any truth expressible in language exists independently of us. More on this soon.

[1] I am very much aware of the irony of using language to express the meaninglessness of language.

Tuesday, July 12, 2011

What Is Your Math Philosophy?

Calvin and Hobbes
Truth is a tricky thing. Some things are true because we say so, others are true independent of us. Lets call these two classes of truths Created Truths and Discovered Truths. Some examples of Created Truths:

  • In chess a bishop moves diagonally.
  • The ninth word in Never Gonna Give You Up is rules.
  • The main character in the above comic strip is named Calvin.
  • Darth Vader is Luke Skywalker's father.
  • Peter Parker is Spiderman.

All of these things are true because someone said so (the creator(s) of chess, Rick Astley, Bill Watterson, George Lucas, and Stan Lee).

Some examples of Discovered Truths:

  • The Earth revolves around the sun.
  • Water and ice have the same molecular structure.
  • Your eye color is determined by your genes.
  • Fire burns wood.
  • Iron is attracted to magnets.

Each of these is true independent of us. No one decided that the Earth revolves around the sun, it just does.

Now consider Mathematical Truths. Some examples:

  • 2 + 2 = 4
  • There is no largest prime number
  • 1729 can be written as the sum of two cubes in two different ways
  • The graph of y = x²-2x+3 has a minimum at (1,2).
  • The area of a circle with radius r is πr²

Are these truths discovered or created?  More on this soon.

Tuesday, June 14, 2011

David the Gnome

My hat is conical!
When I was very young I watched a show called David the Gnome. As you might guess, the show was about David and he was a gnome. Not a terribly creative title, but when I was young I was captivated.

The Wikipedia article on David the Gnome says that the American version was actually a dubbed Spanish version that was based on a book written by a Dutch author. So apparently, in addition to being a gnome, David was an ambassador to the UN.

In one of David's adventures, he came across a chicken with six chicks. Tragically, the chicken could only count to three, and the chicks kept getting lost without the mother hen even knowing. Although a negligent parent, you have to give the bird bonus points for being able to count at all. [footnote 1]

David, recognizing the problem as a serious one, taught the mother that she should arrange her chickens in two groups of three. The mother could count to three, and she could do it twice, thus she could keep track of all her baby chicks. [footnote 2]

I think that the simple brilliance of this might have been lost on even the creators of the show. David’s poultry grouping insight alludes to many fundamental concepts in mathematics. The fact that every whole number can be represented with a unique product of its prime factors (like 6 = 2×3) is called the fundamental theorem of arithmetic. Had the mother had a prime number of chicks (like five or seven) David’s solution wouldn’t have been so simple because neither 5 nor 7 can be written as a product of smaller numbers.

The chicken could even keep track of 12 chicks, though it's a little trickier. You couldn't put the chicks in 2 rows of 6 (mama chicken can't count to 6), nor could you put them in 3 rows of 4 (4 is still too big), but you could put the chicks in three 2 by 2 groups:

You could also organize a peep of 18, or 27. If you're clever, you can do 16 too.

In addition to the fundamental theorem of arithmetic, David alluded to a tool often employed by mathematicians: when confronted with a difficult problem, reduce it to a problem that’s already been solved. Rather than teach  the mama chicken how to count higher, most likely an impossible task, he had the chicken do the something simple twice.

David applied simple and elegant mathematical thinking to a life threatening situation and his solution is profound, yet straightforward enough for an animated chicken to understand. He's my hero.


[1] There is actually some anecdotal evidence that some birds can count as high as three. (Chapter 1, fourth paragraph)
[2] I like to imagine that before David came across the chicken, there were at least a dozen more chicks, all dead now due to negligence.

Monday, June 13, 2011

Fret Spacing on a Guitar

As you look down the neck of a guitar, the frets get closer and closer. What is the rule for deciding how close the frets should be?

Guitar Fretboard

Preliminary Information:
  1. A string halved in length vibrates at twice the frequency (physics).
  2. An octave is the interval between one musical pitch and another with half or double its frequency (Wikipedia article on octaves).
  3. There are 12 notes in an octave (music theory).
To go up one octave, you have to halve your string. To go up another octave you must quarter your string. In general, to go up t octaves you need to have a string of length 

To have our length function, l, go up by twelfths of an octave (notes) rather than octaves, we need to adjust it to be:

Wednesday, June 8, 2011

Khan Academy

I love Khan Academy, and I've been recommending it to the students I tutor since I first learned about it. It has the potential to revolutionize education, but not everyone agrees. I think it (or something like it) will be the future of math education.

The Khan Model, A Two Act Play:

Act I: Old Model
In School
Teacher: Teach, teach, teach, teach, teach.
Student: Ms. Teacher, I don't quite understand.
Teacher: I'd love to individualize your education Sally, but it's time for you to go to your next class.
At Home
Student: I hate math.

Act II: Khan Model
At Home
Computer: Teach, teach, teach, teach, teach.
In School
Student: Ms. Teacher, I don't quite understand.
Teacher: Well Sally, seeing how you already heard the bulk of the lesson at home, I have plenty of time to individualize your education.
Everyone: Yay!

The End

Monday, June 6, 2011

The Myth of the Right Answer

Some time ago, a math student asked me and my fellow tutors a question from his class: how many diagonals are there in an n-sided regular polygon? We all went to work and came up with different solutions. When finished, the student asked which answer was the right one. Here are our solutions:

The student's solution was simple: draw a regular polygon and simply count how many diagonals. This works, and I've put together an applet that allows you to do exactly that (Java needs to be enabled):
Error: Embedded data could not be displayed.
Use "+" to increase the number of vertices and "-" to decrease them.

If you let n be 4, you can clearly see that there are 2 diagonals (in purple). Letting n equal 5, you can count 5 diagonals. The counting solution works, but with a catch. Let n be 10; can you still count how many diagonals there are? What if n is 15? At some point it just gets ridiculously hard to count the number of diagonals. This doesn't mean the solution is wrong (it's not, in principle you'll always be able to count how many diagonals), only that it's not a very useful solution.

My first approach to a problem like this is usually looking for a recursive formula (this post for example). Recursive formulae are not very easy to work with, but recursive patterns are relatively easy to spot. Patterns are easier to see when the data is organized, so I'm going to arrange what I found by the counting solution:


For every n-gon, there are d diagonals. Can you see the pattern here? Look at how much the d row changes each step:

Each blue number is the difference between the two d values above it. As you can see, the blue numbers are always one less than the n numbers. This suggests the following formula:

With the initial condition d3 = 0.  This predicts that the next d value should be 20 (14+6), which can be confirmed by counting. This is an improvement over the counting solution, it no longer means drawing time and space consuming pictures, but it's far from optimal. Recursion is messy and a bit of a pain. In order to find a particular d, you first have to find the d that comes before it. But to find that d, you first have to find the one that comes before it. And it goes on that way until you get to the beginning. It takes a lot of work:

It takes the above video 3 minutes to evaluate something as simple as d6, whereas the counting method would take only 30 seconds. So is this the better solution? It depends. This method is purely algebraic, which means it can be programmed [footnote 1]. It also has the advantage of being cumulative, if you have d6, it's really easy to find d7, just add (6-1). With the drawing method you would have to draw a whole new picture.
If you expand the recursive formula from above, you'll start to see a pretty simple pattern:

This pattern shows that to find dn you just have to add all the numbers from 2 to n -2. This is just simple addition that can be quickly computed by hand, on a calculator, or in a spreadsheet. With sigma notation, this can be condensed to:

Is this the best answer? Well, it's certainly simpler than the recursive definition, but it's still a lot of computation.

We have the result

which can also be rewritten as

(Same thing as before, just with the terms reordered.) If we add the first to the second we get:

In the sum, n appears exactly (n-3) times, so we have the result

and with some algebra magic we get

This is a fantastic result, but is it a better result? All all of our previous results required a bunch of computation, this just requires three steps: subtract 3, multiply by n, divide by 2. But on the other hand, I think this ultra tidy result masks the meaning of the solution. It doesn't give any indication as to why that's the answer, it only gives you an answer. In other words, easy to use, difficult to understand.

If we're technologically inclined, we can just take a few values (from the counting solution) and pop them into a spreadsheet application. From there we can extrapolate the data using a trend line. If you're used to this kind of thing, you might have a hunch that the data fits a quadratic, if not, you would have to try a few different options before determining which is best:

With an R squared value of 1, we can be pretty sure that this is the curve of best fit. Since 2E-14 = .00000000000002, I'm going to assume the curve of best fit is 

which is equivalent to our other solutions.

Is this the best solution? It certainly is the least amount of work. But it doesn't come from any reasoning and doesn't offer any insights. In this case it works, but in general interpolation methods are an unreliable way to come to an answer.

Different solutions provide different insights. In addition to what we've already done, this problem can be solved with combinatorics.

Each edge is just a connection between two vertices (it's a handshake problem!). Thus, asking how many edges there are is essentially the same thing as asking how many ways can you choose 2 things from a set of n. The answer to that is n choose 2, which can be written many different ways:

We don't want to count the  n edges on an n sided polygon, so the the solution we're looking for is:

This is equivalent to our previous definition [footnote 2]. Is this a best solution? Stop asking that!. It does have a much shorter derivation (assuming you know a little bit of probability theory), but it's more computation (in its unsimplified form; see footnote 2). It certainly provides a different perspective, and having multiple vantage points is always a good thing.

Graph theory
A theorem in graph theory tells us that a complete graph of degree n has n(n-1)/2 edges. This number includes the outside edges, so we adjust for that by subtracting n:

Graph theory is definitely overkill for this problem, but I thought I'd include it to give a taste of what other approaches are out there.

So what is the right answer? An elementary student might say the counting solution. An algebra 1 student might give the summation, a bright algebra 2 student might give the algebraic solution. A college student might solve it with recursion or combinatorics [see footnote 3]. A Statistician may use a interpolation. A more advanced mathematician could give a more advanced solution like the graph theoretical one [see footnote 4].

Easy to understand
Absurdly difficult for large numbers
A new picture has to be drawn for every n
Relatively simple 
Cumulative answers 
Computation intensive
Relies heavily on notation 
Straight forward computation
Computation is tedious
Very simple computation
Solution is difficult to discover
May not be clear why it works
Very easy to find solution
Extrapolation is often an unreliable
No way in advance to know what type of curve (linear, polynomial, exponential...)
Simple solution
Easily computable when simplified
Relies on a branch of mathematic that many students may be unfamiliar with.

While these answers are all equivalent [see footnote 5], they are not all the same. There are plenty of wrong answers, there really is no one right answer.

[1] For example, in Python:

def diagonals(n):
        if n == 3:
                return 0
                return diagonals(n-1) + n-2

[3] As part of my research for this post, I gave this problem to a small group of very bright 8th graders. I gave them a brief explanation about how to use subscript, and then gave them about a half hour to figure things out. I told them when they got a wrong answer, but other than that, no coaching. At the end of the half hour, they came up with both the recursive and summation solutions. To say the least, I'm impressed.

[4] A set theorist might do something like:

(set theorists hate you)

[5] They're all equivalent for natural numbers greater than three. For other values, some strange things happen:
n = 3
n = 2
n = 1
n =1/2
* nCr is technically undefined for non-natural values of n, but you can use the gamma function to extend the factorial function and get the answer -1/8.

Saturday, May 28, 2011

Reflexivity, Symmetry and Transitivity

In this post, I will show (using "organic" examples) that Reflexivity, Symmety and Transitivity are independent of each other.


(The diamond represents some arbitrary relation)

The following table summarizes this post:

 Reflexive   Symmetric   Transitive 




By the axiom of regularity, no set is a member of itself:
Using the above A,B and C:


Everything is equal to itself, therefore (by duality) nothing is not equal to itself, and inequality is irreflexive.


This definition for approximation is not universal, but I think it's good enough. The basic idea behind it not being transitive is that little bits added to little bits eventually make big bits.

Less than
By definition, less than is irreflexive, symmetric, and transitive.


 a → a 

  a    b  
 (a → b) ↔ (b→a) 
  T    T  

  a    b    c  
 ((a → b) Λ (b → c)) → (a → c) 
  T    T    T  

The reflexive and transitive truth tables are tautologies, therefore implication is reflexive and transitive. The symmetric truth table is contingent, therefore implication is not symmetric.

Logical And
And is not reflexive because .
The only time x Λ y is when x = y = 1. Therefore, it is trivially the case that .
The proof for transitivity is similarly trivial.

And is not usually thought of as a relation, but technically it is so I'm using it.

By definition, equality is reflexive, symmetric, and transitive.

Sunday, May 15, 2011

Commutativity and Non-Associativity

This is part three of my three part series on Commutativity and Associativity. In the first part we looked at the definitions of commutativity and associativity. In part two we looked at a system that was associative but not commutative. Now let's look at a system that commutative but not associative.

Rock, Paper, Scissors, Shoot!

This example (found on Wikipedia) is based on the game Rock, Paper, Scissors. (If you don't know how to play look here; if you want to get some practice in, play here.) Recall that Rock beats Scissors, Scissors beats Paper, and Paper beats Rock (for some reason). Let r, p, and s represent rock, paper, and scissors respectively, and let x * y mean "x is played against y." After a match is played, the match is equal to the winner of the match; in a tie, the winner is whatever hand was played. Some examples:

English Language Version Notation  
"rock is played against paper and paper wins" r * p = p
"scissors is played against paper and scissors wins" s * p = s
"paper is played against paper and paper wins" p * p = p

Like before, we can keep all of our information organized by arraigning it as a table:

*    r    p    s   
r r p r
p p p s
s r s s

You can tell by the symmetry of the table that it's commutative (the order in which you evaluate expressions doesn't matter). However, it's non-associative:

(s * p) * r = s * r = r


s * (p * r) = s * p = s

It doesn't matter what order you evaluate terms, but it matters very much how you group them.


On this three part adventure (no, I don't think adventure is hyperbole) we've looked at structures that were commutative and associative, commutative and non-associative, non-commutative and associative, and non-commutative and non-associative. The table gives an example from all four categories:

Associative Addition Triangle Transformations 
Non Associative    Rock, Paper, Scissors  Division

This shows that commutativity and associativity are independent notions. If you have one, that doesn't say anything about whether you have the other.

Tuesday, May 10, 2011

Non-Commutativity and Associativity

In my last post, I introduced the ideas of commutativity (order doesn't matter) and associativity (grouping doesn't matter). In this post I want to explore a structure that's associative, but not commutative.

Messing With Triangles: Ultra-Basic Group Theory

I'm going to start with an equilateral triangle:

Triangles are pretty symmetric; rotating it 120 degrees doesn't change it:

flipping it over also leaves the triangle unchanged:

All in all, there are 5 different things I can do to a triangle and still have it appear the same. I can rotate (clockwise or counterclockwise), or I can flip it over one of three axes:

I've labeled the corners to tell the triangles apart. Also included is what mathematicians call the Identity Element (top left corner): it's what you get when you do nothing.

In order to facilitate discussion, I think each of the possible 6 actions should have names. For the purposes of this post, I'm going to call the counterclockwise rotation R1 and the clockwise rotations R2. I've labeled each of the flip actions F1, F2 and F3. In keeping with mathematical tradition, I've labeled the identity I:

At this point, I would recommend cutting your own triangle out of paper (or better yet, cardboard) and playing with it. Notice what happens when you do two actions in a row. For example, if you do F1 followed by R1, then you end up in the same place as just doing F2. If you do F2 followed by F3 you end up at R2. F2 followed by F2 again is I. To make things more readable, I'm going to use use the notation x*y to mean x followed by y. So:

"R1 followed by F1 is R2"

can be written as:

R1 * F1 = R2


"F1 followed by F1 is I"

is simply

F1 * F1 = I

This will making writing and (after some practice) reading about the different triangle operations much easier. I suggest pausing here to play with your newly cut out triangle. If you haven't bothered to make your own triangle (come on, it's not that much work), or if you just want to check what you're doing, you can play with this interactagraph I made:

At this point, you might begin to notice some patterns. For example:
  • I * I = I.
  • You can always get back to I with just one step.
  • A rotation followed by another rotation is always a rotation (or I).
  • A flip followed by a rotation (or visa versa) is always a flip.
  • A flip followed by the same flip is I.
  • A rotation followed by a different rotation is I.
It might be helpful at this point to collect all of our observations into a sort of multiplication table.
R1 R2 F1 F2 F3
I R1 R2 F1 F2 F3
R1 R1 R2 I F2 F3 F1
R2 R2 I R1 F3 F1 F2
F1 F1 F3 F2 I R2 R1
F2 F2 F1 F3 R1 I R2
F3 F3 F2 F1 R2 R1 I

Reading this is just like reading a times table. If I want to know what R2 * F2 is, I just find where the R2 row meets the F2 column:

R1 R2 F1 F2 F3
I R1 R2 F1 F2 F3
R1 R1 R2 I F2 F3 F1
R2 R2 I R1 F3 F1 F2
F1 F1 F3 F2 I R2 R1
F2 F2 F1 F3 R1 I R2
F3 F3 F2 F1 R2 R1 I

So R2 * F2 = F1.

Associativity and Non-Commutativity

With our multiplication table in place, we can now begin to look for patterns. It's clear that this structure is associative. For example:

R2 * (F1 * F2) = R2 * R2 = R1


(R2 * F1) * F2 = F3 * F2 = R1

More abstractly, 

(x * y) * z = x * (y * z)

for all x, y and z. But the interesting thing is that this structure is non-commutative; when evaluating equations, the order in which you evaluate matters. For example:

F1 * R1 = F3


R1 * F1 = F2

So the structure is non-commutative. (An important observation is that some equations are commutative: R1 * R2 = R2 * R1, but you'll remember from my last post that every pair of elements has to commute in order for an operation to be considered commutative.)


In my last post we saw structures that were commutative and associative (like addition), and non-commutative and non-associative (like division). In this post we looked at something non-commutative and associative. Up next, a post about something commutative and non-associative.

Follow-Up Questions:
  • Consider just R1, R2 and I (so, ignore flips). Is this structure commutative? Is it still associative?
  • Study the rotations and flips of a square. Is this structure commutative? Associative?
  • Tetrahedrons also have four corners. Is the set of possible transformations the same as the squares? (i.e. is the tetrahedron multiplication table the same as the square multiplication table?)

Further Reading, (from easiest to hardest):

Sunday, May 8, 2011

Happy Mother's Day

Hey Mom:

I spent quite a bit of time tweaking this relation. (It's a relation and not a function because the "o" can't pass the vertical line test). Ultimately I settled for something relatively simple.

If you want to put this into your graphing calculator, I recommended:
Y1 = (1+(1-x*x)^(1/3))(abs(x) < 1)
Y2 = (1-(1-x*x)^(1/3))(abs(x) < 1)
Y3= (1+cos(πx))(abs(x) < 5 and abs(x) < 1)
"abs()" can be found under MATH => NUM. The "<" can be found under TEST (2nd MATH) and the "and" is under TEST => LOGIC.

You get this weird vertical line thing at x = 1 or -1, but that's because the calculator has a hard time handling discontinuities and fills in the gap the best it can. In a perfect world, there would be a tiny gap between the bottom of m and the side of the o.

 If you're not a fan of piecewise functions, then you have to do some magic with absolute values:

I know what you're thinking, absolute values are piecewise functions, you're not fixing the problem at all. Well, that's only if you define absolute value as:

If you define it as:

Then everything is good to go.

Monday, May 2, 2011

Commutativity and Associativity

This is the first of a three part post on the commutative and associative properties (stay tuned for parts two and three).

Commutativity: Order Doesn't Matter
When you add two things, the order in which you add them doesn't matter (2+4 is the same as 4+2). The name of this property is the commutative property. Examples of commutative operations are [note 1]:
  • Multiplication: 2×3 is the same as 3×2
  • Preparing a bowl of Cereal: it doesn't matter what order you add the milk and the cereal
  • Putting on shoes: It doesn't matter what shoe you put on first
  • Rotation: rotate left then right or right  then left , you end up at the same place
  • The logical operator or: "Him or her" is the same as "Her or him."  
  • Vector addition: 
  • The intersection of sets: :
  • Multidimensional Integration:
    Sometimes the order of things do matter. For example, division: is not the same as (the first is 2 the second is one half). When an operation does not commute, we call it non-commutative (that's simple enough). Some examples of non-commutativity are:
    • Subtraction: 5-3 is 2, but 3-5 is -2
    • Division: 
    • Exponentiation: 
    • Matrix Multiplication: [see note 2]
    • Making a cake: mix ingredients and then bake, order matters
    • Putting your clothes on in the morning: underwear first, then pants
    • Material Implication:  is not the same as
    • Rotations on a Rubik's Cube: turning the top then the right is different than turning the right then the top:

    One important note on non-commutativity is that the operation doesn't have to be non-commutative on everything for it to be non-commutative. Take exponentiation for example, and are both 16. (Or if you're less mathematically inclined, use the examples of putting on your clothes: it doesn't matter if you put your pants on first, or your shirt.) An operation is still non-commutative if there's at least one pair of things that doesn't commute.

    Associativity: I Don't Care Who You Hang Out With
     When adding three (or more) numbers, it doesn't matter how you group those numbers. For example, if you wanted to add 2, 3 and 5, you could add 2 and 3, then add 5, or you could add 2 to 3 plus 5. This is much clearer with notation: 2+(3+5) is the same as (2+3)+5. The way you group the numbers doesn't change the answer. This is called this associativity. Other examples of associativity include:
    • Multiplication: 2×(3×4) is the same as (2×3)×4
    • Mixing trail mix: mixing raisins and granola then adding walnuts is the same as mixing raisins into a  granola/walnut mixture
    • Translations on a plane: going up 4, then going to the left 3 and down 2 is the same as going up 4 and left 3 then going down 2
    • Maximum function: max(a, max(b,c)) = max(max(a,b),c) 
    • The logical operator and: 
    • Composite functions:
    • Putting together a puzzle:

    You probably guessed it; some things are non-associative. The best example is division: is 1, but is 4. When dividing, the way you group things matters. Other non-associative examples include:
    • Subtraction : (8-5)-2 = 1 but 8-(5-2) = 5 
    • Exponentiation:  
    • Doing the dishes: Washing and drying dishes, then putting them away is definitely not the same as washing dishes that are dried and put away
    • English Expressions: A (smart dog) owner is someone that owns a smart dog, a smart (dog owner) is someone that is smart and owns a dog.
    • Material implication: is not the same as
    • The one dimensional distance formula d(x,y) = |x-y|:
    Commutativity and associativity are important mathematical concepts. In part 2, we'll be looking at something associative and non-commutative. In part 3, We'll look at something commutative and non-associative.

    [1] Some of my examples come from Wikipedia, some of them I heard before (in a classroom or in a conversation), some of them I just made up.