An exploration of forward differences for bored elementary school students

Last week I made a mathematics worksheet for my 8-year-old son, whose school is closed due to the coronavirus pandemic. I’m republishing it here so others can use it for similar purposes.

Figurate numbers and forward differences

There are lots of further directions this could be taken but I’ll leave that to you and your kids. I tried to create something that was conducive to open-ended exploration rather than something that had a single particular goal in mind.

Further reading:

  • For the curious: Babbage Difference Engine
  • For the intrepid: Concrete Mathematics by Graham, Knuth, and Patashnik, section 2.6 (“Finite and Infinite Calculus”)

Seeing as how we’ve got at least four more weeks of (effectively) homeschooling ahead of us, and probably more than that, in all likelihood I will be making more of these, and I will certainly continue to share them here! If you use any of these with your kids I’d love to hear about your experiences.

Posted in arithmetic, teaching | Tagged , , , , , | 1 Comment

Ways to prove a bijection

You have a function f : A \to B and want to prove it is a bijection. What can you do?

By the book

A bijection is defined as a function which is both one-to-one and onto. So prove that f is one-to-one, and prove that it is onto.

This is straightforward, and it’s what I would expect the students in my Discrete Math class to do, but in my experience it’s actually not used all that much. One of the following methods usually ends up being easier in practice.

By size

If A and B are finite and have the same size, it’s enough to prove either that f is one-to-one, or that f is onto. A one-to-one function between two finite sets of the same size must also be onto, and vice versa. (Of course, if A and B don’t have the same size, then there can’t possibly be a bijection between them in the first place.)

Intuitively, this makes sense: on the one hand, in order for f to be onto, it “can’t afford” to send multiple elements of A to the same element of B, because then it won’t have enough to cover every element of B. So it must be one-to-one. Likewise, in order to be one-to-one, it can’t afford to miss any elements of B, because then the elements of A have to “squeeze” into fewer elements of B, and some of them are bound to end up mapping to the same element of B. So it must be onto.

However, this is actually kind of tricky to formally prove! Note that the definition of “A and B have the same size” is that there exists some bijection g : A \to B. A proof has to start with a one-to-one (or onto) function f, and some completely unrelated bijection g, and somehow prove that f is onto (or one-to-one). Also, a valid proof must somehow account for the fact that this becomes false when A and B are infinite: a one-to-one function between two infinite sets of the same size need not be onto, or vice versa; we saw several examples in my previous post, such as f : \mathbb{N} \to \mathbb{N} defined by f(n) = 2n. Although tricky to come up with, the proof is cute and not too hard to understand once you see it; I think I may write about it in another post!

Note that we can even relax the condition on sizes a bit further: for example, it’s enough to prove that f is one-to-one, and the finite size of A is greater than or equal to the finite size of B. The point is that f being a one-to-one function implies that the size of A is less than or equal to the size of B, so in fact they have equal sizes.

By inverse

One can also prove that f : A \to B is a bijection by showing that it has an inverse: a function g : B \to A such that g(f(a)) = a and f(g(b)) = b for all a \in A and b \in B. As we saw in my last post, these facts imply that f is one-to-one and onto, and hence a bijection. And it really is necessary to prove both g(f(a)) = a and f(g(b)) = b: if only one of these hold then g is called a left or right inverse, respectively (more generally, a one-sided inverse), but f needs to have a full-fledged two-sided inverse in order to be a bijection.

…unless A and B are of the same finite size! In that case, it’s enough to show the existence of a one-sided inverse—say, a function g such that g(f(a)) = a. Then f is (say) a one-to-one function between finite equal-sized sets, hence it is also onto (and hence g is actually a two-sided inverse).

We must be careful, however: sometimes the reason for constructing a bijection in the first place is in order to show that A and B have the same size! This kind of thing is common in combinatorics. In that case one really must show a two-sided inverse, even when A and B are finite; otherwise you end up assuming what you are trying to prove.

