## What Are Equivalence Classes?

(A couple weeks ago I published a little lemma of an essay. This is the next lemma; if my prose style holds out this’ll all lead to something neat.)

If you have the idea of equivalence — that you can pick elements of a set out and say whether they share some property, and that the sharing of that property works in some of the ways that equality works — then you can create equivalence classes. This is the dividing of your original set up into smaller parts according to the rule that everything in one of those parts is equivalent to anything else in that same part.

Since I think about mathematics so much, the most familiar equivalence classes to my mind comes from the counting numbers, that familiar old group of 1, 2, 3, and so on. The equivalence relationship I’d like to use looks a little more alien; it’s “has the same remainder when divided by two as”. But every integer, divided by two, has a remainder of either zero or one, and it’s not hard to follow the divisions here: 4 divided by two has a remainder of zero; 5 divided by two has a remainder of one; 6 divided by two has a remainder of zero; 7 divided by two has a remainder of one; and so on. Using this equivalence relationship, 4 and 6 and 8 and for that matter 2 are in the same class. 3 and 5 and 7 and 9 and so on also share a class, though not the same one that 4 and 6 and 8 had. And, yeah, that’s just the even and the odd numbers, presented in a way that uses much more abstraction than you needed to learn odds and evens.

But we can do this dividing into classes for any set and for any equivalence relationship on that set: dividing a group of people up by those who have the same age; dividing clothes up by those which are the same color; dividing functions up by which ones share some interesting property; whatever you like. There aren’t necessarily just the two equivalence classes. For example, “has the same remainder when divided by four as” will split the counting numbers into four classes, and “is the same age as” will split a group of people up into from as few as one class to as many classes as there are people.

So, why split sets up into equivalence classes? Besides the giddy fun of doing it, the most useful reason I know is that it can often be easier to prove something about a whole set of things if you can break the problem up into smaller ones, proving something about a special case of things. If you need to test something that you know will be the same for all the elements in an equivalence class, you just have to pick one element from that class and test that; that can be a wonderful time-saver.

If you do pick one of the elements of your class that’s called a “class representative”, which is one of mathematics’s less exotic terms. If you’ve picked your representative — let me call it a — and want to talk about the equivalence class that contains it, then that’s normally written with braces around it: [a]. Everything in [a] is equivalent to a, by definition. For the example of odds and evens you could use 1 and 2 — the sets [1] and [2] — although that’s just because we tend to look at nice familiar small numbers when we can. We wouldn’t be doing anything wrong if we wrote the sets as [147] and [2038] instead. We’ve entered a realm without uniquely right answers, just answers that are more attractive because we think they’re easier to work with or we think they look nicer.

But when we write down [147] and [2038] we’ve exhausted the odd-and-even partitioning of the counting numbers. We’ve also written down the quotient set, the collection of all the equivalence classes. This is a set whose elements are themselves sets, which is something a little odd to encounter at first, but not anything too exotic.

Here’s a neat little equivalence relation and quotient set I’d like to toss out for folks to consider. The original set is all the real numbers — positive and negative, rational and irrational. The equivalence relation is “is a whole number different from” — so that, for example, 0, 1, 3, and 35 are all in one equivalence class; 0.5, -3.5, and 147.5 are all in another class together; π, π + 1, π – 8, and &pi + 35 are in yet another class. How many equivalence classes are there for this set and this relation, and, what might a quotient set for them look like?

• #### elkement 4:05 pm on Saturday, 21 June, 2014 Permalink | Reply

Are you going to lead us into the land of cardinal numbers and strange paradoxa involving sets of sets?

Like

• #### Joseph Nebus 8:24 pm on Sunday, 22 June, 2014 Permalink | Reply

I am indeed! But I’m planning to pass on the countable-versus-uncountable thing since so many mathematics blogs have covered it so well already.

Like

## What Is Equivalence?

(I’m putting this little post out because I want to do something more impressive, and I’ll need this lurking in the background. If it seems unmotivated, then, please treat it as a lemma of an essay.)

Most of us have a fairly decent idea of “equals”; at least, we’re fairly sure we know what it means to say “x is equal to y” and can draw from that other conclusions, such as, the controversial “y is equal to x”. Usually we get the idea early in learning arithmetic, and get used to it in working with numbers, and maybe stretch the idea (within the bounds of mathematics) to include things like two angles being equal or two shapes being equal.

