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

The Graph of y = log_b x and Its Key Features

A2.1About 70 minutes
Learning goals
  • I can make a table of values for y = log_b x and sketch its graph by hand.
  • I can state the domain, range, intercepts, asymptote and increasing or decreasing behaviour of y = log_b x.
  • I can describe how the rate of change of y = log_b x behaves (it keeps slowing down for b > 1).
  • I can find the base of a logarithmic function from a point on its graph.

Words to know

logarithmic function
A function of the form f(x) = log_b x, with b > 0 and b ≠ 1.
vertical asymptote
A vertical line x = a that a graph approaches more and more closely but never touches. For y = log_b x it is the y-axis, x = 0.
domain
The set of allowed x-values. For y = log_b x the domain is {x ∈ ℝ | x > 0}.
range
The set of y-values the function produces. For y = log_b x the range is {y ∈ ℝ}, all real numbers.
average rate of change
The change in y divided by the change in x between two points: the slope of the secant line joining them.

From a table of powers to a graph

You can graph y = log₂ x straight from the definition. Pick x-values that are powers of 2, because their logarithms are easy: x = 1/8, 1/4, 1/2, 1, 2, 4, 8. The y-values are −3, −2, −1, 0, 1, 2, 3. Plot these points and join them with a smooth curve.

x1/81/41/21248
y = log₂ x−3−2−10123
Each time x doubles, y goes up by 1.
xy−1123456789−4−3−2−11234(1/8, −3)(1/4, −2)(1/2, −1)(1, 0)(2, 1)(4, 2)(8, 3)y = log₂ xasymptote x = 0
The graph of y = log₂ x passes through (1, 0) and (2, 1). It hugs the y-axis as x gets close to 0 and keeps rising, more and more slowly, as x grows.

Key features of y = log_b x when b > 1

  • Domain: {x ∈ ℝ | x > 0}. You cannot take the log of 0 or a negative number.
  • Range: {y ∈ ℝ}. Every real number is the log of something (for example, log₂ x = 100 when x = 2¹⁰⁰).
  • x-intercept: 1, because log_b 1 = 0. No y-intercept, because x = 0 is not in the domain.
  • Vertical asymptote: x = 0. As x → 0⁺ (x approaches 0 from the right), y → −∞.
  • Increasing on its whole domain, but the rate of change keeps decreasing: the curve gets flatter and flatter, though it never levels off at a maximum.
  • Two handy points: (1, 0) and (b, 1). Also (1/b, −1).

Compare with y = bˣ

The exponential function y = bˣ has a horizontal asymptote (y = 0), domain all reals and range y > 0. The log function swaps these: a vertical asymptote (x = 0), domain x > 0 and range all reals. In lesson 7 you will see why: each graph is the reflection of the other in y = x.

Worked example

Example 1: The rate of change slows down

For f(x) = log₂ x, find the average rate of change from x = 1 to x = 2, from x = 2 to x = 4 and from x = 4 to x = 8. What do you notice?

  1. Average rate of change = Δy ÷ Δx.
  2. From 1 to 2: (1 − 0) ÷ (2 − 1) = 1.
  3. From 2 to 4: (2 − 1) ÷ (4 − 2) = 1/2.
  4. From 4 to 8: (3 − 2) ÷ (8 − 4) = 1/4.

1, 1/2, 1/4. Each interval is twice as wide, but y still only goes up by 1, so the average rate of change keeps halving. The graph is increasing at a decreasing rate. (You will study rates of change in detail in the unit Rates of Change.)

When the base is between 0 and 1

For y = log_(1/2) x, ask "1/2 to what power gives x?" (1/2)⁻³ = 8, so log_(1/2) 8 = −3, and (1/2)³ = 1/8, so log_(1/2) (1/8) = 3. The table is the same as for log₂ x, but every y has the opposite sign.

In fact log_(1/2) x = log x ÷ log (1/2) = log x ÷ (−log 2) = −log₂ x. The graph is the reflection of y = log₂ x in the x-axis. It is decreasing. The domain, range, x-intercept and asymptote stay the same.

xy−112345678910−4−3−2−11234y = log₂ xy = log xy = log1/2 x
Three logarithmic functions share the point (1, 0) and the asymptote x = 0. A larger base (10 instead of 2) gives a flatter curve for x > 1. The base 1/2 gives a decreasing curve: the mirror image of y = log₂ x in the x-axis.
Worked example

Example 2: Key features for a base between 0 and 1

State the key features of f(x) = log_(1/3) x and give three points on its graph.

  1. Points: (1/3, 1) because (1/3)¹ = 1/3; (1, 0); (3, −1) because (1/3)⁻¹ = 3. Also (9, −2).
  2. Domain {x ∈ ℝ | x > 0}; range {y ∈ ℝ}.
  3. x-intercept 1; no y-intercept; vertical asymptote x = 0.
  4. Since 0 < b < 1, the function is decreasing. As x → 0⁺, y → +∞.

