103
$\begingroup$

Why can't you square both sides of an equation?

I've been asked this many times and can never quite give a good, clear, concise answer (for beginning algebra students) in plain language. I just searched the web and still couldn't find a simple-to-understand answer for why squaring both sides gives you extraneous solutions.

$\endgroup$
8
  • 63
    $\begingroup$ squares of two numbers being equal isn't equivalent to the numbers being equal, there's only a one-sided implication, ie $$x = y \Rightarrow x^2 = y^2$$ but not $$x = y \iff x^2 = y^2$$ $\endgroup$
    – mm-aops
    Commented Nov 16, 2013 at 1:13
  • 13
    $\begingroup$ Things are even worse with complex numbers. $\endgroup$
    – dfeuer
    Commented Nov 16, 2013 at 2:30
  • 54
    $\begingroup$ @dfeuer: That's a funny way of spelling "more interesting" :) $\endgroup$
    – Shaun
    Commented Nov 16, 2013 at 12:11
  • 17
    $\begingroup$ A much better question is "why don't I get extraneous solutions when I add 5 to both sides of an equation?" In the grand scheme of things, "reversible" steps that don't introduce extraneous solutions are rare and unusual -- it's easy to get the wrong idea from elementary school algebra. $\endgroup$
    – user14972
    Commented Nov 16, 2013 at 14:20
  • 4
    $\begingroup$ @mm-aops According to the majority of math teachers, if $x^2 = y^2$, we can assume $x = y$. Clearly, if $x = -y$, that's not true though. But to them, $\sqrt{x^2}$ and $x^{\frac{2}{2}}$ are the same, when in fact, they're $|x|$ and $x$ respectively. $\endgroup$
    – Cole Tobin
    Commented May 22, 2014 at 23:51

14 Answers 14

99
$\begingroup$

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$.

$\endgroup$
8
  • 8
    $\begingroup$ To add to this: If you make the square root a "normal" function, with only one value, you can take the square root of both sides. But then it is not the case that $\sqrt{x^2} = x$, and it won't "undo" the square. For example, when $x = -1$. Despite this apparent problem, most people use $\sqrt{~}$ as a single-valued function. $\endgroup$ Commented Nov 16, 2013 at 3:39
  • 5
    $\begingroup$ Good answer! A slightly higher-level way to phrase the issue is that the usual square root is not a "function" at all. "Doing the same thing" to both sides only preserves equality if "doing the same thing" means "apply a function." The square root (allowing both positive and negative roots) is a multivalued map, so it need not preserve the relation of equality. $\endgroup$ Commented Nov 16, 2013 at 6:32
  • 1
    $\begingroup$ Right. Strictly speaking, it's not a function at all because it doesn't pass the 'vertical line test' (i.e., the square root maps an element in its domain to more than one in its codomain). (more here) $\endgroup$
    – jmromer
    Commented Nov 16, 2013 at 6:38
  • $\begingroup$ I see what you are getting at, but I don't think that this answer addresses the issue. Equality is preserved when one squares both sides. It is also preserved when one takes the square root of both sides (following the convention you mention). But of these two operations, only squaring produces extraneous solutions. If I square both sides of the equation $\sqrt{x^2+x+1}=x,$ I get the extraneous solution $x=-1.$ At no point did I take the square root of both sides of anything. $\endgroup$ Commented Nov 16, 2013 at 12:29
  • $\begingroup$ Dear @Will: I took your criticism into account and edited the answer in consequence. My previous answer was written before the OP modified their question. Thank you, $\endgroup$ Commented Nov 16, 2013 at 13:46
56
$\begingroup$

I've had to teach this to beginning algebra students (in the context of adult ed), so I thought I would put my two cents in.

When you square an equation, the result doesn't remember what the signs of the numbers were beforehand. A squared equation is really two equations put into one: the original equation you wanted to solve and a "buddy" equation that has an extra negative sign. The extraneous solutions are solutions of the corresponding buddy equation.

At this point, I generally provide a specific example by writing down an equation and its buddy (which has an extra negative sign) one above the other, and then draw arrows going from both to the common squared equation.

Sometimes, I either lead or wrap up the discussion by talking about different arithmetic operations they have learned, and point out that if you know a number was obtained by performing addition, multiplication, division, etc., you can always tell me the original number by reversing the process. However, when we square a number, we have no way of knowing the original sign by looking at the result. Often, it is helpful to draw diagrams showing the flow of the arithmetic and make them reverse some arithmetic.