Equivalence is a kind of generalizing of this equality idea: we’ll take a bit of what’s interesting about the idea of two things being equal, and use it in a new context. In this new context two things that might not be equal are still similar in some way that’s of interest for whatever we’re working on right now.

To write that “x is equal to y” efficiently we call on the equals sign and just put “x = y”. “x is equivalent to y” also begs for a shorthand notation, at least if you’re doing a lot of work with the idea, and the easiest way to type that is probably just to use a tilde: “x ~ y”, though I admit I prefer using a double tilde, “x ≈ y”, which isn’t too hard to do in HTML but is more work.

For two things to be equivalent you need to say equivalent with respect to what property. Sugar, sand, and salt are pretty much the same if all you’re interested in is how heaps of small-grained particles move; they’re not at all equivalent if you’re baking; and they’re only sort-of equivalent if you’re trying to melt sidewalk ice. You also need to say what set of things you’re drawing from; it’s very hard to answer whether sugar is equivalent to birds if you thought the discussion was about real numbers. Usually in practice the relationship — called the equivalence relation — carries with it an explicit statement of what the set of things is, unless it’s just blisteringly obvious from context.

To say that something is an equivalence relation means that it has to obey three rules, ones that look make it look a lot like ordinary old equality. The first is called reflexivity: any thing in the set is equivalent to itself. Any number equals itself; any article of clothing has the same color as itself; any person has the same gender as herself. Sounds like an unavoidably true property? Consider, for real numbers, the relationship “is less than”; there’s no number that is less than itself. “Is less than” can’t be an equivalence relationship.

The second is called symmetry: if one thing is equivalent to another, then, that other thing is equivalent to the first. If the number we’ve given the name “height” is equal to the number we’ve given the name “length”, so to does the number we’ve given the name “length” equal the number we’ve given the name “height”, and similarly good results can be found with shirts and people’s genders. For numbers, “Is less than” is ruled out right away; but the initially promising “Is less than or equal to”, which satisfies reflexivity, can flop on symmetry: 4 is less than or equal to 12, certainly, but not the other way around.

And the last is called transitivity: if one thing is equivalent to a second, and a second thing is equivalent to a third, then, the first thing has to be equivalent to the third. Ordinary old numbers being equal to one another are still transitive, and those shirts having the same colors work out too, and the same with people sharing a gender. Interestingly, both “Is less than” and “Is less than or equal to” are transitive, but since those fail on reflexivity or on transitivity they’re not equivalence relationships anyway.

There are a lot of equivalences out there, such as two geometric shapes being congruent, or for that matter just being similar (having the same shape but different sizes), or whole numbers having the same remainder when divided by, say, two (which is a fussy way of saying numbers are odd or are even), or two objects having the same temperature, or the like.

• #### elkement 8:29 am on Sunday, 25 May, 2014 Permalink | Reply

I like the intro – I stay tuned :-)
Memories of my freshman algebra class come to my mind – vector spaces and all.

You have a talent of explaining things really well!

Like

• #### Joseph Nebus 6:37 pm on Monday, 26 May, 2014 Permalink | Reply

Thank you kindly.

I’m hoping to get around to a nice and surprising result, but avoiding the complicated and the wrong is the challenge.

Like

• #### Jack Flacco 3:12 am on Wednesday, 28 May, 2014 Permalink | Reply

I’ve always loved math and these definitions are so helpful for things I’d forgotten twenty years ago. Great post!

Like

• #### Joseph Nebus 4:36 pm on Thursday, 29 May, 2014 Permalink | Reply

I’m glad you’re enjoying them. Thank you.

Like

• #### Joseph Nebus 4:31 am on Saturday, 17 December, 2011 Permalink | Reply Tags: casting out nines ( 3 ), distributive law ( 5 ), divisibility ( 7 ), eight ( 2 ), factorization ( 12 ), notation ( 18 ), proofs ( 6 )

When last we discussed divisibility rules, particularly, rules for just adding up the digits in a number to tell what it might divide by, we had worked out rules for testing divisibility by eight. In that, we take the sum of four times the hundreds digit, plus two times the tens digit, plus the units digit, and if that sum is divisible by eight, then so was the original number. This hasn’t got the slick, smooth memorability of the rules for three and nine — just add all the numbers up — or the simplicity of checking for divisibility by ten, five, or two — just look at the last digit — but it’s not a complicated rule either.

