What this les­son cov­ers

Once you know the graph of a basic func­tion y=f(x)y = f(x), you can draw many related graphs by shift­ing, stretch­ing, reflect­ing and fold­ing it. Mak­ing such changes to xx (the inde­pen­dent vari­able) or yy (the depen­dent vari­able) is called trans­for­ma­tion of graphs. This les­son cov­ers four­teen stan­dard trans­for­ma­tions, each with an exam­ple.

1. y=f(x)+ay = f(x) + a

If a>0a > 0, shift the graph of f(x)f(x) up by aa units (equiv­a­lently, shift the xx-axis down by aa). If a<0a < 0, shift it down by ∣a∣|a| units. Every point moves ver­ti­cally by the same amount.

Exam­ple. y=ex+1y = e^x + 1 is the curve y=exy = e^x lifted by 11: it crosses the yy-axis at (0,2)(0, 2) and flat­tens towards the line y=1y = 1 on the left. y=ex−2y = e^x - 2 is y=exy = e^x low­ered by 22: it crosses the yy-axis at (0,−1)(0, -1) and flat­tens towards y=−2y = -2.

Exam­ple. y=∣x∣+2y = |x| + 2 is the V of y=∣x∣y = |x| with its cor­ner moved up to (0,2)(0, 2); y=∣x∣−2y = |x| - 2 has its cor­ner at (0,−2)(0, -2) and cuts the xx-axis at ±2\pm 2.

2. y=f(x+a)y = f(x + a)

If a>0a > 0, shift the graph of f(x)f(x) to the left by aa units (or shift the yy-axis right by aa). If a<0a < 0, shift it to the right by ∣a∣|a| units. Adding inside the bracket moves the graph the oppo­site way to what one might expect.

Exam­ple. y=sin⁡(x−π2)\displaystyle y = \sin\left(x - \frac{\pi}{2}\right) is the sine curve moved right by π2\displaystyle \frac{\pi}{2}, and y=sin⁡(x+π2)\displaystyle y = \sin\left(x + \frac{\pi}{2}\right) is the sine curve moved left by π2\displaystyle \frac{\pi}{2} (which is the graph of cos⁡x\cos x).

Exam­ple. y=∣x−1∣y = |x - 1| is the V with its cor­ner at (1,0)(1, 0), and y=∣x+1∣y = |x + 1| is the V with its cor­ner at (−1,0)(-1, 0).

3. y=af(x)y = a f(x), a>0a > 0

The graph of y=f(x)y = f(x) is stretched ver­ti­cally aa times when a>1a > 1, and com­pressed ver­ti­cally when 0<a<10 < a < 1 (every height is mul­ti­plied by aa). Points on the xx-axis stay where they are.

Exam­ple. y=2xy = 2x is the line y=xy = x stretched two times along the yy-axis (steeper); y=x2\displaystyle y = \frac{x}{2} is it com­pressed two times (flat­ter).

Exam­ple. y=4cos⁡xy = 4\cos x oscil­lates between −4-4 and 44, and y=14cos⁡x\displaystyle y = \frac14\cos x between −14\displaystyle -\frac14 and 14\displaystyle \frac14; all three curves cross the xx-axis at the same points ±π2,±3π2,…\displaystyle \pm\frac{\pi}{2}, \pm\frac{3\pi}{2}, \dots

4. y=f(ax)y = f(ax), a>0a > 0

The graph is com­pressed hor­i­zon­tally towards the yy-axis aa times when a>1a > 1, and stretched hor­i­zon­tally 1a\displaystyle \frac1a times when 0<a<10 < a < 1. Points on the yy-axis stay where they are.

Exam­ple. y=sin⁡2xy = \sin 2x com­pletes a full wave in π\pi instead of 2π2\pi, and y=sin⁡x2\displaystyle y = \sin\frac{x}{2} takes 4π4\pi. All three still oscil­late between −1-1 and 11.

5. y=f(−x)y = f(-x)

The graph of y=f(−x)y = f(-x) is the reflec­tion of y=f(x)y = f(x) in the yy-axis (as if the yy-axis were a plane mir­ror).

Exam­ple. y=e−xy = e^{-x} is the reflec­tion of y=exy = e^x in the yy-axis. Both pass through (0,1)(0, 1); e−xe^{-x} falls from left to right.

6. y=−f(x)y = -f(x)

The graph of y=−f(x)y = -f(x) is the reflec­tion of y=f(x)y = f(x) in the xx-axis.

Exam­ple. y=−exy = -e^x lies below the xx-axis and passes through (0,−1)(0, -1).

Exam­ple. y=−log⁡exy = -\log_e x is the reflec­tion of y=log⁡exy = \log_e x in the xx-axis; both pass through (1,0)(1, 0).

Exam­ple. y=−[x]y = -[x]: each step of y=[x]y = [x] is reflected in the xx-axis, so on [n,n+1)[n, n+1) the graph is the seg­ment at height −n-n.

7. y=−f(−x)y = -f(-x)

First reflect y=f(x)y = f(x) in the yy-axis to get f(−x)f(-x), then reflect that in the xx-axis. Together this is a half turn about the ori­gin.

Exam­ple. y=−e−xy = -e^{-x} lies below the xx-axis, passes through (0,−1)(0, -1) and rises towards the xx-axis as xx increases.

8. y=∣f(x)∣y = |f(x)|

Keep the part of the graph of y=f(x)y = f(x) that lies on or above the xx-axis. Reflect the part below the xx-axis in the xx-axis.

