# How do you graph 0<=x-y<=2?

Aug 10, 2017

See below

#### Explanation:

$0 \le \left(x - y\right) \le 2$

This represents two inequalities, namely:

$0 \le \left(x - y\right)$ (i)

and

$\left(x - y\right) \le 2$ (ii)

First let's consider (i):
$0 \le \left(x - y\right) \to - y + x \ge 0$

$- y \ge - x$

$y \le x$

This inequality is represented graphically by all points on the $x y -$plane on or under the line $y = x$.

Similarly for (ii):

$\left(x - y\right) \le 2 \to - y + x \le 2$

$- y \le - x + 2$

$y \ge x - 2$

This inequality is represented graphically by all points on the $x y -$plane on or above the line $y = x - 2$.

Combining these two results produces the graph below.

graph{(x-y)(x-y-2)<=0 [-11.25, 11.25, -5.63, 5.62]}