Still, we came at it through an experimental method, fiddling around with possible rules until we found one which seemed to work. It seemed to work, and since we found out there are only a thousand possible cases to consider we can check that it works in every one of those cases. That’s tiresome to do, but functions, and it’s a legitimate way of forming mathematical rules. Quite a number of proofs amount to dividing a problem into several different cases and show that whatever we mean to prove is so in each ase.

Let’s see what we can do to tidy up the proof, though, and see if we can make it work without having to test out so many cases. We can, or I’d have been foolish to start this essay rather than another; along the way, though, we can remove the traces that show the experimenting that lead to the technique. We can put forth the cleaned-up reasoning and look all the more clever because it isn’t so obvious how we got there. This is another common property of proofs; the most attractive or elegant method of presenting them can leave the reader wondering how it was ever imagined.

## A Quick Impersonation Of Base Nine

I now resume the thread of spotting multiples of numbers easily. Thanks to the way positional notation lets us write out numbers as some multiple of our base, which is so nearly always ten it takes some effort to show where it’s not, it’s easy to spot whether a number is a multiple of that base, or some factor of the base, just by looking at the last digit. And if we’re interested in factors of some whole power of the base, of the ten squared which is a hundred, or the ten cubed which is a thousand, or so, we can find all we want to know just by looking at the last two or last three or last or-so digits.

Sadly, three and nine don’t go into ten, and never go into any power of ten either. Six and seven won’t either, although that exhausts the numbers below ten which don’t go into any power of ten. Of course, we also have the unpleasant point that eleven won’t go into a hundred or thousand or ten-thousand or more, and so won’t many other numbers we’d like.

If we didn’t have to use base ten, if we could use base nine, then we could get the benefits of instantly recognizing multiples of three or nine that we get for multiples of five or ten. If the digits of a number are some strand R finished off with an a, then the number written as Ra means the number gotten by multiplying nine by R and adding to that a. The whole strand will be divisible by nine whenever a is, which is to say when a is zero; and the whole strand will be divisible by three when a is, that is, when a is zero, three, or six.

## How To Recognize Multiples Of 100 From Not So Far Away

MJ Howard last week answered my little demonstration that it was easy to tell multiples of two, five, and ten by looking at just the last digit of a whole number, but that there weren’t any ways to tell from just the last digit whether it was divisible by four. He pointed out we could look at the last two digits, and if those were divisible by four, then the entire number would be. This is perfectly true, and it’s only by asserting that I was looking for a rule based on the last digit alone that my forecast of doom about an instant check for divisibility-by-four could be sustained.

Remember the reasoning by which we wrote out a whole number as some string of digits which I call R followed by whatever goes in the units column, which I call a. (I had been thinking of R as in the “rest” of the number, but it struck me over the week that R is also the symbol used in organic chemistry to denote a chain of carbon atoms when one doesn’t really care how many of them are lined up. This interests me as I got on this thread with a set of numbers I called “alcoholic” due to their structural resemblance to organic chemistry’s idea of alcohols.) Since we’re writing in base ten, then, the number written as Ra is ten times R plus a. Ten times R can’t help being divisible by ten, or by any of the factors of ten, which are two and five (and one, which nobody cares about).

## How To Recognize Multiples Of Ten From Quite A Long Way Away

I got so caught up last week talking about the different possible bases that I forgot to the interesting thing I had wanted to talk about those bases. I suppose that will happen as long as I write to passion rather than plan. It gives me something to speak about today, at least.

Here is one thing implied by having a consistent base for all these numbers in which position is relevant: a one in each column represents the base-number of units of whatever the next column over represents. That is, in base ten, a one in the tens column represents ten units of one; a one in the thousands column represents ten units of one hundred. I mention this obvious point because it is so familiar and simple as to pass into invisibility. (It also extends past the decimal point; a one in the hundredths column is equivalent to ten units of a thousandth. But I want to talk about divisibility, in the whole numbers, and so leave fractions for some later time.)