By mutual injection?

I’ll leave you with one more to ponder. Suppose f : A \to B is one-to-one, and there is another function g : B \to A which is also one-to-one. We don’t assume anything in particular about the relationship between f and g. Are f and g necessarily bijections?

Posted in logic, proof | Tagged , , , , , , , , | 6 Comments

One-sided inverses, surjections, and injections

Several commenters correctly answered the question from my previous post: if we have a function f : A \to B and g : B \to A such that g(f(a)) = a for every a \in A, then f is not necessarily invertible. Here are a few counterexamples:

  • Commenter Buddha Buck came up with probably the simplest counterexample: let A be a set with a single element, and B a set with two elements. It does not even matter what the elements are! There’s only one possible function g : B \to A, which sends both elements of B to the single element of A. No matter what f does on that single element a \in A (there are two choices, of course), g(f(a)) = a. But clearly f is not a bijection.

  • Another counterexample is from commenter designerspaces: let f : \mathbb{N} \to \mathbb{Z} be the function that includes the natural numbers in the integers—that is, it acts as the identity on all the natural numbers (i.e. nonnegative integers) and is undefined on negative integers. g : \mathbb{Z} \to \mathbb{N} can be the absolute value function. Then g(f(n)) = |n| = n whenever n is a natural number, but f is not a bijection, since it doesn’t match up the negative integers with anything.

    Unlike the previous example, in this case it is actually possible to make a bijection between \mathbb{N} and \mathbb{Z}, for example, the function that sends even n to n/2 and odd n to -(n+1)/2.

  • Another simple example would be the function f : \mathbb{N} \to \mathbb{N} defined by f(n) = 2n. Then the function g(n) = \lfloor n/2 \rfloor satisfies the condition, but f is not a bijection, again, because it leaves out a bunch of elements.

  • Can you come up with an example f : \mathbb{R} \to \mathbb{R} defined on the real numbers \mathbb{R} (along with a corresponding g)? Bonus points if your example function is continuous.

All these examples have something in common, namely, one or more elements of the codomain that are not “hit” by f. Michael Paul Goldenberg noted this phenomenon in general. And in fact we can make this intuition precise.

Theorem. If f : A \to B and g : B \to A such that g(f(a)) = a for all a \in A, then f is injective (one-to-one).

Proof. Suppose for some a_1, a_2 \in A we have f(a_1) = f(a_2). Then applying g to both sides of this equation yields g(f(a_1)) = g(f(a_2)), but because g(f(a)) = a for all a \in A, this in turn means that a_1 = a_2. Hence f is injective.

Corollary. since bijections are exactly those functions which are both injective (one-to-one) and surjective (onto), any such function f : A \to B which is not a bijection must not be surjective.

And what about the opposite case, when there are functions f : A \to B and g : B \to A such that f(g(b)) = b for all b \in B? As you might guess, such functions are guaranteed to be surjective—can you see why?

Posted in logic | Tagged , , , , , , | 1 Comment

Test your intuition: bijections

Suppose we have sets A and B and a function f : A \to B (that is, f’s domain is A and its codomain is B). Suppose there is another function g : B \to A such that g(f(a)) = a for every a \in A. Is f necessarily a bijection? That is, does f necessarily match up each element of A with a unique element of B and vice versa? Or put yet another way, is f necessarily invertible?

  • If yes, prove it!
  • If no, provide a counterexample! For bonus points, what additional assumptions could we impose to make it true?
Posted in logic | Tagged , , , | 12 Comments

Book review: Beautiful Symmetry

[Disclosure of Material Connection: MIT Press kindly provided me with a free review copy of this book. I was not required to write a positive review. The opinions expressed are my own.]

Beautiful Symmetry: A Coloring Book about Math
Alex Berke
The MIT Press, 2020

