I have been working through exercises in a book on polynomials. There is a section in the first chapter on some basic number theory.  I am having trouble completing one of the exercises. Part (e.) of the exercises goes like this : &quot;We say that the solution of a congruence $ax \equiv b ( \mod m)$ is unique modulo $m$, or simply, unique, if the difference between any two solutions is divisible by $m$. In other words, the requirement is that $au \equiv av \equiv b (\mod m)$ implies $u \equiv v (\mod m)$. Show that the solution of the congruence is unique if and only if $\text{gcd}(a,m) = 1$.&quot; Here a solution to the congruence is some $x \in \mathbb{Z}$ s.t. $ax \equiv b(\mod m)$ is true. I suspect $u$ and $v$ are two arbitrarily chosen solutions. I think I am able to prove the forward implication but not the backwards one. We see : \begin{equation} au \equiv av \equiv b ( \mod m) \Rightarrow m | (au - b) \text{ and } m|(av-b) \end{equation} Where $x|y$ means that $y$ is divisible by $x$. The above implies : \begin{align} &amp; \Rightarrow m | \left[ (au - b) - (av - b) \right]   \\\\ &amp; \Rightarrow m | \left[ (au - av) + (b - b ) \right]  \\\\ &amp; \Rightarrow m | (au - av)                            \\\\ &amp; \Rightarrow au \equiv av ( \mod m) \end{align} So this implies : \begin{align} \Rightarrow m | (au - av) \Rightarrow m | a(u-v) \end{align} We then see : \begin{equation} \text{gcd}(a,m) = 1 \text{ and } m | a(u-v) \Rightarrow m | (u-v) \text{ and } m \not | a \end{equation} Where $m \not | a$ means that $a$ is not divisible by $m$. So in this case : \begin{equation} u \equiv v ( \mod m ) \; \checkmark \end{equation} So here I've shown that : \begin{equation} \text{gcd}(a,m) = 1 \text{ and } au \equiv av \equiv b (\mod m) \Rightarrow u \equiv v (\mod m) \end{equation} But I haven't shown that : \begin{equation} \text{gcd}(a,m) \neq 1 \text{ and } au \equiv av \equiv b (\mod m) \Rightarrow u \not \equiv v (\mod m) \end{equation} Can anyone help me with how to prove the converse ?
I know that there exists at least one solution, because $ax \equiv b \mod m \implies ax - b = qm$  Rearranging terms gives $ax - qm = b$, and since $d | a$ and $d | m$, so $d | b$ it can be said that $b \equiv 0 \mod d$.  I implemented Euclid's extended algorithm and have been able to experimentally verify that the claim holds, but I do not see a pattern or how I can begin to show there are exactly $d$ solutions.  def euclid_extended(x, y, i=0):   if y == 0:     print("iteration {0} returns ({1}, {2}, {3}) - base case hit with ({4}, {5})".format(i, x, 1, 0, x, y))     return (x, 1, 0)   else:     (d, a, b) = euclid_extended(y, x % y, i + 1)     print("iteration {0}. ({4}, {5}) =&gt; ({1}, {2}, {3})".format(i, d, b, a - b * (x//y), x, y))     return (d, b, a - b * (x//y))
Why can templates only be implemented in the header file? Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) Can sum of a rational number and its reciprocal be an integer? Can sum of a rational number and its reciprocal be an integer?   My brother asked me this question and I was unable to answer it.   The only trivial solutions which I could think of are $1$ and $-1$.  As to what I tried, I am afraid not much. I have never tried to solve such a question, and if someone could point me in the right direction, maybe I could complete it on my own.  Please don't misunderstand my question.   I am looking for a rational number $r$ where $r + \frac{1}{r}$ is an integer. When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$? The question is:     When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$?   The most obvious solution is a linear function of the form $f(x)=ax+b$. Is this the only solution?  Edit  I should add that $f:\mathbb R\to\mathbb R$ to the question. Idempotent linear operators are projections I'm working on this problem: Suppose $V$ is a Hilbert space and $P : V \to V$ is a linear map such that $P^2= P$ and $\Vert Pf \Vert \leq \Vert f \Vert$ for every $f \in V$. Prove that there exists a closed subspace $U$ of $V$ such that $P = P_U$. I did do some searching online and I know that $P$ is an idempotent matrix and I know that $U$ is supposed to be $\text{range}P$, which I can show is closed. However, I'm having a hard time showing $P_{\text{range}P} = P$. I know that I can decompose $f = g + h$, where $g \in \text{range}P$ and $h$ is in the orthogonal complement of $\text{range}P$. I'm not sure how to proceed. Most of the online searches require that $P$ be self-adjoint, but this question doesn't have this condition. Can I get some help? How to draw simple table How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar" How to transfer minecraft pocket edition world between iPads? My daughter has built a minecraft world on our iPad. As of Christmas 2013 she has an iPad mini of her own. Is there any way to transfer her world from the old machine?   Even better...is there any way to synchronise the 2 machines? Does the Mordenkainen's Magnificent Mansion spell's mansion exist on a separate plane of existence? In particular: the  spell (PHB, p. 281) states:  [...] The creature can be anywhere on the same plane of existence as you. The spell ends if you or the target are no longer on the same plane. [...]  Can telepathy connect two characters, one inside the extradimensional dwelling created by the  spell and the other in the same plane as the portal to the magnificent mansion? I've inherited a Maintenance Plans that does the following:   Cleanup old data Checks DB integrity Performs Database and Transaction Log Backups Reorganizes Our indexes Updates Statistics Delete old backups and Maintenance Plan files   Of the 23 minute Maintenance Plan, Updating the Statistics takes a staggering 13 minutes. During this 13 minute period, access to the database is blocked (or at least, replication from this DB to our others is paused).  My Question Is:  When should we be Updating the Statistics, and why?   This seems like the kind of thing we should do less frequently than every day. I'm trying to get us out of the "just because" mind-set of doing unnecessary Maintenance. Layers with different directional drop shadows in Photoshop I am wondering how to have 2 different directional drop shadows in the one file with Photoshop. e.g. 2 different type layers — one has a drop shadow at 90 degrees, the other at -45 degrees.  Currently it seems Photoshop only lets me have 1 universal direction for the whole file, which I find really pointless.   I know how to apply different drop shadows and merge down layers to achieve the same thing, but its tedious and not exactly streamlined for making future changes to that layer.  How is this achieved? Looking for Space Exploration Book which is collection of different sub-stories The Book is about an earthship exploring the frontiers that I read as a kid (80's). All the stories are told by the same character but different encounters and events.    The first story is about the crew exploring the planet in a number of separate ships when one of them is taken over by a telepathic alien. As the ship returns however the surprise is sprung on the alien that the Mother ship is Computer controlled. Another is the ship shrinking and then finding after its shrunk beyond the atom that it comes back in as gigantic compared to the Universe in a closed loop.   Hopefully that's enough to trigger a memory. Should I install programs from a source tarball (`.tar.gz`), from the Ubuntu Software Centre, or from elsewhere? Does the given matrix have a square root? Given the following matrix, I was asked to tell whether the matrix is the square of some matrix or not.  $$ \begin{pmatrix} 1 &amp; 0 &amp; 0\\ 0 &amp; -1 &amp; 0\\ 0 &amp; 0 &amp; -1 \end{pmatrix} $$  Since this matrix is diagonal, a square root is  $$ \begin{pmatrix} 1 &amp; 0 &amp; 0\\ 0 &amp; i &amp; 0\\ 0 &amp; 0 &amp; i \end{pmatrix} $$ Am I right? Is it possible to take an image from the clipboard and output it to a file (using X)?  I can do this with text easily:  $ xclip -selection c -o &gt; file.text   But when I try the above with an image nothing is written.    The reason I want to do this is I don't have an image editor installed, and it got me thinking whether I could do this without installing one. Should initial e's after h-dropping be capitalized? A new Victorian-set British novel begins sentences containing h-dropping with lower-case e's, as in " 'e took my money, 'e did." This seems incorrect but I'm at a loss to find the rule. MongoDB could not connect local server Why not make  but for questions too?  I love that everything is well though behind SO but I can't see no reason as to why great questions can't be prized with "Badges by subject". What's the difference between importing and extending a class? What to look for in a starter-level off-camera flash? I have zero experience with flash and want to learn how to use it from zero, for example by following the Strobist blog.  What are the absolutely necessary specifications I should look for when shopping for a flash, and can I find something in a price range less than $200.00?  My camera is a Nikon DSLR. Java: Prefix/postfix of increment/decrement operators?