For instance, you could say that we got 15 when we multiplied a number by 2 and added 1. Then (not emphasizing symbolic algebra but just the arithmetic) the student should be able to reverse the process by subtracting 1 (which gives 14) and dividing by 2 (which gives 7), obtaining the original number.

If your course is anything like mine, their first instinct may be to convert the above inversion process into an equation ("rewrite the sentence as an algebraic equation and solve for the unknown"). I think it is very important to not let them do this; more likely than not, they'll get caught up in trying to "solve for x" and probably forget why we are doing this in the first place. The point of the exercise is to teach them the ideas of invertible and non-invertible operations, not to see if they can shuffle letters around on a page.

This should be wrapped up by giving a similar problem but now involving a non-invertible operation. For instance, 25 was obtained by squaring a number. What was the number? They should be able to recognize that this question is flawed because there are two numbers which square to 25.

$\endgroup$
3
  • $\begingroup$ Excellent answer! $\endgroup$ Commented Nov 16, 2013 at 11:58
  • 7
    $\begingroup$ I think this best answers the updated question. Taking this approach, I would also show operations like $0 \cdot f(x)$ that were given in a different answer to drive home the idea that it is not just squares that are not reversible; hopefully the students will remember the more general principle rather than the specific instance. $\endgroup$ Commented Nov 16, 2013 at 15:00
  • $\begingroup$ Good answer. Maybe you will also have to tell them about well defined functions. And that f(x) = x^(1/2) is not a well defined function. $\endgroup$
    – GilbertS
    Commented Nov 4, 2020 at 14:56
45
$\begingroup$

You can.

However, you must be careful that you could have introduced extraneous solutions. Hence, you have to check that your solutions of the squared equation do actually satisfy the original equation.

Case in point: Solve $x -1 = 1$.

If we square both sides, we get $x^2 - 2x + 1 = 1^2$, or that $0 = x^2 - 2x = x(x-2)$. This has solutions $x=0, 2$. We then have to check back if they satisfy the original equation.

$\endgroup$
1
  • 7
    $\begingroup$ That's a really neat counter-example. $\endgroup$
    – Newb
    Commented Mar 19, 2015 at 7:44
31
$\begingroup$

Essentially the problem comes from the fact the squaring function is not an injective function (also known as one-to-one). A common way to observe whether a function is injective (especially in an elementary algebra class) is to look at the the graph of the function and use the horizontal line test (which is only useful in certain contexts).

One thing that might add clarity is to notice the "problems" that occur with squaring (adding extra solutions) is not unique to squaring, so it is not special, it just points to some larger principle. For example "cos" both sides, or multiplying both sides by zero both lead to the same problem, in fact unlike squaring both of the examples given can add infinitely many solutions, not just one. $x=1$ has one solutions, but $0 \cdot x = 0 \cdot 1$ has every number as a solution.

$\endgroup$
2
  • $\begingroup$ +1 for pointing out that it's because squaring isn't injective, suggesting a way to determine whether other operations will produce extraneous solutions. $\endgroup$
    – Kevin
    Commented Nov 17, 2013 at 19:55
  • $\begingroup$ Wow, this opened my eyes. $\endgroup$
    – cdosborn
    Commented Oct 22, 2022 at 19:59
23
$\begingroup$

You start with $$a=b$$ When you square both sides, you get $$a^2 = b^2 \Leftrightarrow a^2 - b^2 = 0 \Leftrightarrow (a-b)(a+b) = 0 \Leftrightarrow a = b \; \text{ or } \; a = -b$$ The $a = -b$ part is where the extraneous solutions come from.

$\endgroup$
1
  • $\begingroup$ This is really neat, thanks a lot! $\endgroup$ Commented Jan 19, 2018 at 22:01
16
$\begingroup$

There's nothing wrong with squaring both sides of an equation, as long as you check that the solutions work. You're only going to gain extra solutions, you definitely won't lose any.

$\endgroup$
10
$\begingroup$

When you "solve" an equation, all you are doing is finding an expression that is equivalent to the original equation. By "equivalent", I mean that one is true if and only if the other is true. For example. $x - 5 = 2$ and $x = 7$ are equivalent, but $x - 5 = 2$ and $x > 0$ are not.

For any expressions $a$ and $b$, and function $f$, we know that $a = b \implies f(a) = f(b)$, because functions have one output for each input. But this might not go the other way. Some examples where $f(a) = f(b)$ does not imply $a = b$:

  • $f(x) = \sin{x}, \ \sin{0} = \sin{2 \pi}$
  • $f(x) = 0x, \ 0 \cdot 5 = 0 \cdot 11$
  • $f(x) = x^2, \ 1^2 = (-1)^2$

