# "Transformation of Greatest Integer Function" - help me grok?

**URL:** <https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751>\
**Category:** Factual Questions\
**Created:** [September 15, 2008, 10:22pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751 "2008-09-15T22:22:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhyNot](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WhyNot](https://boards.straightdope.com/u/WhyNot)\
**Post date:** [September 15, 2008, 10:22pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/1 "2008-09-15T22:22:29Z")

</div>

This isn’t \*exactly \*a homework question: I’ve gotten the mechanics of this down so that I got 100% on my homework and quiz, but I don’t understand why I’m doing what I’m doing to get the correct answer. I’ve asked my teacher (who got the wrong answers every time), and I’ve used nearly every resource the Pearson MyMathLab provides - the text, the video lesson for the chapter and the “Help Me Solve This” function in the homework. The last gave me the mechanics, but not any explanation. I haven’t used the “Ask A Tutor” function because I can’t do this in real time - I’m watching toddlers and might have to leave the computer.

Ok, that’s all said so I’m not accused of violating the “No homework” rule. Homework done. Comprehension not.

This is what I’ve sussed out by trial and error and instructions from MyMathLab:  
if the x term is multiplied by a number with an absolute value \> 1, the lines shrink horizontally

if the x term is multiplied by a number with an absolute value \< 1, the lines stretch horizontally

If a number is added or subtracted from the x term, the whole shebang moves horizontally that many units - left if added, right if subtracted (which feels all sorts of counter intuitive).

If a number is added or subtracted from the whole function, the whole shebang moves vertically that many units - down if added, up if subtracted (which, again, feels counter intuitive).

> [@](#):
>
> Graph the greatest integer (step) function defined by the expression:  
> f(x)=[[2x-2]]

So I’ve determined that the lines of the greatest integer function shrink by half and move 2 units to the right. That gets me credit. What I don’t understand is WHY? What does this _mean_?

> [@](#):
>
> Graph the greatest integer (step) function defined by the expression:  
> f(x)=[[x+1]]

Lines stay the same width, move 1 unit left.

> [@](#):
>
> Graph the greatest integer (step) function defined by the expression:  
> f(x)=[[.5x+3]]

Lines stretch to twice their length and move 3 steps left.

And, this hasn’t come up on the homework yet, but I think:

> [@](#):
>
> Graph the greatest integer (step) function defined by the expression:  
> f(x)=[+2]

Lines stay the same length, move 2 units down?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [September 15, 2008, 10:30pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/2 "2008-09-15T22:30:58Z")

</div>

For any function f(x), we can define a new function g by g(x) = f(k_x). The effect of this is that the output (i.e., height) of g at input (i.e., horizontal distance from the origin) 1 is the same as the output of f at input k, the output of g at input 2 is the same as the output of f at input 2_k, g(3) = f(3\*k), etc. Thus, g ends up being f shrunk horizontally by a factor of k [f’s value at k became g’s value at 1]. Thus, if k \> 1, g is f squeezed horizontally; if k \< 1, g is f stretched horizontally.

Similarly, for any function f(x), we can define a new function h by h(x) = f(x + c). The effect of this is that the output (i.e., height) of g at input (i.e., horizontal distance from the origin) 0 is the same as the output of f at input c, the output of g at input 1 is the same as the output of f at input 1 + c, g(2) = f(2+c), etc. Thus, g ends up being f moved to the left by the amount c [f’s value at c become g’s value at 0]. Thus, if c \> 0, g is f moved to the left; if c \< 0, g is f moved to the left by a negative amount, means g is f moved to the right.

Does that help?

---

<div class="post-metadata">

**Author:** ![WhyNot](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WhyNot](https://boards.straightdope.com/u/WhyNot)\
**Post date:** [September 15, 2008, 10:34pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/3 "2008-09-15T22:34:10Z")

</div>

Oh, and I should probably mention this is for the third week of MTH140 - College Algebra. This is also my first math class in 15+ years, so small words are appreciated! (And anything about tangents and cosines will go right over my head!)

**Indistinguishable** , your post made a lovely wooshing sound as it went by. ☹

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [September 15, 2008, 10:37pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/4 "2008-09-15T22:37:18Z")

</div>

Hm, well I’ll try to reformulate it later. But the main point is that none of this is special to the greatest integer function; the observations you’ve made about how graphs move around and stretch when terms are added to or multiplied by the input are general enough to apply to any functions, whatsoever. Perhaps thinking about it in that level of generality, instead of just focusing on this particular function, will help.

---

<div class="post-metadata">

**Author:** ![pmwgreen](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@pmwgreen](https://boards.straightdope.com/u/pmwgreen)\
**Post date:** [September 15, 2008, 11:23pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/5 "2008-09-15T23:23:53Z")

</div>

Just to pick your third example at random, have you tried graphing f(x)=.5x+3 (a plain old line function) on the same piece of paper? Maybe that will help.

---

<div class="post-metadata">

**Author:** ![WhyNot](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WhyNot](https://boards.straightdope.com/u/WhyNot)\
**Post date:** [September 15, 2008, 11:32pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/6 "2008-09-15T23:32:55Z")

</div>

> [@](#):
>
> Perhaps thinking about it in that level of generality, instead of just focusing on this particular function, will help.

Okay, let me try that out… (I’m going to “think out loud” so you can tell me where I went wrong)

f(x) = x  
(-1,-1) (0,0) (1,1) and so on. I get a nice line making a 45 degree angle with respect to the x axis and through the (0,0)

g(x) = x+1  
(-1, 0)(0,1) (1,2)

Oh, hey, you’re right! It moved to the left one unit! 😃

h(x) = x-3  
(-1,-4) (0, -3) (3,0)  
Lookee there! Moved three to the right! Sweet!

f(x) = 2x  
Now that changes the angle - I can’t see the “shrinks horizontally” bit there. Maybe because my line is infinite. Or, wait…is it because it hits the y=1 at x=.5? So the amount of the line within the (0,0) to (0,1) to (1,1) to ((1,0) to (0,0) square is shorter? The distance from (0,0) to (1,1) on the f(x line) = √ 2 and the distance from (0,1) to (.5,1) on the g(x) line = √ 1.25? Am I making any sense here whatsoever?

How 'bout:  
f(x) = x+2  
g(x) = (x+2)-3  
You could describe that as moving down 3 or moving right 3; according to the rules, it should move up three, no? ☹

Got the add/subtract something to the x,  
maybe got the multiply x by something,  
but not the add/subtract a term from the whole funtion.

---

<div class="post-metadata">

**Author:** ![Aspidistra](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aspidistra/32/3894_2.png) [@Aspidistra](https://boards.straightdope.com/u/Aspidistra)\
**Post date:** [September 15, 2008, 11:42pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/7 "2008-09-15T23:42:03Z")

</div>

I assume when you say the lines of the function f(x)=[[2x-2]] “shrink by half and move 2 units to the right.” you mean “compared to f(x)=” - right?

Forget the whole “greatest integer function” thing for the moment - just look at them as ordinary functions. That is, instead of

f(x)=[[2x-2]]

look at this one:

y=2x-2

(By the way - for your purposes, stuff the whole “f(x)” thing. Cross 'em all out and replace them with a big fat “Y”. Looks much prettier - makes absolutely no difference 🙂  
Rule yourself a nice big 10x10 square grid and draw your axes along the middle lines - horizontal “x” axis, vertical “y” axis.

Now plot the points of a simple “y=x” graph - where x=1 y=1, where x=2 y=2 etc. Join 'em all up with a line.

Now do “y=2x”. In this instance you get where x=1 y=2, where x=2 y=4, where x=3 y=6.

Join those ones up with a line. You have now “shrunk” your graph horizontally, just like in the exrecise, right? By multiplying by a number \>1.

Now do “y=2x-2”. This time you get where x=1 y=0, where x=2 y=2, where x=3 y=4. You have just moved your graph “to the right” (though actually, it’s more that you’ve moved it _down_ - looks the same as “to the right” because all your graphs are going bottom left to top right)  
My apologies if that’s too basic and not quite what you were after - that’s the absolute simplest I can explain a graph!

[ETA - or in other words, yeah, what you said. You’re definately on the right track]

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [September 15, 2008, 11:43pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/8 "2008-09-15T23:43:29Z")

</div>

> [@WhyNot](#):
>
> f(x) = 2x  
> Now that changes the angle - I can’t see the “shrinks horizontally” bit there. Maybe because my line is infinite. Or, wait…is it because it hits the y=1 at x=.5? So the amount of the line within the (0,0) to (0,1) to (1,1) to ((1,0) to (0,0) square is shorter? The distance from (0,0) to (1,1) on the f(x line) = √ 2 and the distance from (0,1) to (.5,1) on the g(x) line = √ 1.25? Am I making any sense here whatsoever?

Sure, though it’s not total distance you want to look at, but just horizontal distance, since we’re just looking at horizontal shrinkage (thus, in the second example, the distance goes from 1 to 0.5). Note that, with these infinite lines, changing the angle is the same thing as shrinking/stretching horizontally, which is the same thing as shrinking/stretching vertically, which may actually be confusing things more than helping (perhaps examples like f(x) = x^2 or even f(x) = arctan(x) are easier to “look at”). If it helps, do it in reverse from the way you just have. Think “What _would_ I get if I took f(x) = x and shrunk it horizontally by a factor of 2? What would that look like?”

> [@](#):
>
> How 'bout:  
> f(x) = x+2  
> g(x) = (x+2)-3  
> You could describe that as moving down 3 or moving right 3; according to the rules, it should move up three, no? ☹

No, because the “things move oppositely from how I’d expect” rule you’re thinking of was for horizontal movement, not vertical movement. Adding on to the input before anything else = horizontal change (in the “opposite” way, for the reasons I outlined above). Adding on to the final output after everything else = vertical change (in the “same” way, for fairly direct reasons). In this case, you can view it as (x - 3) + 2, which is adding -3 to the input to f before everything else, and thus moving 3 to the right, or as (x + 2) - 3, which is adding -3 to the output of f after everything else, and thus moving 3 down.

> [@](#):
>
> Got the add/subtract something to the x,  
> maybe got the multiply x by something,  
> but not the add/subtract a term from the whole funtion.

Add/subtract from the whole function is up/down, and, of course, adding 4 to the whole function will move the whole function up by 4, and so on. No “inversion” here.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [September 15, 2008, 11:48pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/9 "2008-09-15T23:48:49Z")

</div>

I don’t find it particularly helpful to think of functions in terms of the shapes they make when you graph them. Rather, I think of the function f as a machine, if you will, that takes its input, does something to it, and gives that back as output. There’s a nice graphical interpretation of this, too:

x -----\>[f]-----\> f(x)

Say that you have the function f(x) = 2x. You can represent that like this:

x -----\>[f]-----\> 2x

It maybe seems a little silly here, but consider something more complicated like f(x) = 2x + 3. You can write that directly as above, or you can define g(x) = 2x and h(x) = x + 3. Then you can represent f(x) by chaining together g and h:

x -----\>[g]-----\>[h]-----\> 2x + 3

What this means is that you take your input x, run it through g, and then take the output from that and feed it into h. So g(3) = 6, and h(6) = 9, just like f(3) = 9.

The advantage to thinking this way is that every function, no matter how complicated, can be represented using a similar diagram. Consider f(x) = [x + 1]. Define g(x) = x + 1, and h(x) = . Then you have a diagram like this:

x -----\>[g]-----\>[h]-----\> [x + 1]

Why don’t you try drawing the diagram for [+ 2]? You can do it with two or three simple functions.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [September 15, 2008, 11:55pm UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/10 "2008-09-15T23:55:18Z")

</div>

I agree that that’s a much more useful way to think about functions generally (after all, most functions are between things other than (real) numbers, for which no natural notion of graphing them as a shape is available, even if this aspect is often suppressed in the math courses which first explicitly introduce the concept of functions). But, isn’t the OP’s question specifically about how graphs transform under certain changes to the functions being graphed?

Also, I suspect that where the OP typed “[+ 2]”, they meant “[] + 2”, with double brackets being the “greatest integer below” function.

---

<div class="post-metadata">

**Author:** ![WhyNot](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WhyNot](https://boards.straightdope.com/u/WhyNot)\
**Post date:** [September 16, 2008, 1:18am UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/11 "2008-09-16T01:18:53Z")

</div>

> [@Indistinguishable](#):
>
> Add/subtract from the whole function is up/down, and, of course, adding 4 to the whole function will move the whole function up by 4, and so on. No “inversion” here.

Ah…right you are!

Okay, so to bring it back to the Greatest Integer Function - “transforming” it is just moving around the Greatest Integer Function - that little piece wise step function - instead of a y=mx+b linear function.

**Aspidistra** , you’re right about the f(x) –\> y thing. I’m trying to write like the big kids. 😃 But using “y” is so much easier!

**ultrafilter** , my teacher was trying to explain it by having me work out a bunch of values and fill in a table and then graphing those (because the homework and test questions ask us to identify which \*\*graph \*\*is correct), but as we were working GIF at the same time, she kept making mistakes there, and we both got frustrated.

> [@](#):
>
> Why don’t you try drawing the diagram for [+ 2]? You can do it with two or three simple functions.

Ok…  
g(x) = , h(x)= x +2  
x------\>------\>x+2

if x = 1.2  
1.2----\>1 -------\>1+2 = 3

if x = -0.7  
-0.7—\> -1 ------\> -1+2 = 1

But I’m not entirely sure where to go from there. If I put it into words, it would be “Take the greatest integer less than x and add 2”.

[QUOTE=Indistinguishable]  
Also, I suspect that where the OP typed “[+ 2]”, they meant “[] + 2”, with double brackets being the “greatest integer below” function  
[/QUOTE]

Nope. She typed it exactly as in the homework, brackets and all. She makes no claim to understanding exactly what it means, however! 😃 The text says means “the greatest integer less than x”. I have no idea what the extra set of brackets means.

---

<div class="post-metadata">

**Author:** ![Aspidistra](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aspidistra/32/3894_2.png) [@Aspidistra](https://boards.straightdope.com/u/Aspidistra)\
**Post date:** [September 16, 2008, 1:32am UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/12 "2008-09-16T01:32:10Z")

</div>

The extra set of brackets seem kinda pointless in this case, because [+2] is exactly the same as +2 (since 2 is an integer itself - adding it doesn’t make x any more in need of rounding than it was before)

If the number at the end wasn’t an integer it would make more sense: [+2.5] is actually different from +2.5 and from [x+2.5]

---

<div class="post-metadata">

**Author:** ![treis](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@treis](https://boards.straightdope.com/u/treis)\
**Post date:** [September 16, 2008, 2:06am UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/13 "2008-09-16T02:06:25Z")

</div>

> [@WhyNot](#):
>
> Now that changes the angle - I can’t see the “shrinks horizontally” bit there. Maybe because my line is infinite. Or, wait…is it because it hits the y=1 at x=.5? So the amount of the line within the (0,0) to (0,1) to (1,1) to ((1,0) to (0,0) square is shorter? The distance from (0,0) to (1,1) on the f(x line) = √ 2 and the distance from (0,1) to (.5,1) on the g(x) line = √ 1.25? Am I making any sense here whatsoever?

Are you plotting the greatest integer function, or just the function? The GIF rounds up values, which creates a staircase like graph. For f(x)=, that means the graph will be at 0 until it gets to .5, and then it will jump to 1. It stays there until x=1.5, when it jumps to 2 and so on. This makes a staircase like graph. If you plot f(x)=[2x], then the “stairs” get shorter. The function stays at 0 until x=.25, and then hops up to 1. It stays there until x=.75 when it jumps up to 2, and so on. The graph is shrunk horizontally because the steps have gone from an x length of 1, to an x length of .5.

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [September 16, 2008, 2:42am UTC](https://boards.straightdope.com/t/transformation-of-greatest-integer-function-help-me-grok/463751/14 "2008-09-16T02:42:55Z")

</div>

> [@treis](#):
>
> The GIF rounds up values, which creates a staircase like graph. For f(x)=, that means the graph will be at 0 until it gets to .5, and then it will jump to 1.

Are you talking about the greatest integer function (which I understand means the function giving the greatest integer smaller than x) or the nearest integer function?