This is tidy, in a way that we don’t see in variable bases. It will give us one tool for neat little divisibility rules. That tool appears just by writing things in the appropriate way, which is the best sort of tool. It saves on time trying to prove it works.

• #### MJ Howard (@random_bunny) 7:25 pm on Saturday, 29 October, 2011 Permalink | Reply

I’m prepared to admit being wrong about this, but can’t you tell divisibility by 4 by looking at the two least significant digits, padding with a zero if it’s a single digit number. Of course, there are only two single digit numbers divisible by 4, but it helps with the pattern. If the second digit of the number is even, and the first digit is either 0,4, or 8, the entire number is divisible by 4. If the second digit is odd and the first is 2 or 6, then the entire number is divisible by 4. I think we get the rest for free, since 100 is an multiple of 4 and everything other than the two least significant digits is therefore divisible by 4. The number of cases of 2 digit numbers is small enough that you can prove it by demonstration.

Like

• #### nebusresearch 10:14 pm on Saturday, 29 October, 2011 Permalink | Reply

You can indeed, but that’s looking at more than just the final digit, isn’t it?

Like

• #### MJ Howard (@random_bunny) 2:52 am on Sunday, 30 October, 2011 Permalink | Reply

True, but hardly the same as for testing divisibility by 7.

Like

• #### nebusresearch 3:39 pm on Tuesday, 1 November, 2011 Permalink | Reply

Nope, not nearly. But it points the way.

Like

## Bases For Comparison

Back to the theme of divisibility of numbers. Since we have the idea of writing numbers with a small set of digits, and with the place of those digits carrying information about how big the number is, we can think about what’s implied by that information.

In the number 222, the first two is matched to blocks (hundreds) that are ten times as large as those for the second two (tens), and the second two is matched to units (tens) which are ten times as large as those for the third two (units). It is now extremely rare to have the size of those blocks differ from one place to the next; that is, a number before the initial two here we take without needing it made explicit to represent ten times that hundreds unit, and a number after the final two (and therefore after the decimal point) would represent units which are one-tenth that of the final two’s size.

It has also become extremely rare for the relationship between blocks to be anything but a factor of ten, with two exceptions which I’ll mention next paragraph. The only block other than those with common use which comes to my mind is the sixty-to-one division of hours or degrees into minutes, and then of minutes into seconds. Even there the division of degrees of arc into minutes and seconds might be obsolete, as it’s so much easier on the computer to enter a latitude and longitude with decimals instead. So blocks of ten, decimals, it is, or in the way actual people speak of such things, a number written in base ten.

• #### bugq 12:39 am on Sunday, 30 October, 2011 Permalink | Reply

It’s definitely frustrating when it seems the only way to discuss a subject is in a subjunctive pluperfect tone, but there are openings yet in the parking space of numbering systems: trits! Balanced ternary is the single most efficient scheme for storing and processing numbers, because it’s the closest integral value to Euler’s constant and eliminates the need for a 1’s or 2’s complement system. Binary has given us a good run, but now there are a number of indicators that favor an eventual transition to ternary, including the dissolution (or disillusion) of Moore’s Law as physical limits on feature size are approached: engineers are evermore having to deal with problems that can’t be solved simply by adding more transistors.

Like

• #### nebusresearch 3:37 pm on Tuesday, 1 November, 2011 Permalink | Reply

I have occasionally heard a few good things about ternary, although I haven’t seen applications where it looks compellingly necessary. I suspect that it’s going to turn out that whatever numerical structure computers use to compute with will turn out to be a fairly arbitrary choice after all. Eniac, I understand (I may have garbled this as I haven’t checked my reference so please don’t believe this too heavily), actually used a base-ten internal representation of numbers, and after some work (Neumann?) proved that while this required ten vacuum tubes per digit, other bases could do the job with as few as five tubes, albeit with five more for error-proofing.

Like

## What Are Numbers Made Of?

To return to my second major theme: my Dearly Beloved told me that I must explain that trick where one adds up the digits of a number and finds out from that whether it’s divisible by 9. I wanted to anyway, but a request like that is irresistible. The answer can be given quickly — and several of my hopefully faithful readers did, in comments, last Friday — but I’d like to take the long way around because I do that and because it lets a lot of other interesting divisibility properties show themselves.

