# Lunatic Rantings about Modular Arithmetic.

by 1MileCrash
Tags: arithmetic, lunatic, modular, rantings
 P: 1,082 So we're doing modular arithmetic in my proof class. I have a weird cycle when learning something new in pure math, I think "wow, this is just exceedingly indepth version of something learned by gradeschool children." Then I find something (on my own, not in the text book, just thinking about it. It's usually a case the book may consider too trivial to be worth mentioning, but those are ALWAYS the things I find the most interesting because it is where things become beautiful to me) that is majorly cool about the topic, realize how incredible it is that these "gradeschool children" don't really know the depth of what there doing, and then I become insanely obsessed. Modular arithmetic was a shining example. My class is small, taught by a young, carefree professor who is very bright, and we generally are very open and allowed to talk whenever, its always about math because everyone in the class loves math. When he first gave the definition of congruence mod n, I remarked "So we're doing 4th grade clock problems where the clock has n hours." "YES!" he responded. Reading up in the text book, they talked about the "uninteresting" case of mod 1. Any two numbers are congruent mod 1 because there difference is of course a multiple of 1. I thought that was interesting, not uninteresting. They went on to say that generally, there are n equivalence classes for congruence mod n. So in mod 1's case, that one equivalence class is the set of all, because they are all congruent. Cool! So I began to wonder about the "opposite extreme" because there always seems to be one. I realized the following: The only multiple of 0 is 0. Then the difference between two numbers can only be a multiple of 0 if it is in fact 0. The only way that the difference between two numbers is 0 is if they are equal. So then I realized, that congruence mod 0 is the same as equality. I found that extremely badass. Do I mean to say that normal arithmetic is modular arithmetic with the modulus as 0? Yes, I do, that's how I view it now. Maybe that's wrong. But it gets cooler. The equivalence class thing. Congruence mod 1 has 1, the set of all. Congruence mod 0, since numbers are only congruent to themselves, there are infinite equivalence classes, namely, singleton sets of all. So, congruence mod 0 and congruence mod 1 are exactly opposite as far as I can see. Which means something to me, because I see a lot of reasons to think of 0 and 1 as opposites rather than 0 and "infinity" or "a lot" being opposites. Yeah, I'm a bit bonkers when it comes to these things, whatever. Hope you enjoyed the rant.
 P: 4,546 One thing that a lot of people don't realize is that you can express something in a really minimal form, and out of that one thing not only tens or hundreds of things come out, but quite possibly millions of different ideas. Don't be ashamed of discovering anything no matter how small, because quite frankly it is a lot harder than what people think to discover something that they have not seen described in which the person has to literally 'make it up'. This is the thing that when people are taught, they think everything is easy but if you ask them to figure out something, then it becomes a lot harder and unfortunately the way a lot of education works is that people don't really have to figure things out but instead just put things have already been figured out together. In many applications, this is essential but when it comes to really understanding something, then this is destined to fail because it prevents people from asking questions and hence gaining real perspective and context. I encourage you to keep doing this kind of thing no matter how trivial you think it may be or how 'bonkers' you think it may be, because if you accumulate all these little experiences, then before you know it you will have accumulated enough to have a very deep insightful knowledge of that particular thing.
HW Helper
P: 6,790
 Quote by 1MileCrash Do I mean to say that normal arithmetic is modular arithmetic with the modulus as 0?
I'm not sure that modulo 0 math would have any meaning. Math modulo +∞ doesn't have much meaning either, other than an alternate way of stating absolute (positive) value of a number. The normal convention for modulo is that for positive n, 0 <= mod(a, n) < n, and for negative n, -n < mod(a, n) <= 0. It doesn't matter if a is positive or negative.

Note that modular arithmetic is the basis for Reed Solomon and other types of error correction codes, as well as some encryption schemes. With the existence of practical applications, a lot of research has gone into finite field mathematics.

PF Patron
Emeritus
P: 15,671

## Lunatic Rantings about Modular Arithmetic.

Modulo 0 and modulo 1 are indeed two opposite concepts. But I think the right way of seeing this is with the notion of ideals.

An ideal of $\mathbb{Z}$ is a nonempty subset $I\subseteq \mathbb{Z}$ such that
1) $0\in I$.
2) If $x,y\in I$, then $x+y\in I$.
3) If $x\in I$ and $n\in \mathbb{Z}$, then $nx\in I$.

As can easily be verified, both $\{0\}$ and $\mathbb{Z}$ are ideals. Furthermore, for any $n\in \mathbb{Z}$, we have that $n\mathbb{Z}=\{nx~\vert~x\in \mathbb{Z}\}$ is an ideal.

Now, with an ideal I, we can associate a modular arithmetic. Indeed, we say that x=y (mod I) if and only if $x-y\in I$.

Modulo $\{0\}$ is then just equality. Modulo $\mathbb{Z}$ is something that is always true. And we can see that this is indeed two opposite situations: $\{0\}$ is the smallest possible ideal, while $\mathbb{Z}$ is the largest.

Considering ideals in $\mathbb{Z}$ is not terribly exciting. Indeed, one can prove that the only ideals are the ones of the form $n\mathbb{Z}$. So all the modular arithmetics are just the ones you already know.
But ideals are very useful in structures other than $\mathbb{Z}$, where modular arithmetic is maybe more restrictive!!

 Related Discussions Linear & Abstract Algebra 4 Set Theory, Logic, Probability, Statistics 3 General Math 5 Linear & Abstract Algebra 3 Linear & Abstract Algebra 11