Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that the linearity of a function is determined by the degree of the polynomial but I was unsure whether the modulus operator changes this?

Is $f(x) = N \mod x$ a linear function if $N$ and $x$ are integers?

As in:

$f(x) = 17 \mod x$

share|cite|improve this question
That would not be a well defined function. What is $17 \mod 1.23$? – Pedro Tamaroff Apr 14 '12 at 2:07
1 Surely OP wants the domain $\Bbb Z$ or $\Bbb N$? – anon Apr 14 '12 at 2:09
@anon I think it is normal to note $x$ a real number. Anyways, it would not be a function like polynomials and linear functions, which the OP mentions, which are usually $\mathbb R \mapsto \mathbb R$. – Pedro Tamaroff Apr 14 '12 at 2:11
Sorry, I didn't think the clarification would change the answer. Both N and x are integers. N is just another variable. It is linear? – Char Apr 14 '12 at 2:15
No. $f(4) = 17 \mod 4 = 1$ but $f(2) + f(2) = 17 \mod 2 + 17 \mod 2 = 2$. – Neal Apr 14 '12 at 2:17

You have to decide what you mean by linear before you can answer this question. The function $f(x)=mx+b$, which you call "definitively linear", satisfies $$f(r-s)-2f(r)+f(r+s)=0$$ for all $r,s$. The function $f(x)=17$ reduced modulo $x$ doesn't: $$f(2)-2f(3)+f(4)=1-4+1=-2\ne0$$ If you want to call it linear, go ahead, but beware that it won't do most of the things that you might expect linear functions to do.

share|cite|improve this answer

I would say that it is linear over any subset of the domain of the form $(a,a+17)$, where $a$ is where the $ 17 \mod a = 0$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.