# How do you write p(x) = |x-1| +4 as a piecewise function?

$p \left(x\right) = \left\{\begin{matrix}x + 3 & \null & x \ge 1 \\ 5 - x & \null & x < 1\end{matrix}\right.$
If $\left\mid x - 1 \right\mid \ge 0 \rightarrow x \ge 1$
then $\left\mid x - 1 \right\mid + 4 = \left(x - 1\right) + 4 = x + 3$
If $\left\mid x - 1 \right\mid < 0 \rightarrow x < 1$
then $\left\mid x - 1 \right\mid + 4 = \left(1 - x\right) + 4 = 5 - x$