(simple) Why does the graph move to the left differently here

graphing-functions

I firstly graphed the following function:

$$ y = (x)^2 $$

then I decided to graph the following function:

$$ y = (x+4)^2 $$

As far as I remember from school course, here I have increased the h value (in the classical formula: $f(x) = a \cdot f[b(x-h)]-k$ ). The h value shows how many units the graph must be shifted horizontally. +4 means four units to the left.

And the graphing website showed me exactly that (the red graph moved four units to the left and became the blue graph):

enter image description here

Later I decided to modify the original form a bit:

$$ y = (3x)^2 $$

and performed the same transformation on it:

$$ y = (3x+4)^2 $$

The graph compressed a bit horizontally, which I expected to happen. But why did it not move left four units? Here is what happened:

enter image description here

It did move to the left, but less than two units. Why is it so?

Best Answer

We have $$ (3x+4)^2=\left[3\left(x+\frac43\right)\right]^2 $$ Note in your general formula, the $x-h$ happens "inside" / before multiplication by $b$. So we should emulate the same in our expression. This results in a translation of $\frac43\approx 1.33$ units to the left.

More concretely, you could try to figure out, directly from the expressions $(x+4)^2$ and $(3x+4)^2$ and $(3(x+4))^2$, when each of them attains the value of $0$. You will see that the $3$ in $(3x+4)^2$ changes the result when compared to $(x+4)^2$, but the $3$ in $(3(x+4))^2$ does not.

More intuitively, the $3$ in $(3x+4)^2$ compressed not only the graphs themselves, but also the displacement between the graphs.