Decreasing curve through (1/3, 1), (1, 0), (3, −1), (9, −2), with the y-axis as asymptote.

Worked example

Example 3: Find the base from a point

The graph of y = log_b x passes through (25, 2). Find b. Then find the y-value when x = 125.

  1. Substitute: 2 = log_b 25. Exponential form: b² = 25.
  2. b = 5 (a base must be positive).
  3. When x = 125: y = log₅ 125 = 3.

b = 5, and the point (125, 3) is on the graph.

Worked example

Example 4: How slowly does log x grow?

For y = log x (base 10), how large must x be for y to reach 6? And for y to go from 6 to 7?

  1. y = 6 when x = 10⁶ = 1 000 000.
  2. y = 7 when x = 10⁷ = 10 000 000.
  3. To rise one unit from 6 to 7, x must increase by 9 000 000.

x = 1 000 000 for y = 6, and x must increase by 9 000 000 to rise to y = 7. Log functions grow without bound, but extremely slowly.

Just for fun

If you drew y = log x with 1 cm per unit on both axes, the curve would reach a height of 10 cm only when x = 10¹⁰ cm. That is 100 000 km to the right: about two and a half times around the Earth.

Hands-on activity

Walk the log curve

You need: a tape measure (or a metre stick), masking tape and a long hallway or a driveway (ask permission first).

  1. Put a piece of tape on the floor for the origin, x = 0. Choose the scale 1 unit = 10 cm.
  2. Place tape at x = 1, 2, 4, 8 and 16 (that is, 10 cm, 20 cm, 40 cm, 80 cm and 160 cm from the origin). Label each piece of tape with log₂ x: 0, 1, 2, 3, 4.
  3. Keep going: where would x = 32 and x = 64 go? Measure and mark them if you have room.
  4. How far from the origin would x = 1024 be? What is log₂ 1024?

What to look for: each new mark is twice as far from the origin as the last one, but the label only goes up by 1. x = 64 is 6.4 m from the origin (log₂ 64 = 6), and x = 1024 would be 102.4 m away, about the length of a football field, for a height of only 10 (log₂ 1024 = 10). That is the slowing rate of change of a log function.

Your turn

1

Make a table of values for y = log₃ x using x = 1/9, 1/3, 1, 3, 9, 27.

2

State the domain and range of y = log₅ x.

3

What is the x-intercept of y = log₇ x? Does it have a y-intercept?

4

Is y = log_(0.4) x increasing or decreasing? Explain.

5

The graph of y = log_b x passes through (8, 3). Find b.

6

Find the average rate of change of y = log x from x = 10 to x = 100.

7

Write the equation of the asymptote of y = log₁₂ x.

More practice: warm-up

1

Which point lies on every graph y = log_b x?

2

For y = log₄ x, find y when x = 16.

3

For y = log x, find y when x = 0.1.

4

For y = log₂ x, find x when y = 5.

5

True or false: y = log₃ x has a horizontal asymptote.

More practice: on your own

1

For y = log₂ x, as x → 0⁺, what happens to y? Explain using a value.

2

The graph of y = log_b x passes through (1/4, 2). Find b and say whether the function is increasing or decreasing.

3

Show that log_(1/5) x = −log₅ x using the change of base formula.

4

For y = log x, compare the average rate of change from x = 1 to 10 with that from 10 to 100.

5

Which grows faster for large x: y = log₂ x or y = log₁₀ x? Explain using x = 1024.

Challenge

1

Show that log₂ x and log₁₀ x are always in the same ratio for x > 0, x ≠ 1, and find the ratio.

2

For which x is log₂ x > log₁₀ x? For which is it smaller?

3

Find the smallest whole number x for which log₂ x > 20.

Check your understanding

Quiz

1.

What is the domain of y = log₆ x?

2.

What is the equation of the asymptote of y = log₉ x?

3.

Which point is on the graph of y = log₄ x?

4.

Which function is decreasing?

5.

Which statement about y = log₃ x is true?

6.

The graph of y = log_b x passes through (1/8, −3). What is b?

For parents and teachers

Big idea (A2.1): y = log_b x has domain x > 0, range all real numbers, x-intercept 1, vertical asymptote x = 0, and (for b > 1) increases more and more slowly. For 0 < b < 1 it decreases.

How to help: Ask your teen to sketch y = log₂ x from memory using the points (1/2, −1), (1, 0), (2, 1), (4, 2) and to say each key feature aloud. If you have a computer, graph y = log(x)/log(b) in a free graphing tool such as Desmos with a slider for b and watch what happens as b passes 1.

Common difficulties:

  • Drawing the graph crossing the y-axis, or touching it. It never reaches x = 0.
  • Giving the range as y > 0 (that is the range of the exponential function).
  • Thinking the graph levels off at a horizontal asymptote. It rises forever, just slowly.
  • Forgetting that a base between 0 and 1 makes the function decreasing.