I am in high school algebra, solving typical equations such as rational, irrational, quadratic, etc., and I have come across the idea of extraneous solutions. My textbook does not touch upon the idea of extraneous solutions and how they relate to reversible and irreversible operations, and I can't find much online. Could I get an explanation of what exactly reversible and irreversible operations mean? I know that squaring is one, and multiplying both sides of an equation by $0$ is another, but why is multiplying both sides by $x$ (assuming $x$ is the variable in the equation) an irreversible operation? Is it also irreversible if I start with $2x^2 = x$, and divide by $x$ to get $2x = 1$, in which case $0$ is no longer a solution? Why is it irreversible if I have $\displaystyle \frac{x(2x + 1)}{x} = 0$ and cancel out $x$ to get $2x + 1 = 0$? Finally, why is it irreversible if I have $2x + 1 = 0$ and multiply both sides to get $\displaystyle \frac{x(2x + 1)}{x} = 0$? These are the four cases I am most interested in. I want to understand them specifically, because I don't want my maths to be ambiguous.
[Math] Cases of reversible and irreversible operations in algebra
algebra-precalculus
Related Solutions
It looks like in your head you are mixing up the "order of operations" with the process of solving equations. These two things are completely different, but it is understandable why they might look similar to someone in a modern day primary-secondary school curriculum.
The order of operations is just a set of conventions so that we can read mathemaical expressions unabiguously. Strictly speaking, if I wrote $3+2\times 4$ without an order of operations, it could either mean $3+(2\times 4)=11$ or $(3+2)\times 4=20$. To eliminate this ambiguity, we said "OK, everybody uses the first one (multiplication before addition.)
Now, solving equations by doing "equal things to equal sides" is a process you are probably learning in algebra. The key idea of solving equations using that method is that you are applying a function to both sides of an equality. That employs the order of operations, but it certainly is a completely different process.
If a function has two inputs, and it sees that they are equal, then the two associated outputs of the function will also be equal. (That's what it means to be a function!) Lots of operations you have learned are functions. The function $f(n)=n+3$, if applied to $y-3=x$ would say "ah, these two things are equal, and so I say that $y-3+3=x+3$ as well!" After combining like terms, we have the new thing, $y=x+3$.
Similarly, subtracting a number is a funtion. Similarly multiplying by a fixed number is a function. The same can be said for division because dividing by a number is just multiplying by the inverse of that number.
The same goes for squaring both sides: $f(n)=n^2$. Because this is a function, you can apply it to both sides of $\sqrt{x}=2$, and the result will still have equality: $(\sqrt{x})^2=2^2$. After simplification, $x=4$. In a moment I will say that this one is not like the other four because undoing a power is not always a function!
You asked "can always find the opposite of something and do it on both sides of an equation to remove it?" Certainly this was true for addition, subtraction, multiplication and division. If you know about logarithms and exponentials, then you can also say it is true for them. The thing that ties all these things together is that they are pairs of inverse operations which can undo each other.
There are times, however, when the thing you want to do does not have an inverse (and so you may have to be careful when you are solving it.) I demonstrated above that it is true when raising sides to the $n$th power. Now the inverse would be taking the $n$'th root, but reversing even roots (for example square roots) is not as easy! As a simple example, consider $(-2)^2=2^2$. One would like to just knock off the two powers, but of course $-2\neq 2$.
Another example would be the sine function: $\sin(0)=\sin(\pi)$. Just knocking off sine from both sides would definitely not get you a sensical answer. Solving in situations where the operation does not have a well-defined inverse is not impossible, but I hope I've expressed that it is just not as simple as it is with the four basic arithmetic operations.
If two things are equal, then so long as you do the same thing to both, they will remain equal. There is nothing wrong with taking the square of both sides of an equation. However, you have to be careful if you want to take the square root of both sides, because the square root is not a normal function: it has two values $\pm \sqrt x$. By convention, the positive square root is chosen, and that is what people mean when they say "the square root". But equations don't care about our conventions. The fact that $(-1)^2 = 1^2$ certainly doesn't imply that $-1 = 1$.
In other words, if $x^2 = y^2$, then taking the square root (using the stated convention) of both sides results in $|x| = |y|$, not in $x=y$.
For these reasons, if you have an equation containing an unknown, then squaring both sides of it can introduce new solutions, so you have to be careful. For instance, the equation $x=1$ obviously has only one solution (namely $x=1$!) but squaring both sides of it yields the equation $x^2=1$ which has the two solutions $x=\pm 1$.
Best Answer
If you are given Equation B and the operation that resulted in Equation B (pretend this is all you know) and you can determine the exact equation in the previous line (call it Equation A), then this is a reversible step. For example, if I told you that I added 3 to both sides of Equation A to get x=5 (x=5 would be Equation B in my explanation), then you could reverse this operation by subtracting 3 from both sides to find that Equation A is x-3=2.
If you can't be sure what the line before is, then this is an irreversible step. For example, if I told you that I squared both sides of Equation A to get x^2=4, there's no way of knowing exactly what Equation A is. It could be either x=-2 or x=2. Or if I told you that I multiplied both sides of an equation by zero to get 0=0, then you have no idea what the previous line is because it could be anything. These steps are irreversible.