# Solving for an x value in modular arithematic. Efficient method exist?

Find a solution $x$ to the following congruence:

$$2x \equiv 7 \pmod{11}$$.

So my issue is not in solving this exact problem, I am more curious if there is a more efficient way of solving these sorts of questions besides trying every integer that would be in the set $S = \{0,....m-1\}$ ? This is my first number theory class, so if there is an extremely advanced way then i don't think i would be ready to understand it.

Also to do with this question and in the general sense how do we treat the values of $x$ that produce integers that are smaller than our modulus? For example in this question when $x = 0,1,2..5$ each of those produce a number less than our modulus 11. Now i know it is possible they could have a negative congruence but do we treat these sorts of values in any other way?

• $2x\equiv 7\pmod {11}\implies 2x-11y=7$, which is an $Diophantine\; equation$. Now, can you solve? If you don't know about Diophantine equation, then simply count yourself, and put down the solutions using your intuition. – user249332 Sep 20 '15 at 17:43
• I learned diophantine awhile back, but i am going to have to go refresh myslf how to do them, but i am familiar with the idea. How about treating the lesser values in comparison to my modulus? – dc3rd Sep 20 '15 at 17:47
• Are you familiar with introductory ring theory and know that $(\mathbb{Z}_p,+_p,\times_p)$ is a field when $p$ is a prime (implying that every element in $\mathbb{Z}_p\setminus\{0\}$ has a multiplicative inverse)? You can then write $x$ as $2^{-1}\cdot 7$ since then $2x=2\cdot 2^{-1}\cdot 7=7$ – JMoravitz Sep 20 '15 at 17:49
• What did you mean by 'lesser values'. – user249332 Sep 20 '15 at 17:49
• @JMoravitz, not at ring theory yet, but now I get the jist of at what level the "more efficient idea" exists at. – dc3rd Sep 20 '15 at 17:57

First answering your second question. When considering congruences we do not consider $x$ as a natural number or integer, but rather a set (class) of numbers, e.g. in $x \equiv 2 \mod 11 \iff x \in \{...,-9,2,13,24,...\}$. I think it helps to view this from another viewpoint that makes the 'modular arithmetic' somewhat clearer: In group theory we consider the group $G = \mathbb Z / 11 \mathbb Z$ whose elements are of the form $n+11\mathbb Z$, basically this whole set. But $2+11\mathbb Z$ is the same element as $13 + 11 \mathbb Z$, these two are just other representations of the same element.
• +1: Though, I would say $x\in\{\dots,-9,2,13,24,\dots\},$ instead. – Cameron Buie Sep 20 '15 at 17:52
• Actually looking at it again that idea of looking at $x$ as a set is very enlightening. – dc3rd Sep 20 '15 at 18:04