Alex Berke’s new book, Beautiful Symmetry, is an introduction to basic concepts of group theory (which I’ve written about before) through symmetries of geometric designs. But it’s not the kind of book in which you just read definitions and theorems! First of all, it is actually a coloring book: the whole book is printed in black and white on thick matte paper, and the reader is invited to color geometric designs in various ways (more on this later). Second, it also comes with a web page of interactive animations! So the book actually comes with two different modes in which to interactively experience the concepts of group theory. This is fantastic, and exactly the kind of thing you absolutely need to really build a good intuition for groups.

The book is not, nor does it claim to be, a comprehensive introduction to group theory; it focuses exclusively on groups that arise as physical symmetries in two dimensions. It first motivates and introduces the definitions of groups and subgroups, using 2D point groups (cyclic groups C_n and dihedral groups D_n) and then going on to catalogue all frieze and wallpaper groups (all the possible types of symmetry in 2D), which I very much enjoyed learning about. I had heard of them before but never really learned much about them.

One thing I really like is the way Berke characterizes subgroups by means of breaking symmetry via coloring; I had never really thought about subgroups in this way before. For example, consider a simple octagon:

An octagon has the symmetry group D_8, meaning that it has rotational symmetry (by 1/8 of a turn, or any multiple thereof) and also reflection symmetry (there are 8 different mirrors across which we could reflect it).

However, if we color it like this, we break some of the symmetry:

1/8 turns would no longer leave the colored octagon looking the same (it would switch the blue and white triangles). We can now only do 1/4 turns, and there are only 4 mirrors, so it has D_4 symmetry, the same as a square. In particular, the fact that we can color something with D_8 symmetry in such a way that it turns into D_4 symmetry tells us that D_4 is a subgroup of D_8. Likewise we could color it so it only has D_2 symmetry (we can rotate by 1/2 turn, or reflect across two different mirrors; left image below) or D_1 symmetry (there is only a single mirror and no turns; right below). Hence D_2 and D_1 are also subgroups of D_8.

Along different lines, we could color it like this, so we can still turn it by 1/8 but we can no longer reflect it across any mirrors (the reflections now switch blue and white):

This symmetry group (8 rotations only) is called C_8; we have learned that C_8 is a subgroup of D_8. Likewise we could color it in one of the ways below:

yielding the subgroups C_4, C_2, and C_1. Note D_1 and C_2 are abstractly the same: both feature a single symmetry which is its own inverse (a mirror reflection in the case of D_1 and a 180^\circ rotation in the case of C_2), although geometrically they are two different kinds of symmetry. C_1 is also known as the “trivial group”: the colored octagon on the right has no symmetry.

Anyway, I really like this way of thinking about subgroups as “breaking” some symmetry and seeing what symmetry is left. If you like coloring, and/or you’d like to learn a bit about group theory, or read a nice presentation and explanation of all the frieze and wallpaper groups, you should definitely check it out!

Posted in books, review | Tagged , , , , , | 1 Comment

Hypercube offsets

In my previous posts, each drawing consisted of two offset copies of the previous drawing. For example, here are the drawings for n=3 and n=4:

You can see how the n=4 drawing contains an exact copy of the n=3 drawing, plus another copy with the fourth red element added to every set. The second copy is obviously offset by one unit in the vertical direction, because every set gained one element and hence moved up one row. But how far is the second copy offset horizontally? Notice that it is placed in such a way that its second row from the bottom fits snugly alongside the third row from the bottom of the original copy.

In this case we can see from counting that the second copy is offset five units to the right of the original copy. But how do we compute this number in general?

The particular pattern I used is that for even n, the second copy of the (n-1)-drawing goes to the right of the first copy; for odd n it goes to the left. This leads to offsets like the following:

Can you see the pattern? Can you explain why we get this pattern?

Posted in pattern | Tagged , , , , , , , | 2 Comments

Post without words #31

Image | Posted on by | Tagged , , , , , , , | 2 Comments