Two mathematical statements are equivalent if they represent the same "truth", or the same solution. A lot of basic algebra involves moving between equivalent statements by applying reversible transformations.
For example, the operation "add 2 to both sides of the equation" is reversible, since you can subtract 2 from both sides and get back to your original equation:
$$\begin{eqnarray} x - 3 & = & 5 & \iff \\
(x - 3) + 2 & = & 5 + 2 & \iff \\
x - 1 & = & 7 \end{eqnarray}$$
Notice that if you substitute $x = 8$ into all three rows of the above, you always get a true statement ($5 = 5$ in the first row, and $7 = 7$ in the other two). And if you substitute any other value for $x$, you get a false statement - e.g. $x = 1$ gives you $-2 = 5$ in the first row, and $0 = 7$ in the others. So the "solution set" for all three equations is the same thing.
The same goes for "multiply both sides of the equation by 2", which you can reverse by dividing by 2. These are both reversible, or we might say invertible operations.
However, not every operation is invertible. Multiplying by zero is not invertible - once you do that, you can't go back to the original value; neither is dividing by zero - doing so leads to something undefined. Squaring and taking the square root have a similar problem:
$$\begin{eqnarray} x & = & -2 & \implies \\
x^2 & = & 4 & \iff \\
x & = & \pm 2 \end{eqnarray}$$
Notice that here I used a forwards implication arrow $\implies$ rather than the bidirectional one $\iff$ in the first row because by squaring the equation I've applied a non-invertible operation, and that's why the second and third lines have an extra value in the solution set. A similar thing would happen if I applied the square root going from the second to the third equation and only took the positive root - I would discard one of the two solutions, leaving me with just one.
This can happen more subtly, too. If I take an equation and multiply it by $y - 3$, then I am expanding the solution set:
$$\begin{eqnarray} x + y & = & 5 & \implies \\
(x + y) \times (y - 3) & = & 5 \times (y - 3) & \iff \\
xy + y^2 - 3x - 3y & = & 5y - 15 & \iff \\
xy + y^2 - 3x - 8y & = & -15 \end{eqnarray}$$
The first equation admits any solution of the form $(x, y) = (t, 5 - t)$, for example $(x, y) = (1, 4)$. And those are definitely solutions of the last equation too. But notice that $(x, y) = (0, 3)$ is a solution of the last equation, but not of the first. Why? Because by multiplying by $y - 3$, we added $(x, y) = (s, 3)$ to the solution set. How did this happen? Because when $y = 3$, $y - 3 = 0$, and so we have implicitly multiplied by zero.
A lot of fallacious "1 = 2" proofs work by secretly removing a solution in a similar way - by dividing out a factor that's might be equal to zero, or by using squaring and square roots to swap something from negative to positive.
why extraneous
gives a over 100 results, at least some of which seem relevant. – Blue Apr 29 '22 at 00:23