[Math] Find a solution or show that there is none: $x^2 \mod 7 = 3 \; (x\in \mathbb{Z})$

congruences

Find a solution or show that there is none: $x^2 \mod 7 = 3\;(x\in \mathbb{Z})$

I've tried different ways to approach this problem, such as rewriting the equation in the form $x^2 = 7k+3$, where k is an integer.

Then it becomes proving that $\sqrt{7k+3}$ is not an integer (for $k\in \mathbb{Z}$), or finding a solution to it. But here, I've been stuck.

Can anybody help me with this?

Thank you for your time.

Best Answer

The question of whether the equation $$x^2 \equiv 3 \pmod{7}$$ has any solutions is equivalent to the question is $$x^{2} = 3$$ solvable for $x \in \mathbb{Z}/ 7\mathbb{Z}$.

So, as Donald Splutterwit mentions in the comments, we can calculate the value of $x^{2}$ for each $x \in \mathbb{Z}/ 7\mathbb{Z}$ and check whether it is equal to $3$.

In general, the question of whether for $p$ prime and fixed integer $n$ the equation, $$x^{2} \equiv n \pmod{p}$$ has a solution is answered by Gauss's quadratic reciprocity.

$\textbf{Edit:}$

To expand upon the answer, suppose that there exists $x\in \mathbb{Z}$ such that $$x^{2} \equiv 3 \pmod{7},$$ then $7 \mid (x^{2} - 3)$, which implies that there is an $a\in \mathbb{Z}$ so that $$x^{2} - 3 = 7a.$$

Then, by the Euclidean division algorithm, $x = 7k+r$ for some $0 \leq r \leq 6$. Substituting this expression into the above formula yields $$49x^{2} + 14kr + r^{2} - 3 = 7a,$$ which is equivalent to saying that there is $a^{'} \in \mathbb{Z}$ so that $$r^{2} - 3 = 7a^{'}.$$ (Just bring the terms on the LHS divisible by $7$ to the RHS and factor out a $7$.)

Now, we see that if $7 \mid (x^{2} - 3)$, then $7 \mid (r^{2} - 3)$ for some $0 \leq r \leq 6$.

So, to show that $7 \nmid (x^{2} - 3)$ for all $x\in \mathbb{Z}$, it is enough to show that $7 \nmid (r^{2} - 3)$ for $r \in \{0,1,\ldots, 6\}.$

Related Question