# x-y = y-x?

#### EnitLee

According to a certain set of rules:
$$\displaystyle (x-y)^2= x^2-2xy+y^2$$

This means that $$\displaystyle (y-x)^2=x^2-2xy+y^2$$ too. In other words:
$$\displaystyle (x-y)^2=(y-x)^2$$

Square root of both, and you get some thing weird:
$$\displaystyle (+-)x-y=(+-)y-x$$

How is this possible? Or if it isn't, why isn't it possible?

#### skeeter

Math Team
squaring both yields the same expansion ...

$(x-y)(x-y)=x^2-2xy+y^2=y^2-2xy+x^2 = (y-x)(y-x)$

also, note $\sqrt{(x-y)^2}=|x-y|=|y-x|=\sqrt{(y-x)^2}$

idontknow

#### mathman

Forum Staff
$(-1)^2=1^2$, but $-1\ne 1$ this is basic when dealing with square roots.

#### skeeter

Math Team
$(-1)^2=1^2$, but $-1\ne 1$ this is basic when dealing with square roots.
quite so ...

$\sqrt{(-1)^2} = |-1| = |1| = \sqrt{1^2}$

#### skipjack

Forum Staff
The formal definition of a function includes the specification of its domain.

The function $\text{f}(x) = x^2$, where $x \geqslant 0$, is invertible, so $\text{f}(x) = \text{f}(y) \implies x = y$.

The function $\text{g}(x) = x^2$, where $x \in \mathbb{R}$, isn't invertible, so $\text{g}(x) = \text{g}(y)$ doesn't imply $x = y$.