Chuyển đến nội dung

Bài 7 · Functions and Transformations

Transformations of Graphs

Learn how shifts, reflections, stretches and compressions change a graph and its equation, using y = a f(b(x - h)) + k with plots you can run.

You do not have to learn every graph from scratch. A handful of basic shapes, called parent functions, can be moved, flipped and stretched to make a huge number of other graphs. Once you know how each change affects the equation, you can sketch a graph quickly and read a formula directly from a picture.

The parent functions used most in this course are:

Name Equation
Linear f(x) = x
Quadratic f(x) = x²
Cubic f(x) = x³
Absolute value f(x) = abs(x)
Square root f(x) = √x
Reciprocal f(x) = 1/x

Vertical shifts

Adding a constant outside the function moves the graph up or down. The graph of y = f(x) + k is the graph of y = f(x) moved k units up (if k > 0) or |k| units down (if k < 0). The shape does not change. For example y = x² + 3 is y = x² moved up 3, and its lowest point is (0, 3).

Horizontal shifts

Changing the input moves the graph sideways, and the direction surprises many learners. The graph of y = f(x - h) is the graph of y = f(x) moved h units to the right (if h > 0).

Why right? The function y = (x - 3)² has its lowest point where the inside is zero, at x = 3. So the vertex moved from 0 to 3, to the right. Think of x - h as asking "what is the original function doing h units earlier?". So y = (x + 2)² is shifted 2 units to the left.

Reflections

  • y = -f(x) reflects the graph in the x-axis (flips it upside down): every output changes sign.
  • y = f(-x) reflects the graph in the y-axis (flips it left to right): the input changes sign.

For f(x) = √x, the graph of √(-x) lies to the left of the y-axis, and -√x hangs below the x-axis.

Stretches and compressions

  • y = a·f(x) stretches the graph vertically by factor |a| if |a| > 1 and compresses it if 0 < |a| < 1. (If a < 0, it also reflects in the x-axis.)
  • y = f(bx) compresses the graph horizontally by factor 1/|b| when |b| > 1 and stretches it when 0 < |b| < 1. Again the horizontal change is the opposite of what you might guess: doubling the input squeezes the graph toward the y-axis, because the function reaches each output sooner.

The general form

Combine everything: y = a·f(b(x - h)) + k.

Parameter Effect
a vertical stretch or compression; sign flips over the x-axis
b horizontal compression by a factor of 1/abs(b); sign flips over the y-axis
h horizontal shift (right if positive)
k vertical shift (up if positive)

Order of operations on the graph. Apply the changes to the input first (b, then h), then to the output (a, then k). A reliable way to track a point is to follow the key point (x, y) of the parent function: it moves to (x/b + h, a·y + k).

Example 1. Describe y = -2(x + 1)² + 5 from y = x². Here a = -2, h = -1, k = 5, b = 1. The parabola is stretched vertically by 2, flipped upside down, moved 1 left and 5 up. The vertex moves from (0, 0) to (-1, 5) and the parabola opens downward.

Example 2. The point (2, 4) lies on y = x². Where does it go on y = -2(x + 1)² + 5? Using (x + h, a·y + k) with b = 1, h = -1: x = 2 - 1 = 1, y = -2(4) + 5 = -3. Check: -2(1 + 1)² + 5 = -8 + 5 = -3. Correct.

Python Plot a parent function and its transformation

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Transforming a table or a point

When a graph is given only as points, transform each point. For the parent points (-1, 1), (0, 0), (1, 1) of x², the transformation y = 3f(x - 2) - 1 sends (x, y) to (x + 2, 3y - 1), giving (1, 2), (2, -1), (3, 2).

Python Transform points by hand rules

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Even and odd symmetry

If f(-x) = f(x), the graph is symmetric about the y-axis and f is even (x², |x|). If f(-x) = -f(x), the graph looks the same after a half-turn about the origin and f is odd (x³, 1/x). Reflecting an even function in the y-axis changes nothing.

To check a transformation, test one easy point. Plug the parent's key point into your final equation and make sure it lands where you predicted.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The graph of y = (x - 4)² is the graph of y = x² moved

    The vertex is where x - 4 = 0, at x = 4, which is to the right.
  2. 2. Which equation reflects y = f(x) in the x-axis?

    Negating the output flips the graph over the x-axis.
  3. 3. What is the vertex of y = 3(x + 2)² - 7?

    h = -2 and k = -7, so the vertex moves from (0, 0) to (-2, -7).
  4. 4. y = f(2x) does what to the graph of y = f(x)?

    Each output now occurs at half the original x, so the graph is squeezed toward the y-axis.

Summary

  • Parent functions are the building blocks; transformations modify them.
  • Outside changes (+k, a·) act vertically; inside changes (x - h, bx) act horizontally and in the opposite sense.
  • -f(x) reflects in the x-axis; f(-x) reflects in the y-axis.
  • The general form is y = a·f(b(x - h)) + k; key points move to (x/b + h, a·y + k).
  • Test one point to verify a transformation.

Next: Composition of Functions

Theo dõi tiến độ của bạn

Tạo tài khoản miễn phí để đánh dấu bài đã học và tiếp tục từ chỗ bạn dừng lại trên mọi thiết bị.