Skip to content

Shifting and reflecting a graph

Shifting and reflecting a graph

A vertical shift

Adding a number to a function adds it to every value, and the whole graph moves up or down:

y=f(x)+k\displaystyle y=f(x)+k
  • k>0\displaystyle k>0 – the graph moves k\displaystyle k units up.
  • k<0\displaystyle k<0 – the graph moves ∣k∣\displaystyle |k| units down.

On the board: f(x)=x2\displaystyle {f(x)}={x^2}, and two shifts of it (the dashed ones).

f(x)=x2\displaystyle f(x)=x^{2}
g(x)=x2+3\displaystyle g(x)=x^{2}+3
h(x)=x2−2\displaystyle h(x)=x^{2}-2
  • g(x)=x2+3\displaystyle {g(x)}={x^2+3} – the same parabola, 3 units up: the vertex has moved from (0,0)\displaystyle (0,0) to (0,3)\displaystyle (0,3).
  • h(x)=x2−2\displaystyle {h(x)}={x^2-2} – 2 units down: the vertex at (0,−2)\displaystyle (0,-2).
  • The shape of the graph does not change, and neither does the domain.
A horizontal shift

Putting x−p\displaystyle x-p in place of x\displaystyle x moves the graph to the right or to the left:

y=f(x−p)\displaystyle y=f(x-p)
  • p>0\displaystyle p>0 – the graph moves p\displaystyle p units to the right.
  • p<0\displaystyle p<0 – the graph moves ∣p∣\displaystyle |p| units to the left: f(x+3)\displaystyle f(x+3) is a shift of 3 units to the left.

On the board: f(x)=x\displaystyle {f(x)}={\sqrt{x}}, and g(x)=x−2\displaystyle {g(x)}={\sqrt{x-2}} (the dashed one).

f(x)=x\displaystyle f(x)=\sqrt{x}
g(x)=x−2\displaystyle g(x)=\sqrt{x-2}
(4,2)\displaystyle (4,2)
(6,2)\displaystyle (6,2)

The shift goes against the sign, and this is why:

  • g\displaystyle g takes at x=6\displaystyle {x}={6} the value f\displaystyle f takes at x=4\displaystyle {x}={4}: g(6)=6−2=4=2=f(4)\displaystyle {g(6)}={\sqrt{6-2}}={\sqrt{4}}={2}={f(4)}.
  • So every value of f\displaystyle f reaches g\displaystyle g two units later – to the right.
  • The domain moves too: x\displaystyle \sqrt{x} is defined for x≥0\displaystyle x\geq0, and x−2\displaystyle \sqrt{x-2} for x≥2\displaystyle x\geq2.
Reflections in the axes

A minus before the function turns every value into its opposite; a minus before x\displaystyle x puts the opposite of every x\displaystyle x in its place:

y=−f(x)\displaystyle y=-f(x)
y=f(−x)\displaystyle y=f(-x)

On the board: f(x)=x\displaystyle {f(x)}={\sqrt{x}}, and its two reflections (the dashed ones).

f(x)=x\displaystyle f(x)=\sqrt{x}
g(x)=−x\displaystyle g(x)=-\sqrt{x}
h(x)=−x\displaystyle h(x)=\sqrt{-x}
  • g(x)=−x\displaystyle {g(x)}={-\sqrt{x}} – the reflection in the x\displaystyle x-axis: what was above the axis is below it.
  • h(x)=−x\displaystyle {h(x)}={\sqrt{-x}} – the reflection in the y\displaystyle y-axis: what was to the right of the axis is to its left. −x\displaystyle \sqrt{-x} is defined for x≤0\displaystyle x\leq0.
Where a point moves

Every transformation moves every point of the graph in the same way. A point (a,b)\displaystyle (a,b) on the graph of y=f(x)\displaystyle {y}={f(x)} moves:

The new functionThe new pointWhat happened
y=f(x)+k\displaystyle {y}={f(x)+k}(a, b+k)\displaystyle (a,\ b+k)only y\displaystyle y changes
y=f(x−p)\displaystyle {y}={f(x-p)}(a+p, b)\displaystyle (a+p,\ b)only x\displaystyle x changes
y=−f(x)\displaystyle {y}={-f(x)}(a, −b)\displaystyle (a,\ -b)y\displaystyle y changes sign
y=f(−x)\displaystyle {y}={f(-x)}(−a, b)\displaystyle (-a,\ b)x\displaystyle x changes sign
  • A point on the x\displaystyle x-axis stays where it is in the reflection in the x\displaystyle x-axis.
  • A point on the y\displaystyle y-axis stays where it is in the reflection in the y\displaystyle y-axis.
