Straightening Growth with Logarithms

Take logs and the curve becomes a readable line.

A curve hides its numbers

The exponential model y = a × bˣ has two numbers in it: a, the value at x = 0, and b, the factor y is multiplied by at each step. For y = 3 × 2ˣ they are 3 and 2, and the points are (0, 3), (1, 6), (2, 12), (3, 24), (4, 48) and (5, 96).

Plotted, these points sweep up in a curve. The 2 cannot be measured off the picture: a curve has no single gradient, and the points of y = 3 × 2.1ˣ, or of a quadratic such as y = 3 + 4x², would make a similar curve. With measured data it is worse, because the points are rounded and do not sit exactly on any curve. What would help is a graph on which the model is a straight line.

xy

y = 3 × 2ˣ through (0, 3), (1, 6), (2, 12), (3, 24), (4, 48) and (5, 96). The curve steepens all the way, so it has no single gradient to read.

Take logs of both sides

Take the common logarithm of both sides of y = a × bˣ. The product law splits the right side into two logs: log y = log a + log(bˣ). The power law brings the exponent down: log y = log a + x log b.

Compare this with the equation of a straight line, Y = mx + c. If Y stands for log y, the equation is Y = (log b)x + log a. So log y against x is a straight line, with gradient log b and intercept log a.

For y = 3 × 2ˣ this is log y = log 3 + x log 2, which is log y = 0.477 + 0.301x, to 3 decimal places.

Plot log y against x

Work out log y for each point. The values of y, 3, 6, 12, 24, 48 and 96, have logarithms 0.477, 0.778, 1.079, 1.380, 1.681 and 1.982. Each one is 0.301 more than the one before.

That is the whole reason the graph straightens. Each step of 1 in x multiplies y by 2, and multiplying a number by 2 adds log 2 = 0.301 to its logarithm. Equal steps across give equal steps up, so the points of log y against x lie on a straight line.

012345y3612244896log y0.4770.7781.0791.3801.6811.982

The columns are x = 0 to 5. The values of y double at each step, and their logarithms go up by 0.301 at each step.

xlog y

The same six points with log y plotted up the side. They lie on the gold line log y = 0.477 + 0.301x, which meets the vertical axis at 0.477 and rises 0.301 for each step across.

Undo the logs

The gradient of the line is log b, not b. So log b = 0.301, and b = 10^0.301 = 2.00, to 2 decimal places. The intercept is log a, so log a = 0.477 and a = 10^0.477 = 3.00. The rule y = 3 × 2ˣ is recovered.

Both numbers have to be turned back with a power of 10, because the line is a graph of log y. Read straight off the line, the gradient 0.301 and the intercept 0.477 would give the wrong model, y = 0.477 × 0.301ˣ, which shrinks instead of doubling.

A line through measured data

A scientist counts the yeast cells in a sample every hour. After t = 1, 2, 3, 4 and 5 hours the counts are 6.1, 9.0, 13.6, 20.4 and 30.8 thousand. To test whether the growth is exponential, plot log N against t. The logarithms are 0.785, 0.954, 1.134, 1.310 and 1.489, to 3 decimal places.

The points lie very close to a straight line, so the growth is exponential. Measured counts are rounded, so the points are not exactly in line. Draw the line that passes closest to all of them, and read two points on the line, far apart: it passes through (1, 0.78) and (5, 1.48).

The gradient is (1.48 − 0.78) ÷ (5 − 1) = 0.70 ÷ 4 = 0.175, so b = 10^0.175 = 1.50, to 2 decimal places. The line falls by 0.175 from t = 1 back to t = 0, so the intercept is 0.78 − 0.175 = 0.605, and a = 10^0.605 = 4.0, to 1 decimal place. The model is N = 4.0 × 1.5ᵗ thousand cells: 4000 at the start, and half as many again every hour. Check at t = 3: 4.0 × 1.5³ = 13.5, close to the measured 13.6.

tlog N

The five measured points of log N against t, and the gold line drawn through them, log N = 0.605 + 0.175t. It passes through (1, 0.78) and (5, 1.48), the two points used for the gradient.

When the points do not straighten

The same plot also says when a model is not exponential. Take y = x² at x = 1, 2, 3, 4 and 5: y is 1, 4, 9, 16 and 25, and log y is 0, 0.602, 0.954, 1.204 and 1.398. The steps up are 0.602, 0.352, 0.250 and 0.194, getting smaller, so the points of log y against x bend over instead of lying on a line.

Squaring does not multiply y by the same factor at every step, so it is not exponential growth. A look ahead: data like this straightens when log x is plotted across instead of x, which is the test for a power law.

250050007500100001234linear axismorph

linear axis: 10, 100 and 1000 are all within the bottom tenth, and 10000 sets the scale; the ×10 steps are invisible

Slide the axis all the way to log scale

