Skip to main content
\( \newcommand{\lt}{ < } \newcommand{\gt}{ > } \newcommand{\amp}{ & } \)

Section13.3A Lemma About Square Roots Modulo \(n\)

We'll continue our formal investigation of what numbers are in sums of two squares by taking a look at a lemma seemingly unrelated to this. Later we'll see that square roots of negative one in \(\mathbb{Z}\) (not \(\mathbb{Z}_n\)) are connected to sums of squares as well, so this is not a completely implausible connection.

Before we do this, let's codify something we already have discussed, e.g. in Fact 7.3.1 or Section 7.6.

Definition13.3.1

We say that a number \(a\) has a square root modulo \(n\) if there is some number \(x\) with \begin{equation*}x^2\equiv a\text{ (mod }n)\; .\end{equation*}

As an example, here is an alternate proof of Exercise 7.7.10.

Remember, this means there can't be a square root of minus one if \(p\equiv 3\text{ (mod }4)\). Of course, it also only means that there might be one if \(p\equiv 1\text{ (mod }4)\), so we certainly need the following lemma to confirm there is one. (See its use in Subsection 16.1.1, where we combine everything into Fact 16.1.2.)

Somehow this is a satisfying answer. We can check that these really are square roots of \(-1\) using Sage.