When to know when it's possible to square an equation

I do understand that if:

$a=b \Rightarrow a^2 = b^2 $

But clearly, the graph representing these two equations won't be the same. So, (correct me if I'm wrong) this would suggest that if you square both sides of the equation, you essentially get a different set of answers (or graph). What confuses me is this question from my textbook:

Find and graph all $z$ such that $|z-3| = |z+2i|$.

The solution goes as such:

$z=a+bi$

$\sqrt{(a-3)^2+b^2}$ = $\sqrt{a^2+(b+2)^2}$

Squaring both sides then simplifying we end up with the equation:

$6a + 4b = 5$

It proceeds to graph the equation on the complex plane.

How can we claim that the graph of the equation $6a + 4b = 5$ represents the graph of $\sqrt{(a-3)^2+b^2}$ = $\sqrt{a^2+(b+2)^2}$ when squaring both sides of the equation was an intermediary step? Doesn't that create extraneous solutions which ends up being graphed? Doesn't this mean that our new graph represents more solutions then what the initial equation was intended for?

I hope that made sense...

It's quite frustrating looking back at some of these concepts you thought you understood and realizing that you didn't.

Anyways, thanks in advance!


If $a$ and $b$ are general real numbers then the implication $a=b \implies a^2 = b^2$ is not reversible (because, of course, $(-a)^2 = a^2$).

However, if $a,b \in [0,\infty)$ then that implication is indeed reversible: $a=b \iff a^2=b^2$. This is just a way of saying that the function $f : [0,+\infty) \to [0,+\infty)$ defined by $f(x)=x^2$ is one-to-one.

Notice that in the original equation that you are trying to solve, namely $|z-3|=|z+2i|$, both sides are indeed in $[0,\infty)$ because the absolute value of every complex number is a real number in $[0,\infty)$.


In general, $a=b$ is not equivalent to $a^2=b^2$; for instance $1^2=(-1)^2$, but $1\ne-1$.

However, if $a,b\geqslant0$, then, yes $a=b\iff a^2=b^2$. Clearly, as you wrote, $a=b\implies a^2=b^2$. And$$a^2=b^2\implies\sqrt{a^2}=\sqrt{b^2}\iff a=b,$$since $\sqrt{a^2}=a$ and $\sqrt{b^2}=b$.

Now, use the fact that $\sqrt{(a-3)^2+b^2},\sqrt{a^2+(b+2)^2}\geqslant0$.