# How to make a transformation to the floor function to the right or left?

Assume a function called $$f(x)$$ , Then all of us know that of we draw $$f(x+a)$$ it will be a transformation to the left or right and $$f(x)+b$$ to up or down.

But when I drew floor function on Desmos online graphing I found something a little bit different.

https://imgur.com/bHUeSZ5

As you see that the black function is exactly on the purple one and that confusing me , Here $$f(x+a)=f(x)+a$$ , And we are just rising the function up .

To be more specific I need you to explain these question :

$$1.$$ Why when we add a number in the floor function notation $$f(x+a)$$ or $$[\frac {x}{2}+1]$$ it rise the function.

$$2.$$How can transform the function to the left just a unit.

## 1 Answer

The fact that $$\lfloor f(x) + 1 \rfloor = \lfloor f(x) \rfloor + 1$$ for any function $$f$$ should be fairly obvious, if you think about what the floor function does: round down to nearest integer. (You can replace "$$+1$$" here with "$$+n$$" for any integer $$n$$, but it doesn't work for non-integers.)

So for your particular example $$f(x) = \frac{x}{2}$$, you get $$\lfloor \frac{x}{2} + 1 \rfloor = \lfloor \frac{x}{2} \rfloor + 1$$, and the graph is moved one unit upwards.

But that's also equal to $$\lfloor \frac{x}{2} + 1 \rfloor = \lfloor \frac{x+2}{2} \rfloor = \lfloor f(x+2) \rfloor$$, so it's the same thing as moving the graph two units to the left.

If you want to move the graph one unit to the left, take $$\lfloor f(x+1) \rfloor = \lfloor \frac{x+1}{2} \rfloor = \lfloor \frac{x}{2} + \frac{1}{2} \rfloor$$ instead.

• When we say $[\frac {x}{2}+1]$ is this trassfomation to left or up ? – Mohammad Alshareef May 7 at 10:51
• @MohammadAlshareef: Both! As I wrote, it's the same thing (for this particular graph). – Hans Lundmark May 7 at 11:38