Two shifts together

g(x)=x+1−2\displaystyle {g(x)}={\sqrt{x+1}-2}.
How do you get the graph of g\displaystyle g from the graph of f(x)=x\displaystyle {f(x)}={\sqrt{x}}?

The example below reads the two shifts from the formula, and finds where the graph starts.

f(x)=x\displaystyle f(x)=\sqrt{x}
g(x)=x+1−2\displaystyle g(x)=\sqrt{x+1}-2
(−1,−2)\displaystyle (-1,-2)
  • x+1\displaystyle \sqrt{x+1} – a shift of one unit to the left (here p=−1\displaystyle {p}={-1}).
  • −2\displaystyle -2 – a shift of 2 units down.
  • The graph of x\displaystyle \sqrt{x} starts at (0,0)\displaystyle (0,0); after the two shifts it starts at (0−1, 0−2)=(−1,−2)\displaystyle {(0-1,\ 0-2)}={(-1,-2)}.
  • The domain of g\displaystyle g: x+1≥0\displaystyle x+1\geq0, that is x≥−1\displaystyle x\geq-1.
Exercise 1

On the board: f(x)=x\displaystyle {f(x)}={\sqrt{x}}, and three graphs whose formulas are hidden.
Each of them is a shift of f\displaystyle f: the formulas are x−1\displaystyle \sqrt{x-1}, x+1\displaystyle \sqrt{x+1} and x−1\displaystyle \sqrt{x}-1.
Write the formula of each graph in a row of its own.

f(x)=x\displaystyle f(x)=\sqrt{x}
g(x)= ?\displaystyle g(x)=\,?
h(x)= ?\displaystyle h(x)=\,?
k(x)= ?\displaystyle k(x)=\,?

Exercise 2

f(x)=x3\displaystyle {f(x)}={x^3}.
The graph of g\displaystyle g is the graph of f\displaystyle f, shifted 2 units to the right and one unit up.

a

Write the formula of g\displaystyle g on the board.

f(x)=x3\displaystyle f(x)=x^{3}

b

The point (1,1)\displaystyle (1,1) is on the graph of f\displaystyle f.
To which point on the graph of g\displaystyle g does it move?

Exercise 3

On the board – the function f\displaystyle f; its graph is made of straight pieces.
The points A(−2,−1)\displaystyle A(-2,-1) and B(1,1)\displaystyle B(1,1) are on the graph.

f(x)\displaystyle f(x)
A=(−2,−1)\displaystyle A=(-2,-1)
B=(1,1)\displaystyle B=(1,1)
a

g(x)=f(x)−4\displaystyle {g(x)}={f(x)-4}.
To which points on the graph of g\displaystyle g do A\displaystyle A and B\displaystyle B move?

b

h(x)=f(x+3)\displaystyle {h(x)}={f(x+3)}.
To which points on the graph of h\displaystyle h do A\displaystyle A and B\displaystyle B move?

c

k(x)=−f(x)\displaystyle {k(x)}={-f(x)}.
To which points on the graph of k\displaystyle k do A\displaystyle A and B\displaystyle B move?
Which point of the graph of f\displaystyle f stays where it is?

Exercise 4

f(x)=x2−4x\displaystyle {f(x)}={x^2-4x}.
On the board: f\displaystyle f, its reflection in the x\displaystyle x-axis and its reflection in the y\displaystyle y-axis.
Write the formula of each reflection in a row of its own.

f(x)=x2−4x\displaystyle f(x)=x^{2}-4x
g(x)= ?\displaystyle g(x)=\,?
h(x)= ?\displaystyle h(x)=\,?

Exercise 5

The graph of f(x)=x2\displaystyle {f(x)}={x^2} is moved to the right and down, until its vertex reaches V(3,−2)\displaystyle V(3,-2).
Write the formula of the new parabola on the board.

f(x)=x2\displaystyle f(x)=x^{2}
V=(3,−2)\displaystyle V=(3,-2)

Where does the new parabola decrease, and where does it increase?