Congruence for real numbers I have a stupid question. I just saw
$$\sqrt{2}^{p}\equiv \pm \sqrt{2}\pmod{p}$$
for all $p>2$ prime. 
In a sense, this is easy to verify. E.g. for $p=3$, we have $\sqrt{2}^3=2\sqrt{2}$ on the LHS, and $2\equiv -1\pmod{3}$. 
But I still wonder what the underlying definition of congruence here is. Usually, one says $a\equiv b\pmod{c}$ iff $a-b=kc$, where $k$ is integral. But $\sqrt{2}^p\pm\sqrt{2}$ is never of the form $kp$ for an integral $k$. 
There surely must be something very simple that I'm missing. 
 A: The meaning of the square root symbol can change if we are in a different field. Or, not the meaning, because that's the same. But the result changes.
For instance, modulo $7$, we have $3^2\equiv 2$, so in a sense $\sqrt2\equiv 3$ (or $4$, depending on which square root you pick; I'll go with $3$). Then we get $\sqrt2^7\equiv 3^7\equiv 3\equiv\sqrt2$ (you would get the same if you had gone with $4$).
In a field where $2$ doesn't have a square root, like modulo $5$, we have to adjoin a square root of $2$. This is done pretty much the same way we adjoin a square root of $-1$ when we construct the complex numbers from the real numbers: we introduce a symbol $\sqrt2$ (that's a single symbol in this case, not a square root operator and a numeral $2$), defined by the property that $\sqrt2^2 = 2$. Then we use it as the variable in polynomials the same way we would use, say, $x$, except that every time it's raised to a power of $2$ or greater, we are allowed to simplify. In this case, we get $\sqrt2^5 = \sqrt2^2\cdot \sqrt2^2\cdot\sqrt2 = 2\cdot 2\cdot \sqrt2\equiv -\sqrt2$.
Similar calculations may be done for any prime $p>2$.
A: So long as $p>2$ the extension of $\mathbb F_p$ generated by adjoining a square root of $2$ will be an extension of degree $d \leq 2$. The Galois group is generated by Frobenius, which is $p$-th powering, so you're just looking at the action of the Galois group on a generator. The sign on the right-hand-side can be taken as the definition of the Legendre symbol, $\left(\frac{2}{p}\right)$, or more generally $\left(\frac{d}{p}\right)$ for $\sqrt{d}^p = \pm \sqrt{d}$.