So if we apply these functions to both sides of an equation, we don't get something equivalent to the original, and extraneous solutions show up.

When do we get something equivalent? Our functions have to be injective, so that there exists a right-inverse. Then we have: $$ f(a) = f(b) \implies f^{-1}(f(a)) = f^{-1}(f(b)) \implies a = b$$ so we have both directions of implication, and therefore equivalent statements. That's why we don't have to worry about making extra solutions when we add, subtract, multiply (except by zero), or divide, because these functions are injective.

In particular, squaring isn't injective. So you can go from $a = b$ to $a^2 = b^2$, but you can't go backwards, so it's not equivalent.

$\endgroup$
1
  • $\begingroup$ You don't have to invoke $f^{-1}$: The definition of "injective" is $f(a)=f(b)\implies a=b$, no intermediate step required. $\endgroup$
    – celtschk
    Commented Oct 24, 2015 at 14:02
8
$\begingroup$

Start with a false proposition

e.g.: $-2 = +2$

square both sides

$(-2)^2 = (+2)^2$

and it becomes true (!?)

$+4 = +4$

So the operation turns (some) false statements into true statements.

$\endgroup$
1
  • 4
    $\begingroup$ But clearly, we just proved $-2 = 2$ using Maths, so it must be true! ;) $\endgroup$
    – Cole Tobin
    Commented May 22, 2014 at 23:54
8
$\begingroup$

The short answer is that when you square something, you lose the sign that it started with.

The long answer (is actually the same as the short answer). This is almost word-for-word the explanation that I now use in class (if a student asks -- otherwise I just tell them to follow the directions):

Suppose you wanted to solve the equation $x=-2$. Nevermind for now that it is its own solution (that is, $x$ equals $-2$ is the solution).

Start by squaring both sides to get $x^2=4$.

Bu now you know how to solve this. We take the square root of both sides (don't forget the plus-or-minus symbol) $$\sqrt{x^2} = \pm \sqrt{4} \\ x = -2 \text{ or } 2$$ We get two answers, one of which is clearly wrong (it is called extraneous). When we squared, we lost the sign information.

My Original Answer (this example is not as clear to students): Suppose you wanted to solve (call this Example 1 -- and never mind that it is its own solution) $$\sqrt x = -3.$$

You start by squaring both sides. You get $$x = 9.$$

Now, that $9$ on the right side might have come from $3^2$, or it might have come from $(-3)^2$. The equation no longer indicates what it came from. Note that $x=9$ does not solve the original equation (that is, $\sqrt 9 = 3 \ne -3$).

Now say you were want to solve the equation (Example 2) $$\sqrt x = 3.$$

Once again, you start by squaring both sides, and you get $$x = 9.$$

Notice that the step after squaring is the same for both examples. That's because the $9$ on the right hand side could have come from squaring a $3$ or from squaring a $-3$.

So, when you square both sides of an equation, you can get extraneous answers because you are losing the negative sign. That is, you don't know which one of the two square roots of the right hand side was there before you squared it.

$\endgroup$
5
  • 3
    $\begingroup$ The issue here is distinct from the one in the question, here the square root symbol (which is a function that denotes the positive square root) is being misused in the problem. Squaring both sides of a consistent equation will only make you gain solutions, not lose them. $\endgroup$ Commented Nov 16, 2013 at 9:59
  • 1
    $\begingroup$ @Manishearth: He did gain a solution: He started from an equation with zero solutions ($\sqrt{x}=-3$) and arrived at an equation with one solution ($x=9$). Which solution do you think he lost? $\endgroup$
    – celtschk
    Commented Oct 24, 2015 at 15:04
  • $\begingroup$ @celtschk How does that contradict what I said? $\endgroup$ Commented Oct 24, 2015 at 17:06
  • 1
    $\begingroup$ @Manishearth: To cite your comment: "Squaring both sides of a consistent equation will only make you gain solutions, not lose them." This implies that he (a) doesn't gain solutions (he does), and (b) he loses solutions (he doesn't). $\endgroup$
    – celtschk
    Commented Oct 24, 2015 at 17:11
  • $\begingroup$ @celtschk Ah, I see. Right. $\endgroup$ Commented Oct 24, 2015 at 19:02
5
$\begingroup$

Others have addressed why new solutions are introduced so I won't repeat that. But I do want to constructively comment on a more fundamental source for this issue.

