# Confusion p.t. modulo notation in a proof

My text posed the following question (priorly asked on Math StackExchange): Prove that the square of any integer has one of the forms $$3k$$ or $$3k + 1$$, $$k \in ℤ$$, and provided the answer: To which I had two questions, the second of greater import:

1. What informs us to conclude that if $$x^2$$ is congruent to $$0$$ or $$1$$ mod$$3$$, then $$x$$ is congruent to $$0, 1$$ or $$2$$ mod$$3$$?
2. I do not understand the notation the author provided. What does $$x^2 ≡ 0^2$$ signify (i.e. without the mod), and how did she obtain that response from $$x ≡ 0$$ mod$$3$$ ? Moreover, how does one get from $$x^2 ≡ 0^2$$ to $$x^2 ≡ 0^2 = 0$$ mod$$3$$?

• The notation $a\equiv b\pmod n$ is equivalent to saying that $n$ divides $a-b$; in other words, $a$ and $b$ are congruent modulo $n$, ie, they represent the same equivalence class in the set of integers modulo $n$ (denoted by $\Bbb Z/n\Bbb Z$) – learner Feb 2 at 18:54
• I recommend that you start with reading about the basics of modular arithmetic and properties on modular equivalence, for example $a\equiv b\pmod n$ implies $a^m\equiv b^m\pmod n$, etc – learner Feb 2 at 18:56
1. We are concluding the converse: if $$x$$ is congruent to $$0, 1,$$ or $$2 \pmod 3$$, then $$x^2$$ is congruent to $$0$$ or $$1 \pmod 3.$$ Note that for all $$x \in \mathbb Z,$$ $$x$$ is congruent to $$0, 1,$$ or $$2 \pmod 3$$. Therefore, by considering these three cases, it is proved that, for all $$x \in \mathbb Z,$$ $$x^2$$ is congruent to $$0$$ or $$1 \pmod 3$$.
2. When the text says $$x$$ is congruent to $$0$$ or $$1 \pmod 3$$, that is a short-cut for saying $$x$$ is congruent to $$0 \pmod 3$$ or $$x$$ is congruent to $$1 \pmod 3.$$ $$0^2 = 0 \times 0 = 0.$$