The points (1, 10), (2, 100), (3, 1000) and (4, 10000) lie on y = 10ˣ. On a linear axis 10, 100 and 1000 all sit in the bottom tenth of the graph. Slide the axis to a log scale: each ×10 then takes the same height, because log y = 1, 2, 3, 4, and the points line up on log y = x.

Natural logarithms work the same way

Any base of logarithm straightens the data, as long as it is used throughout. With natural logarithms, ln y = ln a + x ln b, so the gradient is ln b and the intercept is ln a, and each is undone with e to the power. For y = 3 × 2ˣ the gradient is ln 2 = 0.693 and the intercept is ln 3 = 1.099, and e^0.693 = 2.00 and e^1.099 = 3.00, the same a and b as before.

The usual mistakes

Taking the gradient and the intercept as b and a. They are log b and log a, and each has to be turned back with a power of 10.

Finding a gradient from the values of y. The points of y against x lie on a curve, which has no single gradient. Only log y against x gives a straight line.

Mixing bases. A gradient found with common logarithms is undone with 10 to the power, and one found with natural logarithms with e to the power.

Worked example: Subscribers to a New Channel Week by Week: A Logarithmic Plot That Turns the Growth into a Straight Line

Question A new channel has y subscribers x weeks after it started. For x = 0, 1, 2, 3, 4 the values of y are 10, 32, 100, 316, 1000, and the values of log10 y, to 1 decimal place, are 1.0, 1.5, 2.0, 2.5, 3.0. (a) Find the gradient and the intercept of the straight line through the points (x, log10 y). (b) Hence write the model y = a × bx, giving b to 3 significant figures.

  1. 1.If y = a × bx, take logarithms to base 10 of both sides: log10 y = log10 a + x log10 b. This has the form Y = c + mx, so a plot of log10 y against x is a straight line with gradient log10 b and intercept log10 a.

    012301234weeks, xlog of the subscribersy = a × bxlog y = log a + x log b: a straight line
    012301234weeks, xlog of the subscribersy = a × bxlog y = log a + x log b: a straight line
    Taking logarithms of y = a × bx gives log10 y = log10 a + x log10 b, a straight line in x and log10 y.
  2. 2.The values of log10 y rise by 0.5 every week, so the five points lie on a straight line. From (0, 1.0) to (4, 3.0) the gradient is 3.0 − 1.04 − 0 = 24 = 0.5.

    012301234weeks, xlog of the subscribersrun 4rise 2log y rises by 0.5 every week: a straight linegradient = (3.0 − 1.0)/(4 − 0) = 2/4 = 0.5
    012301234weeks, xlog of the subscribersrun 4rise 2log y rises by 0.5 every week: a straight linegradient = (3.0 − 1.0)/(4 − 0) = 2/4 = 0.5
    The five points lie on a straight line. It rises 2 while it runs 4, so its gradient is 0.5.
  3. 3.(a) The gradient is 0.5. The line meets the vertical axis at 1.0, so the intercept is 1.

    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1gradient 0.5intercept 1
    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1gradient 0.5intercept 1
    (a) The gradient is 0.5, and the line meets the vertical axis at 1.
  4. 4.The intercept is log10 a = 1, so a = 101 = 10. The gradient is log10 b = 0.5, so b = 100.5 = √10. Since 3.162 = 9.9856 and 3.172 = 10.0489, √10 ≈ 3.16.

    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1log a = 1, so a = 101= 10log b = 0.5, so b = 100.5=√10 = 3.16
    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1log a = 1, so a = 101= 10log b = 0.5, so b = 100.5=√10 = 3.16
    The intercept is log10 a, so a = 101 = 10. The gradient is log10 b, so b = 100.5 = √10 ≈ 3.16.
  5. 5.(b) The model is y = 10 × 3.16x: the channel started with 10 subscribers, and the number is multiplied by about 3.16 every week. Check with week 2: 10 × 3.162 ≈ 99.9, which is close to the 100 in the table.

    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1y = 10 × 3.16xcheck week 2: 10 × 3.162= 99.9, close to 100
    012301234weeks, xlog of the subscribersrun 4rise 2intercept 1y = 10 × 3.16xcheck week 2: 10 × 3.162= 99.9, close to 100
    (b) The model is y = 10 × 3.16x: 10 subscribers at the start, multiplied by about 3.16 every week.

Answer: (a) gradient 0.5, intercept 1; (b) y = 10 × 3.16x

Common mistakes

  • Reading the gradient and the intercept as b and a themselves, which gives y = 1 × 0.5x. The line is a plot of log10 y, so its gradient is log10 b and its intercept is log10 a. Each must be turned back with a power of 10.
  • Finding the gradient from the values of y, as 1000 − 104 − 0. The points of y against x lie on a curve, which has no single gradient. Only the points of log10 y against x lie on a straight line.

More functions problems, worked step by step →

Practice Straightening Growth with Logarithms in the app