$$x + y = c \tag{Step 1}$$ $$(x + y)^2 = c^2 \tag{Step 2}$$

This isn't necessarily a problem, as long as the student understands that you can't assume $\text{Step 1} \iff \text{Step 2}$. It should be $\text{Step 1} \rightarrow \text{Step 2}$.

$\text{Step 1} \leftarrow \text{Step 2}$ can lose solutions to a problem.

$\text{Step 1} \iff \text{Step 2}$ keeps the same solutions to a problem.

$\text{Step 1} \rightarrow \text{Step 2}$ can introduce new values which are not solutions to the original problem.


By the way, I strongly discourage the terminology "can do to an equation". It reeks of students just trying to figure out what they have to do to make the teacher happy. A teacher especially should be very careful to avoid that phrase and use more appropriate phrases:

"Presents an equation that is exactly as true as the last one." ($\iff$ case)

"Has the same solutions." ($\iff$ case)

"Has the same solutions, maybe with some extra." ($\rightarrow$ case)

"Implies that the next equation must be true." ($\rightarrow$ case)

"Is true if the next equation is true." ($\leftarrow$ case)

"Is also true (if the first equation was)." ($\rightarrow$ case)

"Makes an equivalent equation." ($\iff$ case)

"Makes a logically equivalent equation." ($\iff$ case)

If I was instructing students in algebra, I'd require them to write arrows between their steps from early on.

$\endgroup$
5
$\begingroup$

The fundamental problem is that when novice students (and even some non-novices ones) manipulate equations, they get the false impression that anything implied by their original expression will also imply their original expression.

To take an intentionally absurd example (absurd because we actually have the solution written down to start with), they reason like this:

$$x = 1$$

"square both sides"

$$x^2 = 1^2 = 1$$

The solutions of this are $1$ and $-1$ (true) and therefore (invalid deduction) the solutions of the original equation are $1$ and $-1$ (false conclusion).

If they were more careful they would write:

$x = 1 \implies x^2 = 1 \implies (x = 1) \vee (x = -1)$

So we know that nothing other than $1$ and $-1$ can be solutions, but we still don't know which (if any) is really a solution.

It's entirely analogous to reasoning:

$$x < 1$$

therefore since $1 < 3$ and $<$ is transitive:

$$x < 3$$

Now, $2 < 3$ therefore (invalid deduction) $2$ is a solution to the original inequality (false conclusion). And this is indeed a mistake people sometimes make when solving inequalities.

Or consider:

$$x^2 = -1$$

therefore

$$x^4 = 1$$

Now, in the integers or real numbers this also implies $x = 1 \vee x = -1$. But actually there are no solutions for $x^2 = -1$ in the real numbers. We can (in standard logic) actually deduce anything we like from $x \in \mathbb{R} \wedge x^2 = -1$, because it's false. One-way implications do not necessarily lead to solutions.

The problem stems from being taught various mechanisms for manipulating (in)equalities, but losing track of what these manipulations actually mean in terms of correct deductions about the values involved. If the operation applied to both sides is an injection then of course it's reversible and so we have two-way implication, and in that case the deduction would be valid.

In short: you can square both sides, of course. This tells you a true fact about $x$, but not everything true of $x$ in the squared equation is necessarily true of $x$ in the original. In this case $x = 1 \Rightarrow x \in \{1, -1\}$ but $x \in \{1, -1\} \not \Rightarrow x = 1$

$\endgroup$
4
$\begingroup$

Actually you can, but you cannot assume that if $x^2 = y^2$ then $x=y$

Thus we lose the definitive sign after squaring both sides, we might get more result answers for $x$,$y$ that satisfies $x^2 = y^2$ then $x = y$

$\endgroup$
2
$\begingroup$

If you say $x=-2 \implies x^2=4 \implies x=2 \text{ or } x=-2$ you have not made an error as it is true in general that $P \implies P \lor Q$.

The error would be says that $2$ was a solution to $x=-2$, which would require you to reverse the implications. In particular $x=-2 \not \Leftarrow x^2=4$.

This is why you need to check your solutions in the original expression.

$\endgroup$
2
$\begingroup$

The simples answer based on an e.g is probably this.

what is $2 * 2$ its $2^2$ its $4$

what is $-2 * -2$ its $(-2)^2$ its also $4$

so you see why you just can't square $4$ without taking in advise that it may be $2$ or $-2$

so if you take care of $± $ you can say: $x = ±y \Leftrightarrow x^2 \Leftrightarrow y^2$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .