Grade by Grade
A. Exponential and Logarithmic Functions · Exponential and Logarithmic Functions

Transforming Logarithmic Graphs II: Horizontal Stretches, Reflections and All Four Parameters

A2.3 A3.1About 75 minutes
Learning goals
  • I can describe how k changes the graph of y = log (kx), including a reflection in the y-axis when k < 0.
  • I can factor the argument, as in log (2x − 6) = log (2(x − 3)), before reading the parameters.
  • I can sketch y = a log (k(x − d)) + c using the mapping rule (x, y) → (x/k + d, ay + c).
  • I can explain why y = log (kx) is also a vertical translation of y = log x when k > 0.

Words to know

horizontal compression or stretch
In y = log (kx), every x-value is divided by k. |k| > 1 compresses toward the y-axis; 0 < |k| < 1 stretches away from it.
reflection in the y-axis
When k < 0, every x-value changes sign. y = log (−x) has domain x < 0.
mapping rule
A rule that tells where each point goes. For y = a log (k(x − d)) + c it is (x, y) → (x/k + d, ay + c).
factored form of the argument
Writing kx − kd as k(x − d) so the horizontal shift d can be read directly.

The last parameter: k

In lesson 8 you used a, c and d. The fourth parameter, k, sits inside the logarithm with x: y = log (kx). As with every function family you studied in Grade 11, k acts horizontally, and it acts the opposite way you might expect: it divides the x-values by k.

  • |k| > 1: horizontal compression by a factor of 1/|k|.
  • 0 < |k| < 1: horizontal stretch by a factor of 1/|k|.
  • k < 0: also a reflection in the y-axis. Then the domain becomes x < 0.

The asymptote x = 0 does not change for y = log (kx), because x/k = 0 only when x = 0.

xy−10−8−6−4−2246810−2−112(5, 1)(−10, 1)y = log (2x)y = log xy = log (−x)
y = log (2x) is y = log x compressed horizontally by a factor of 1/2: its x-intercept moves from 1 to 0.5, and (10, 1) moves to (5, 1). y = log (−x) is the mirror image of y = log x in the y-axis, with x-intercept −1; it is defined only for x < 0.
Worked example

Example 1: A horizontal compression

Sketch y = log (2x) and state its domain and x-intercept.

  1. k = 2: divide each x-coordinate by 2. Mapping rule (x, y) → (x/2, y).
  2. (0.1, −1) → (0.05, −1); (1, 0) → (0.5, 0); (10, 1) → (5, 1).
  3. Asymptote x = 0; domain {x ∈ ℝ | x > 0}.
  4. x-intercept: log (2x) = 0, so 2x = 1 and x = 0.5.

A log curve through (0.05, −1), (0.5, 0), (5, 1), asymptote x = 0, x-intercept 0.5.

A surprise: k is also a vertical shift

For k > 0 the product law gives log (kx) = log k + log x. So

y = log (2x) = log x + log 2 ≈ log x + 0.301.

The same graph can be described as a horizontal compression by 1/2 or a vertical translation up about 0.301. Check with the point (10, 1) on y = log x: compressing gives (5, 1), and on y = log x + 0.301 the point with x = 5 has y = log 5 + log 2 = log 10 = 1 ✓. This is a lovely example of equivalent expressions (A3.1): two different-looking equations, one graph. It happens because of the special shape of the log curve; a parabola does not behave this way.

Worked example

Example 2: A reflection in the y-axis

Sketch y = log (−x). State the domain, range and asymptote.

  1. k = −1: (x, y) → (−x, y).
  2. (0.1, −1) → (−0.1, −1); (1, 0) → (−1, 0); (10, 1) → (−10, 1).
  3. Domain: −x > 0, so x < 0. Range: all real numbers. Asymptote: x = 0.
  4. The graph is decreasing: as x goes from −10 to −1, y goes from 1 down to 0.

The mirror image of y = log x in the y-axis, with domain {x ∈ ℝ | x < 0} and asymptote x = 0.

Factor first!

y = log (2x − 6) is not a shift of 6. Factor out k: log (2x − 6) = log (2(x − 3)). Now you can read k = 2 and d = 3 (shift right 3). Always write the argument as k(x − d) before reading parameters.

Worked example

Example 3: All four parameters

For y = 2 log (−x + 5) + 1: (a) write it in the form y = a log (k(x − d)) + c, (b) describe the transformations, (c) find the images of the key points, (d) state the domain and asymptote, (e) find the intercepts.

  1. (a) Factor −1 out of the argument: −x + 5 = −(x − 5). So y = 2 log (−(x − 5)) + 1, with a = 2, k = −1, d = 5, c = 1.
  2. (b) Vertical stretch by 2; reflection in the y-axis; then 5 right and 1 up.
  3. (c) Mapping rule (x, y) → (−x + 5, 2y + 1): (0.1, −1) → (4.9, −1); (1, 0) → (4, 1); (10, 1) → (−5, 3).
  4. (d) Asymptote x = 5; domain: −(x − 5) > 0, so x < 5.
  5. (e) y-intercept: y = 2 log 5 + 1 ≈ 2.398. x-intercept: 2 log (5 − x) = −1, so 5 − x = 10^(−0.5) ≈ 0.316 and x ≈ 4.684.

Key points (4.9, −1), (4, 1), (−5, 3); asymptote x = 5; domain x < 5; y-intercept ≈ 2.398; x-intercept ≈ 4.684.

xy−6−4−2246810−3−2−11234(4, 1)(−5, 3)(4.9, −1)(10, 1)x = 5y = log xy = 2 log (−(x − 5)) + 1
y = 2 log (−(x − 5)) + 1 opens to the left from its asymptote x = 5. The parent points (1, 0), (10, 1) and (0.1, −1) on the dotted curve y = log x map to (4, 1), (−5, 3) and (4.9, −1).
Worked example

Example 4: Factor, then map

Describe the transformations of y = −log (3x + 6) + 2, and find the images of (1, 0) and (10, 1).

  1. Factor: 3x + 6 = 3(x + 2). So a = −1, k = 3, d = −2, c = 2.
  2. Transformations: horizontal compression by 1/3, reflection in the x-axis, 2 left and 2 up.
  3. Mapping rule (x, y) → (x/3 − 2, −y + 2).
  4. (1, 0) → (1/3 − 2, 2) = (−5/3, 2).
  5. (10, 1) → (10/3 − 2, 1) = (4/3, 1).
  6. Asymptote x = −2; domain x > −2.

Images (−5/3, 2) and (4/3, 1); asymptote x = −2.

Just for fun

Riddle: Why do y = log (2x) and y = log x + log 2 never argue?

Because no matter which point they discuss, they always end up agreeing.

Hands-on activity

Two descriptions, one graph

You need: graph paper, a pencil and a scientific calculator.

  1. Make a table with columns x, log (2x) and log x + log 2, for x = 0.5, 1, 2, 5, 10 and 20. Fill it in with the calculator (to 3 decimal places).
  2. Make a second table with columns x, log (x²) and 2 log x, for x = −2, −1, 0.5, 1, 2 and 10. Write "undefined" where needed.
  3. Plot the first table. Is it one curve or two?
  4. In the second table, where do the columns disagree? What does that tell you about the graphs of y = log (x²) and y = 2 log x?

What to look for: in the first table the two columns agree in every row (for example, at x = 5 both are 1.000), so they are the same graph. In the second table they agree for every positive x, but at x = −2 and x = −1, log (x²) is defined (0.602 and 0) while 2 log x is undefined. The graph of y = log (x²) has a second branch on the left, which you will meet again in lesson 10 (Equivalent Expressions with Logarithms).

Your turn

1

Describe the transformation that maps y = log x to y = log (5x).

2

Describe the transformation that maps y = log x to y = log (x/4).

3

State the domain of y = log (−2x).

4

Write y = log (4x − 12) in the form y = log (k(x − d)) and state k and d.

5

Find the images of (1, 0) and (10, 1) under y = log (2(x − 1)).

6

State the asymptote and domain of y = 3 log (−(x + 2)) − 1.

7

Find the x-intercept of y = log (5x).

More practice: warm-up

1

In y = a log (k(x − d)) + c, which parameters act horizontally?

2

Under y = log (3x), where does (1, 0) go?

3

Under y = log (−x), where does (10, 1) go?

4

What is the domain of y = log (−x)?

5

Factor: log (2x + 8) = log (2(x + ?)).

More practice: on your own

1

Give the mapping rule for y = −2 log (3(x − 1)) + 4.

2

Use your rule to find the images of (0.1, −1), (1, 0), (10, 1).

3

Show that y = log (1000x) is a vertical translation of y = log x and state how far.

4

Find the y-intercept of y = log (−x + 4) + 1.

5

Find the equation y = log (k(x − d)) whose asymptote is x = 2 and which passes through (7, 1).

Challenge

1

For which k > 0 is the graph of y = log (kx) the same as the graph of y = log x + 2?

2

A student says y = log (−x) is the same as y = −log x. Disprove this with one point.

3

Find the equation of the form y = a log (−(x − d)) whose graph has asymptote x = 3 and passes through (2, 0) and (−7, −4).

Check your understanding

Quiz

1.

How does y = log (4x) compare with y = log x?

2.

What is the domain of y = log (−(x − 2))?

3.

y = log (2x − 10) written as y = log (k(x − d)) is

4.

Under the mapping rule for y = log (3(x + 1)), the point (10, 1) maps to

5.

Which equation has the same graph as y = log (10x)?

6.

What is the asymptote of y = 4 log (−2(x + 3)) − 5?

For parents and teachers

Big idea (A2.3): in y = a log (k(x − d)) + c, k compresses or stretches horizontally (and reflects in the y-axis if k < 0). Always factor the argument into k(x − d) first. Because log (kx) = log k + log x, a horizontal compression of a log graph is also a vertical translation.

How to help: Give your teen an equation such as y = 2 log (−x + 5) + 1 and ask: "What does the argument look like when you factor it? Which way does it open? Where is the asymptote?" Then compare with graphing technology.

Common difficulties:

  • Reading log (2x − 6) as a shift of 6 instead of 3. Factor first.
  • Multiplying x by k instead of dividing in the mapping rule.
  • Forgetting that k < 0 flips the domain to the left of the asymptote.
  • Thinking log (−x) and −log x are the same.