# Drawing Graph of the Function y=f(x-a)+b

To draw graph of the function $y=f(x)+b$ we need to shift graph of the function $b$ units up if b>0, or $b$ units down if b<0 (see figure to the right).

To draw graph of the function $y=f(x-a)$ we need to shift graph of the function $a$ units right if a>0, or $a$ units left if a<0 (see figure to the left).

So, to draw graph of the function $y=f(x-a)+b$ we need to perform 3 steps:

1. Draw graph of the function $y=f(x)$;
2. Shift it $b$ units up if b>0 and $b$ units down if b<0;
3. Shift result of second step $a$ units right if a>0 and $a$ units left if a<0;

Note, that we can first perform step 3 and then step 2.

Example . Draw graph of the function $y=sqrt(x-2)+4$.

Here a=2 and b=4, so we draw graph of the function $y=sqrt(x)$ and then shift it 2 units to the right and 4 units up (see figure to the right).