1

Is the function $x \pmod m$ is defined for non-integer $x$? I am asking because my professor has explained why we can't divide both sides of something like $a \equiv b \pmod m$ by $4$ by saying we can't multiply by $1 \over 4$, saying "$1 \over 4$ doesn't exist here". So must numbers in modular expressions always be integers?

Princess Mia
  • 2,403
  • Caution: By my count, there are at least three ways to interpret your question. Depending on context and application, the answer can change. In the most restricted context, the answer is "no, $x \pmod{m}$ is not defined for non-integer $x$" – Brian Moehring Aug 22 '23 at 05:58
  • Are you multiplying $m$ by $\frac14$? Clearly $4 \equiv 0 \pmod 4$ does not imply $1 \equiv 0 \pmod 4$ – Henry Aug 22 '23 at 05:59
  • You need to consider what definitions you're working with. The usual definition of mod $m$ (at least as far as I've seen) does not support what you seem to be trying to do. Effectively, $1/4$ doesn't exist in that context. If you were doing some other kind of "mod $m$" mathematics with different definitions, you might be able to have some non-integers, but still not be able to divide by $4$ naively as you appear to want to do. – David K Aug 22 '23 at 06:25
  • Please clarify if your question is restricted to rational $x$ (fractions) or reals or some other rings. – Bill Dubuque Aug 22 '23 at 06:31

3 Answers3

1

[Edit: I'm updating this because I feel like this deserves a fuller explanation.]

Your question depends a lot on the context you are working in, as David K and Brian Moehring both pointed out in the comments.

In general (with potential exceptions from more advanced algebra), the statement $a\equiv b (\mod m)$ should mean that "$a-b$ is an integer multiple of $m$".

So really that means $a$ and $b$ and $m$ should be members of some set where we know how to add and subtract members from each other (we also need to know how to multiply, but only by integers, which we can accomplish through repeated addition/subtraction).

You may or may not have been exposed to this, but we call such an animal an abelian group. Examples include integers $\mathbb Z$, the rationals $\mathbb Q$, the reals $\mathbb R$, and even the complexes $\mathbb C$, as well as many others.

So when you are doing modular arithmetic, you usually have specified in advance what underlying group $a$, $b$, and $m$ are taken from. Your professor may very well be taking them from the integers $\mathbb Z$. In my original answer below, I somewhat arbitrarily supposed we were talking about $\mathbb R$, so that $a$, $b$, and $m$ are real numbers, but we could just as easily talk about $\mathbb C$, for example.

[Original Answer:]

Not exactly. The numbers $a$ and $b$ in your congruence do not have to be integers (and neither does $m$ for that matter), however, if you want to multiply both sides of a congruence $(\mod m)$ by a number $\lambda$, then that number $\lambda$ does need to be an integer.

This is because the congruence is stating that $a-b$ is an integer multiple of $m$, so when you multiply both sides by $\lambda$, you really only know that $\lambda a- \lambda b$ is a multiple of $\lambda m$. To then conclude that $\lambda a \equiv \lambda b (\mod m)$, you need to know that $\lambda m$ is itself a multiple of $m$, which only happens when $\lambda$ is an integer.

[Edit: Notice that by the preceding discussion, you can multiply by a non-integral $\lambda$ if you are willing to change the modulus, i.e., $a \equiv b (\mod m)$ does imply (and in fact is equivalent to) $\lambda a \equiv \lambda b (\mod \lambda m)$, provided $\lambda\in \mathbb R\backslash\{0\}$.]

M W
  • 9,866
0

It depends.

I would argue that as long as $m$ is odd, then multiplication by $4$ modulo $m$ is injective, thus reversible. This reverse operation is what division by $4$ means modulo $m$. In this case, division by $4$ happens to be equivalent to multiplication by $1\div 4$. This integer is what I would call $\frac14$ modulo $m$. (There is nothing special about $4$ here, except $\gcd(m,4)=1$.)

In the field of topology, we often aren't so interested in algebraic operations. There we can talk about the real number line modulo some number without issue, and it's just a circle. $\frac14$ in that case would just be a point on that circle (technically a representative of a point), although there would be no "division" operation associated with that point.

Arthur
  • 199,419
0

Firstly, for reals $x$ and $y$ and an integer $m$, you may write $x\equiv y\bmod m$ whenever $x-y$ is an integer divisible by $m$. For instance, $$3.7\equiv -6.3\bmod 5.$$

However, keep in mind that the reals modulo $m$, often written as $\mathbb R/m\mathbb Z$, do sometimes not behave so nicely. For instance, $\mathbb R/m\mathbb Z$ is not a ring because it does not allow for multiplication: you cannot just multiply any two reals modulo $m$. To illustrate this, notice that $$0.5\equiv 5.5\bmod 5,\qquad 0.1\equiv 5.1\bmod 5,$$ yet multiplying both gives $$0.05\equiv 28.05\bmod 5,$$ which is of course wrong!

Zuy
  • 4,656