Proof of the equation for a rectangle in the Cartesian coordinate system with distances and absolute values Can anyone help me find an approach to deriving the equation
$$
\left\lvert \frac{x}{p}+\frac{y}{q} \right\rvert + \left\lvert \frac{x}{p}-\frac{y}{q} \right\rvert = c
$$
for a rectangle in the Cartesian coordinate system? Does the Triangle inequality or the absolute value as the distance of the points to the origin play a role here?
 A: Your approach to a question like this should always be to first graph it for yourself and play around with it. Play around with values and see what they do with the equation.
I am going to answer why $|x+y|+|x-y|=2$ gives you the unit square, and I implore you to use this explanation to figure out how the division by $p$ and $q$ give you any rectangle in general.
So let's define the set $S=\{(x,y)\in\mathbb{R}^2| |x+y|+|x-y|=2 \}$\
So we want to see why $S$ is the unit square. First of all, lets build some intuition. Why is it that if $x$ or $y$ are greater than 1 or less than negative 1 we get that $(x,y)\not\in S$. There are 4 cases to consider here, but I will only show 1.
Lets say $x>1$ now if $|y|\leq x$ we get that $|x+y|+|x-y| = 2x > 2$ since both $x+y$ and $x-y$ will be positive. On the other hand, if $|y|>x$ then there are 2 cases but since $|x+y|+|x-y|$ the two cases will be almost identical, so Ill just show the case where $y>0$. In this case we have
$$|x+y|+|x-y| = |x+y|+|y-x| = 2y > 2x > 2$$
And we are done. (Note if you are expanding upon this proof yourself, there is a lot of optimizations you can do to handle multiple cases at the same time, but don't feel like you need to if that gets confusing).
Now to finish showing that this is equal to the unit cube, we will need to do a few arguments that look like the following one, again I will only show one example.
We will show for all $y$ such that $-1\leq y \leq 1$ we have $(1,y)\in S$.
Assume $-1\leq y \leq 1$ Then we have that
(note the two inequalities seem obvious, but if this is a first year course, you should probably show them in one or two lines)
$0\leq 1-1 \leq 1-y$  and also $0\leq 1 + (-1) \leq 1 + y$
so $|1+y| + |1-y| = 1+y+1-y = 2$
Once you are done dealing with all of the cases, you will have shown that all points on the square are points in $S$ and all points not on the square are not in $S$ hence $S$ is the unit square. Or in yourcase, whichever rectangle you want it to be.
