Linearity Of A Function

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

-
That would not be a well defined function. What is $17 \mod 1.23$? – Peter Tamaroff Apr 14 '12 at 2:07

1
@PeterT.off 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$. – Peter 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

2
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
show 2 more comments

1 Answer

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 14, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.932050883769989, "perplexity_flag": "middle"}