Exam­ple. y=∣log⁡ex∣y = |\log_e x|: for x≥1x \ge 1 it is the usual log curve; for 0<x<10 < x < 1 the neg­a­tive part is flipped up, so the graph comes down from high up near the yy-axis to touch (1,0)(1, 0), then rises again.

Exam­ple. y=∣x2−2x−3∣y = |x^2 - 2x - 3|: the parabola y=x2−2x−3y = x^2 - 2x - 3 cuts the xx-axis at −1-1 and 33 and dips to −4-4 at x=1x = 1. Flip­ping that dip gives an arch between −1-1 and 33 with top (1,4)(1, 4), with the outer arms unchanged.

9. y=f(∣x∣)y = f(|x|)

Draw y=f(x)y = f(x), keep the part to the right of the yy-axis, ignore the part on the left, and replace it by the reflec­tion of the right-hand part in the yy-axis. The result is always an even func­tion.

Exam­ple. y=log⁡e∣x∣y = \log_e |x| con­sists of the log curve for x>0x > 0 and its mir­ror image for x<0x < 0, pass­ing through (1,0)(1, 0) and (−1,0)(-1, 0).

10. y=∣f(∣x∣)∣y = |f(|x|)|

First draw y=f(∣x∣)y = f(|x|) by rule 9, then apply rule 8: flip the parts below the xx-axis up.

Exam­ple. y=∣∣x∣2−2∣x∣−3∣y = \big||x|^2 - 2|x| - 3\big|: from y=x2−2x−3y = x^2 - 2x - 3, rule 9 gives a W-like curve sym­met­ric about the yy-axis, cut­ting the xx-axis at ±3\pm 3 and with value −3-3 at x=0x = 0. Rule 8 then flips the part between −3-3 and 33 upward, giv­ing two arches meet­ing at (0,3)(0, 3).

11. ∣y∣=f(x)|y| = f(x)

Ignore the part of y=f(x)y = f(x) below the xx-axis (there f(x)<0f(x) < 0, and ∣y∣=f(x)|y| = f(x) is impos­si­ble). Keep the part above the xx-axis and add its reflec­tion in the xx-axis.

Exam­ple. ∣y∣=log⁡ex|y| = \log_e x exists only for x≥1x \ge 1: the upper half is the log curve from (1,0)(1, 0) and the lower half is its mir­ror image, open­ing to the right like a side­ways parabola.

12. ∣y∣=∣f(x)∣|y| = |f(x)|

First draw y=∣f(x)∣y = |f(x)| by rule 8, then add its reflec­tion in the xx-axis.

Exam­ple. ∣y∣=∣log⁡ex∣|y| = |\log_e x| is the graph of y=log⁡exy = \log_e x together with y=−log⁡exy = -\log_e x, two curves cross­ing at (1,0)(1, 0).

13. ∣y∣=∣f(∣x∣)∣|y| = |f(|x|)|

First draw y=∣f(∣x∣)∣y = |f(|x|)| by rule 10, then take its reflec­tion in the xx-axis as well.

Exam­ple. ∣y∣=∣log⁡∣x∣∣|y| = |\log|x||: draw y=log⁡∣x∣y = \log|x|, flip the neg­a­tive parts up to get y=∣log⁡∣x∣∣y = |\log|x||, which touches the axis at ±1\pm 1; then reflect the whole thing in the xx-axis. The final pic­ture is sym­met­ric about both axes.

14. y=f−1(x)y = f^{-1}(x)

The graph of y=f−1(x)y = f^{-1}(x) is the reflec­tion of the graph of y=f(x)y = f(x) in the line y=xy = x.

Exam­ple. The graph of y=log⁡exy = \log_e x is the reflec­tion of y=exy = e^x in y=xy = x: the point (0,1)(0, 1) on exe^x becomes (1,0)(1, 0) on log⁡ex\log_e x.

Prac­tice

  1. The graph of y=x2y = x^2 is shifted 3 units right and 2 units up. Write the new equa­tion.
  2. Describe how to get y=x+4y = \sqrt{x + 4} from y=xy = \sqrt{x}, and give its domain.
  3. What is the period of y=sin⁡3xy = \sin 3x, and its great­est value?
  4. What is the great­est value of y=5sin⁡xy = 5\sin x, and where does it first occur for x>0x > 0?
  5. Where does y=∣x2−4∣y = |x^2 - 4| touch the xx-axis, and what is its value at x=0x = 0?
  6. At which points does y=log⁡e∣x∣y = \log_e |x| cut the xx-axis?
  7. The point (2,9)(2, 9) lies on y=f(x)y = f(x). Name a point on y=f−1(x)y = f^{-1}(x), on y=f(−x)y = f(-x) and on y=−f(x)y = -f(x).

Answers

Show answers
  1. y=(x−3)2+2y = (x - 3)^2 + 2.
  2. Shift left by 44; domain [−4,∞)[-4, \infty).
  3. Period 2π3\displaystyle \frac{2\pi}{3}; great­est value 11.
  4. 55, first at x=π2\displaystyle x = \frac{\pi}{2}.
  5. At x=±2x = \pm 2; value ∣0−4∣=4|0 - 4| = 4 at x=0x = 0.
  6. At (1,0)(1, 0) and (−1,0)(-1, 0).
  7. (9,2)(9, 2), (−2,9)(-2, 9) and (2,−9)(2, -9).