Basic modular arithmetic question
$begingroup$
If for two integers $a,b$, $a=b mod x$, what is $x$ in terms of $a$ and $b$?.
I think the answer is $a-b$, but I'm not sure how to prove it without modular arithmetic, which I don't really understand.
Is there a simple way to prove and this without mods?
elementary-number-theory
$endgroup$
add a comment |
$begingroup$
If for two integers $a,b$, $a=b mod x$, what is $x$ in terms of $a$ and $b$?.
I think the answer is $a-b$, but I'm not sure how to prove it without modular arithmetic, which I don't really understand.
Is there a simple way to prove and this without mods?
elementary-number-theory
$endgroup$
add a comment |
$begingroup$
If for two integers $a,b$, $a=b mod x$, what is $x$ in terms of $a$ and $b$?.
I think the answer is $a-b$, but I'm not sure how to prove it without modular arithmetic, which I don't really understand.
Is there a simple way to prove and this without mods?
elementary-number-theory
$endgroup$
If for two integers $a,b$, $a=b mod x$, what is $x$ in terms of $a$ and $b$?.
I think the answer is $a-b$, but I'm not sure how to prove it without modular arithmetic, which I don't really understand.
Is there a simple way to prove and this without mods?
elementary-number-theory
elementary-number-theory
edited Dec 7 '18 at 4:58
James Palmer
asked Dec 7 '18 at 4:22
James PalmerJames Palmer
34
34
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
This follows directly from the definition of congruence with respect to modular arithmetic (there's not much you need to know):
$$a equiv b pmod{x} ;;; Leftrightarrow ;;; x | (a-b)$$
(This latter expression, if you're not familiar, just means "$x$ evenly divides $(a-b)$," or, equivalently, "$(a-b)$ has no remainder when divided by $x$.")
The problem is that, in reality, this means that, for some integer $k$,
$$frac{a-b}{x} = k ;;; Leftrightarrow ;;; x = frac{a-b}{k}$$
To say that $x = a-b$ (i.e. that $k=1$) means that there's some sort of context we're missing that would apply in this context. As presented, however, I think this is as far as one can get.
$endgroup$
$begingroup$
Usepmod{x}
to get $aequiv b pmod{x}$.bmod
, will produce the binary operator:bbmod x
produces $bbmod x$. What you want to avoid ismod
, because the spacing is wrong.
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use<
and>
instead oflangle
andrangle
)
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3029459%2fbasic-modular-arithmetic-question%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This follows directly from the definition of congruence with respect to modular arithmetic (there's not much you need to know):
$$a equiv b pmod{x} ;;; Leftrightarrow ;;; x | (a-b)$$
(This latter expression, if you're not familiar, just means "$x$ evenly divides $(a-b)$," or, equivalently, "$(a-b)$ has no remainder when divided by $x$.")
The problem is that, in reality, this means that, for some integer $k$,
$$frac{a-b}{x} = k ;;; Leftrightarrow ;;; x = frac{a-b}{k}$$
To say that $x = a-b$ (i.e. that $k=1$) means that there's some sort of context we're missing that would apply in this context. As presented, however, I think this is as far as one can get.
$endgroup$
$begingroup$
Usepmod{x}
to get $aequiv b pmod{x}$.bmod
, will produce the binary operator:bbmod x
produces $bbmod x$. What you want to avoid ismod
, because the spacing is wrong.
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use<
and>
instead oflangle
andrangle
)
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
add a comment |
$begingroup$
This follows directly from the definition of congruence with respect to modular arithmetic (there's not much you need to know):
$$a equiv b pmod{x} ;;; Leftrightarrow ;;; x | (a-b)$$
(This latter expression, if you're not familiar, just means "$x$ evenly divides $(a-b)$," or, equivalently, "$(a-b)$ has no remainder when divided by $x$.")
The problem is that, in reality, this means that, for some integer $k$,
$$frac{a-b}{x} = k ;;; Leftrightarrow ;;; x = frac{a-b}{k}$$
To say that $x = a-b$ (i.e. that $k=1$) means that there's some sort of context we're missing that would apply in this context. As presented, however, I think this is as far as one can get.
$endgroup$
$begingroup$
Usepmod{x}
to get $aequiv b pmod{x}$.bmod
, will produce the binary operator:bbmod x
produces $bbmod x$. What you want to avoid ismod
, because the spacing is wrong.
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use<
and>
instead oflangle
andrangle
)
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
add a comment |
$begingroup$
This follows directly from the definition of congruence with respect to modular arithmetic (there's not much you need to know):
$$a equiv b pmod{x} ;;; Leftrightarrow ;;; x | (a-b)$$
(This latter expression, if you're not familiar, just means "$x$ evenly divides $(a-b)$," or, equivalently, "$(a-b)$ has no remainder when divided by $x$.")
The problem is that, in reality, this means that, for some integer $k$,
$$frac{a-b}{x} = k ;;; Leftrightarrow ;;; x = frac{a-b}{k}$$
To say that $x = a-b$ (i.e. that $k=1$) means that there's some sort of context we're missing that would apply in this context. As presented, however, I think this is as far as one can get.
$endgroup$
This follows directly from the definition of congruence with respect to modular arithmetic (there's not much you need to know):
$$a equiv b pmod{x} ;;; Leftrightarrow ;;; x | (a-b)$$
(This latter expression, if you're not familiar, just means "$x$ evenly divides $(a-b)$," or, equivalently, "$(a-b)$ has no remainder when divided by $x$.")
The problem is that, in reality, this means that, for some integer $k$,
$$frac{a-b}{x} = k ;;; Leftrightarrow ;;; x = frac{a-b}{k}$$
To say that $x = a-b$ (i.e. that $k=1$) means that there's some sort of context we're missing that would apply in this context. As presented, however, I think this is as far as one can get.
edited Dec 7 '18 at 4:33
answered Dec 7 '18 at 4:28
Eevee TrainerEevee Trainer
7,67221338
7,67221338
$begingroup$
Usepmod{x}
to get $aequiv b pmod{x}$.bmod
, will produce the binary operator:bbmod x
produces $bbmod x$. What you want to avoid ismod
, because the spacing is wrong.
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use<
and>
instead oflangle
andrangle
)
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
add a comment |
$begingroup$
Usepmod{x}
to get $aequiv b pmod{x}$.bmod
, will produce the binary operator:bbmod x
produces $bbmod x$. What you want to avoid ismod
, because the spacing is wrong.
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use<
and>
instead oflangle
andrangle
)
$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
$begingroup$
Use
pmod{x}
to get $aequiv b pmod{x}$. bmod
, will produce the binary operator: bbmod x
produces $bbmod x$. What you want to avoid is mod
, because the spacing is wrong.$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
Use
pmod{x}
to get $aequiv b pmod{x}$. bmod
, will produce the binary operator: bbmod x
produces $bbmod x$. What you want to avoid is mod
, because the spacing is wrong.$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:30
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
I just was straight up using text{mod}, but noted.
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:33
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use
<
and >
instead of langle
and rangle
)$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
The three different modular commands are the second most common LaTeX mistake people make, I try to spread the knowledge where I can. (The most common is to use
<
and >
instead of langle
and rangle
)$endgroup$
– Arturo Magidin
Dec 7 '18 at 4:34
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
Thanks! I think a better phrasing is "If two integers a,b have the same remainder when divided by x, what is x in terms of a and b?" I think I used the mod wrong, sorry!
$endgroup$
– James Palmer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
$begingroup$
I honestly just don't know much LaTeX, really. Most of what I know is self-taught or seen from experience, like using WYSIWYG editors and such. This site has at least been helpful in improving my LaTeX lol
$endgroup$
– Eevee Trainer
Dec 7 '18 at 4:35
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3029459%2fbasic-modular-arithmetic-question%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown