## College Algebra (10th Edition)

$f(x)=\left\{\begin{array}{ll} -x & x\ \leq 0\\ -x+2 & 0\lt x\leq 2 \end{array}\right.$ (Other answers are also possible.)
We see that both pieces of the graph correspond to lines with slope $-\frac{1}{1}=-1$. The left line has a $y$ intercept of $0$, while the right line has a $y$ intercept of $2$. Thus the equation is: $f(x)=\left\{\begin{array}{ll} -x & x\ \leq 0\\ -x+2 & 0\lt x\leq 2 \end{array}\right.$