Correct me if I'm wrong but I was just experimenting in Desmos and somehow got to the result that $y=x$ AND $y=-x$ can be summarized into $y=\dfrac{|xy|}{y}$.

I was wondering if this can be possible as well for $y=0$ and $x=0$?

Also can $y=x$, $y=-x$, $y=0$ and $x=0$ be summarized into one single equation?

enter image description here


  • 2
    $\begingroup$ if $x=y=-x$ then $x=0$; how about $|y|+|x|=0$? $\endgroup$ Apr 21 '20 at 4:15
  • $\begingroup$ Original two equations are $|x|=|y|$ or $x^2=y^2$. Second one is either @J.W.Tanner 's comment or $x^2+y^2=0$ $\endgroup$
    – Andrei
    Apr 21 '20 at 4:29
  • $\begingroup$ @J.W.Tanner: I don't think the OP is using AND the way most of us here do. Basically, he wants to express the union of two graphs, whereas you're finding the intersection. $\endgroup$ Apr 21 '20 at 5:05
  • $\begingroup$ @JonathanZsupportsMonicaC: that could be. I made my comment before I looked at the linked image $\endgroup$ Apr 21 '20 at 14:54
  • 1
    $\begingroup$ @J.W.Tanner: Thanks, I actually overhauled the entire answer so it's more straight forward. Felt a bit bad about completely re-writing it when there were already votes on it, but hopefully it's at least as good if not better. ;--} $\endgroup$ Apr 21 '20 at 17:57

First, we have to clear up a bit of confusion about the word "and". Seriously.

When mathematicians use the word "and" between two conditions they mean both should be true simultaneously. So when someone says $y=x$ AND $y=-x$, we can conclude that $x=-x$, so $x=0$, and the only point we get is $(0,0)$. This corresponds to taking the INTERSECTION of the two lines. From your picture it looks like what you want is the UNION of the two lines, which you should describe as "$y=x$ OR $y=-x$". Luckily we can find ways to single-equation-ize in either case.

Let's consider a set of equations

$$f_1(x,y) = g_1(x,y)$$ $$f_2(x,y) = g_2(x,y)$$ $$f_3(x,y) = g_3(x,y)$$

If we want to have the set of points where all of the equations are true at the same time (intersect the graphs) we can use the single equation

$$(f_1(x,y) - g_1(x,y))^2 +(f_2(x,y) - g_2(x,y))^2 +(f_3(x,y) - g_3(x,y))^2 = 0. $$

(This does assume that we are working with real numbers. The trick doesn't work in $\mathbb{C}$.)

If we want to have the set of points where any one of the equations is true (take the union of the graphs) we can use the single equation

$$(f_1(x,y) - g_1(x,y))\cdot (f_2(x,y) - g_2(x,y)) \cdot (f_3(x,y) - g_3(x,y)) = 0.$$

So for your specific questions:

$y=x$ union $y=-x$ $\Rightarrow$ $(y-x)(y+x) = 0$, or $y^2 = x^2$.

$y=0$ union $x=0$ $\Rightarrow$ $yx=0$

All four lines $\Rightarrow$ $(y+x)(y-x)yx = 0$, or $y^3x = x^3y$.

And to be super-picky, your equation $y=\dfrac{|xy|}{y}$ omits the point $(0,0)$, although Desmos doesn't seem to pick up on that.

[Note: The idea for the first equation is taken from Richard Feynman. Feynman then goes on to note that, as this is always possible and just formal manipulation, being able to be expressed in a single equation doesn't have much meaning for a physical theory. I think the same is true for a mathematical theory. Mathematicians tend to value simplicity or elegance, or maybe usability, over reducing the count of the number of equations. It's probably only useful if you're dealing with some computer-based system that puts a limit on the number of equations permitted.]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.