Please excuse me if the answer is obvious because I'm a beginner.
Why can we exchange numbers when working with modulo expressions?
For example:
$$4^2 \equiv (-1)^2 \pmod{5}$$
You may say the replacement between $4$ and $-1$ is justified because:
$$4\equiv -1 \pmod{5}$$
I understand that equality, when you divide $4$ by $5$ you get a remainder $4$ and if we subtract $5$ from that we get $-1$. But I still don't understand why we can replace $4$ with $-1$.
Furthermore if $a\equiv c \pmod{b}$ are we justified in replacing $a$ with $c$ in every occasion?