# Thread:

1. ## Modular Arithmetic

I'm having a hard time understanding modular numbers and aritmetic.

If I have $r=a(\mod P)$, then $r-a=bP$ where $b$ is an integer. So if I want to find 23 in $\mod 12$, I write $r=23(\mod 12)$ which should turn out to be 11 right? So 23 is equal to 11 in $\mod 12$.

So if I want to find:
$r=26(\mod 12)$

I need to find r such that:
$r-26=b12$

where b is an integer and r is the smallest possible positve number satisfying the equation. Is this correct? 26 hours would bring us to 2 o-clock since 2 is the smallest positive integer such that $2-26=b12$ where $b$is an integer. So here, $b=-2$.
-----------------------------------------------------------------
One more example with a different mod that isn't so familiar:

$r=3(\mod 7)$

$r-3=b7$

So the smallest possible number seems to be 10 with $b=1$.

$10=3(\mod 7)$

where b is an integer.
------------------------------------------------------------------

Is my reasoning correct?

2. Originally Posted by adkinsjr
I'm having a hard time understanding modular numbers and aritmetic.

If I have $r=a(\mod P)$, then $r-a=bP$ where $b$ is an integer. So if I want to find 23 in $\mod 12$, I write $r=23(\mod 12)$ which should turn out to be 11 right? So 23 is equal to 11 in $\mod 12$.

So if I want to find:
$r=26(\mod 12)$

I need to find r such that:
$r-26=b12$

where b is an integer and r is the smallest possible positve number satisfying the equation. Is this correct? 26 hours would bring us to 2 o-clock since 2 is the smallest positive integer such that $2-26=b12$ where $b$is an integer. So here, $b=-2$.
-----------------------------------------------------------------

$23\equiv 11\pmod{12}$ since $23\pmod{12}\equiv11+12\pmod{12}\equiv11+0\pmod{12} \equiv11\pmod{12}$

and

$26\equiv 2\pmod{12}$ since $26\equiv 24+2\pmod{12}\equiv 2(12)+2\pmod{12}\equiv 0+2\pmod{12}\equiv 2\pmod{12}$

One more example with a different mod that isn't so familiar:

$r=3(\mod 7)$

$r-3=b7$

So the smallest possible number seems to be 10 with $b=1$.

$10=3(\mod 7)$

where b is an integer.
------------------------------------------------------------------
In this case, $r=3\equiv3\pmod{7}$ is the smallest positive value. Can you try to reason out why?

3. Originally Posted by Chris L T521

$23\equiv 11\pmod{12}$ since $23\pmod{12}\equiv11+12\pmod{12}\equiv11+0\pmod{12} \equiv11\pmod{12}$

and

$26\equiv 2\pmod{12}$ since $26\equiv 24+2\pmod{12}\equiv 2(12)+2\pmod{12}\equiv 0+2\pmod{12}\equiv 2\pmod{12}$

In this case, $r=3\equiv3\pmod{7}$ is the smallest positive value. Can you try to reason out why?
I'm not understanding this at all:

$23\equiv 11\pmod{12}$ since $\underbrace{23\pmod{12}\equiv11+12\pmod{12}\equiv1 1+0\pmod{12}\equiv11\pmod{12}}$

Your going through all of those steps I underbraced, where as I'm saying that $23=11(\mod 12)$ because 23 is the smallest number such that $23-11=b12$, where $b$ is an integer. In this case, -1. Any number in $0\leq x\leq23\$ will not give an integral multiple of twelve when I subtrace 11.

In this case, is the smallest positive value. Can you try to reason out why?
No, my reasoning wouldn't work here then. For $r=a(\mod P)$, I find $r$ such that $r$ is the smallest number such that $r-a=bP$

So if $3=3(\mod 7)$, then $3-3=b7$ therefore $b=0$. So if I have $r=11 (\mod 12)$, it seems that I could just as easily claim that this is equal to 11 since $11-11=b12$ with $b=0$ again.

4. I think you've got your definition backwards. You say "23= 11 (mod 12) because 23 is the smallest number such that 23- 11= b12, where b is an integer." No, 23= 11 (mod 12) because 11 is the smallest number such that 23- 11 is a multiple of 12. And, of course, 11= 11 (mod 12) because 11 is the smallest number such that 11- 11 is a multiple of 12.
{"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": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 56, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "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.9404257535934448, "perplexity_flag": "head"}