I was looking at a Mathologer video recently when he was showing how to prove Fermat's last theorem for powers of $4$. And the guy speaking went on this tangent which involved taking remainders when dividing by something. As he was speaking, he showed an equation and divided all the terms by $4$. And using some already known theory he showed how some of those terms gave only $1$ specific remainder. What I don't get is why if you divide all terms in an equation by a number, the remainders on each side of the equation are equal.
Here is what he basically meant if you don't understand what I'm saying:
$$3987^{12} + 4365^{12} = 4472^{12}.$$
And he showed that this was false because apparently and even number raised to an even number, it will always be divisible by $4$ (Can someone show we why this is true too?) And when an odd number is raised to an even number, the only remainder is $1$ (Also this one as well please). So after dividing both sides of that equation with the number $4$, the first term on the left ($3987^{12}$) gives a remainder of $1$ (because its odd raised to even) and so does the other term on the left. But the term on the right when divided by $4$ gives remainder $0$. And so he concludes that if you add the remainders on the left it gives $1+1 = 2$, and the right gives $0$. And $2$ does not equal $0$, therefore the original equation was false.
So basically summed up, my question is: Why when you divide both sides of an equation by a number, the remainders on each side of the equation will be equal?
This is important business, and I want to deal with two separate aspects of your misunderstanding.
I’ll deal only with your last sentence, “Why when you divide both sides of an equation by a number, the remainders on each side of the equation will be equal.”
The first aspect is the meaning of the mathematical symbol “$=$”. It means is. It means that you’re not talking about two numbers, the one on the left versus the the one on the right side of the equals sign. It means that you’re talking about one number, which merely has been described in two different ways. This is what justifies the standard steps that you take when solving an equation, for instance. When we take into consideration what your equation means, what you’re asking is, why the remainder upon division (by $4$ in this case) is well-defined.
And this brings us to the second thing that you’ve misunderstood, and it’s something we see frequently in our students. It’s the amazing strength of the concept of uniqueness. It’s just that if we’ve proved, somehow, that a condition is satisfied by only one number, and if we have (supposedly) two numbers that satisfy that condition, then they are in fact the same number. So from a logical condition we have derived an equality.
In the case of division, when the givens are a dividend $N$ and a divisor $d>0$, then there are a quotient $q$ and remainder $r$, such that $$N=dq+r\,,$$ satisfying $0\le r<d$. And part of the statement of the relevant theorem is that the pair of numbers $(q,r)$ so gotten is unique. And for us, it’s the uniqueness that carries the heaviest load of meaning and utility.
You have a number, it’s the number on the two sides of your equation; and you divide it by $4$; then you ask what the remainder is. Whatever it is, it’s a particular number, not “random”, as you feared in a comment.