We use ten numerals and the place where we write them to express all the counting numbers out there. We put one of the numerals, such as `2′, in a place which denotes whether we mean to say two tens, or two hundreds, or two millions. That’s a clever tool, and not one inherent to the idea of numbers. We could as easily use different symbols for different magnitudes; the only familiar example of this (in the west) is Roman numerals, where we use I, X, C, and M for increasing powers of ten, and then notice we aren’t really quite sure what to do past M.

The Romans were not very sure either, and individual variations developed when someone found they needed to express an M of M very often. The system has fewer numerals, symbols representing numbers, than ours does, with V and L and D the only additional numerals reasonably common. By the Middle Ages some symbols were improvised to allow for extremely large numbers such as the hundred thousands, and some extra symbols were pulled in for numbers such as 7 or 40, but they have faded to the point of obscurity. This is a numbering system which runs out when the numbers get too large, which seems impossibly limited at first glance. But we haven’t changed much from these times: while we have a numbering system that can, in principle, work with arbitrarily big or tiny numbers, in practice we only use a small range of them. When we turn over arithmetic to computers, in fact, we accept numbering systems which have limits on how big (positive or negative) a number may be, or how close to zero one may work. We accept those limits because of their convenience and are only sometimes annoyed to find, for example, that the spreadsheet trying to calculate a bill has decided we want 0.9999999 of a penny.

• #### Peter Ward 8:44 am on Saturday, 15 October, 2011 Permalink | Reply

A couple of words about our old, proper, money. One third of a pound is six shillings and eight pence (commonly expressed as 6/8), not 8/6.

I also refute the idea that calculation with pounds, shillings and pence was any more complicated than working with decimal currency. There’s no difference to the basic rules, you just have to take the different bases for pennies and shillings into account, which soon becomes as natural as ordinary decimal arithmetic with practice.

Like

• #### nebusresearch 3:40 am on Sunday, 16 October, 2011 Permalink | Reply

Oh, dear, yes, that 8/6 was a typo. It’s always the things I think are safe, like numbers, that treat me badly. Of course, I also come from a country that formally went decimal in the late 18th century and generally accepted it by the mid-19th, so while I do see advantages in the pre-decimal system I never built up an instinctive feel for it.

I do think calculating with pounds, shillings, and pence is more complicated though, because there is that difference in bases to remember, and there aren’t other calculations one commonly does that would use the same pattern of bases. If all calculations, or at least a cluster of them, subdivided units into 20 parts of 12 each then the different bases would be a mild inconvenience, but the universe of other calculations done similarly would keep people in practice. I expect people make mistakes more often on special cases.

Like

## Something Cute Without 9’s and a 6

The cute little thing about a string of 9’s followed by a 6 being a number divisible by 6 inspired my Dearly Beloved, who spent some time looking for other patterns in this kind of number. I’m glad for that; this sort of pattern, while it may not be terribly important, is often fun to play with. And interesting things can be found in play.

I don’t know a good name for this kind of number, and admit it feels awkward to say just “this kind of number”. If I have to talk about them much longer some group name is probably worth devising. Unfortunately the only names which come to my mind come there through organic chemistry, where it’s reasonably common to have an arbitrarily long chain of carbon atoms terminated with some distinctly different group. For example, an alcohol is a string of carbons ending with an oxygen and hydrogen molecule. But an “alcoholic number”, while an imagination-capturing name, doesn’t quite fit. I suppose aldehydes, which end on a double-bond to an oxygen atom, preserves the metaphor, but no one knows the adjective form of aldehyde.

My Dearly Beloved’s experiments found no other numbers for which a repeated string, terminated by a 6, would produce a number divisible by 6. This overlooked the obvious case, though: a string of 6’s, followed by another 6, is itself divisible by 6. Obvious cases are like that, and many people would think of a uniform string of 6’s not part of the pattern “an arbitrary number of one digit, followed by a 6”.

• #### Peter Ward 7:17 pm on Friday, 7 October, 2011 Permalink | Reply

It seems to me that you have missed some of the main divisibility tests, particularly the one which says any number whose digits sum to a multiple of 3 is divisible by 3. The same for 9. And any number divisible by 9 is divisible by 3. So any such number which is also even is divisible by 3 and 2, hence divisible by 6. Which is why 9…96 is always divisible by 3 and 6.

[to take an example of a 4 digit number wxyz = 1000w + 100x + 10y + z = 9(111w + 11x + y) + (w + x + y + z), so if w+x+y+z is a multiple of 9, the whole expression is]

Any number with the last two digits divisible by 4 is divisible by 4 (because 100 is divisible by 4). It’s the last three digits for divisibility by 8, last 4 for 16, and so on.

And any number where the two sets of alternate digits sum to the same value, or to values with a difference of 11 or some multiple thereof, are divisible by 11.

Like

• #### nebusresearch 10:08 am on Wednesday, 12 October, 2011 Permalink | Reply

Oh, no, none of that missed at all. I’m just building to them in a slightly roundabout way.

(Sorry to be so long in following up. I was visiting my Dearly Beloved over the weekend and that took priority over such things as this project.)

Like

• #### Peter Ward 9:57 pm on Wednesday, 12 October, 2011 Permalink | Reply

Ah, to my mind you’re going round the world to the West in order to travel to you neighbour to the East, more than slightly roundabout. I am rather bemused. Never mind.

Like

• #### nebusresearch 3:43 am on Sunday, 16 October, 2011 Permalink | Reply

I am indeed taking about the longest way around I can; I’d figured it would let me avoid being stuck for topics. This is going to seem really hilarious to me come Monday.

Like

• #### MJ Howard (@random_bunny) 3:29 am on Thursday, 13 October, 2011 Permalink | Reply

Your divisibility by 3 could be cleaner. By the rules of modular arithmetic, if a1 ≡ b1 (mod n) and a2 ≡ b2 (mod n) then a1 + a 2 ≡ b1 + b2 (mod n). Additionally if a and b ∈ Z then a1a2 ≡ a1b2. This makes all positive integer powers of 10 ≡ 1 (mod 3). By the multiplication rule, this makes all the powers of 10 drop out, leaving us with just, in your example w + x + y + z. The rest is just the application of the rule for addition.

At leat I think it is. I could be wrong.

Like

• #### MJ Howard (@random_bunny) 3:38 am on Thursday, 13 October, 2011 Permalink | Reply

In fact I was wrong. Also WordPress doesn’t seem to allow %lt;sub> but does do entities. Who knew. To correct then:
if a_1 ≡ b_1 (mod n) and a_2 ≡ b_2 (mod n) then a_1 + a_2 ≡ b_1 + b_2 (mod n) :: Addition rule
if a and b are both integers, then a_1 a_2 ≡ b_1 b_2 (mod n) :: Muliplication rule.

10^0 = 1 ≡ 1 (mod 3); 10^1 = 10 &equiv 1 (mod 3). The rest of those follow by the multiplication rule.

I think the rest is fairly solid. But again, reserve the right to be wrong.

Like

• #### Gene Wirchenko 3:44 am on Monday, 9 July, 2012 Permalink | Reply

A string of threes followed by a six is always divisible by six.

Like

• #### Joseph Nebus 7:26 am on Monday, 9 July, 2012 Permalink | Reply

It is indeed. Works out nicely that way since 30 is also divisible by six. (At least that’s one way to go proving it.)

Like

## Something Cute With 9’s and a 6.

After the last few essays I’d like to take a moment for a distinct, cute little problem of no practical use but cute.

Write down as many 9’s as you like, and when finished with that place a 6 at the right end. The result is divisible by 6.

That is, whatever number you’ve written, divided by 6, produces a whole number. Divisibility is one of those things which turns up whenever you have a collection of things which can be multiplied, and one thing is divisible by the second if you can find something in your collection so that the second multiplied by your find equals the first. It’s most often used to talk about the integers — the positive counting numbers, their negative counterparts, and zero if we didn’t include that already — and if it isn’t said divisible-with-respect-to-what then integers are what is usually meant. Partly that’s because integers are the first thing where divisibility stands out: if we look at the real numbers, everything is divisible by everything else (as long as that “else” is not zero), and a property that’s (almost) always true is usually too dull to mention. The next topic where divisibility gets mentioned much is usually polynomials, with a few eccentrics holding out for the complex numbers where the real part and the imaginary part are both integers.

There are several ways to prove this string of 9’s followed by 6 is divisible by 6. Here’s a proof which I like.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r