Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AI › Notes

IB Maths AI · Topic 2 · 2.5 · HL only

Logarithmic scales and linearising data

This note covers logarithmic scales and the technique of linearising data: turning an exponential or power relationship into a straight line by taking logarithms. It lets you recognise the type of relationship from a graph, find the equation from the line, and read quantities such as earthquake magnitude that are measured on a log scale.

Key ideas

Logarithmic scales. On an ordinary (linear) scale, equal steps add equal amounts. On a logarithmic scale, equal steps multiply by the same factor. Many quantities are given on log scales because they cover a huge range of sizes. Examples include earthquake magnitude, sound level and acidity.

For a base-10 log scale, if \(M = \log_{10} A\) then increasing \(M\) by 1 multiplies \(A\) by 10. Increasing \(M\) by 2 multiplies \(A\) by \(10^2 = 100\). In general, a rise of \(\Delta M\) multiplies \(A\) by \(10^{\Delta M}\).

On a graph, a log axis has marks at 1, 10, 100, 1000 that are equally spaced. A value such as 30 sits just under halfway between the marks for 10 and 100, because \(\log_{10} 30 \approx 1.48\). On a linear scale it would sit much nearer to 10.

Rules you need. For logarithms in any base (here natural logarithms, \(\ln\)):

  • \(\ln(pq) = \ln p + \ln q\)
  • \(\ln(p^n) = n\ln p\)

Linearising an exponential model (semi-log). Suppose \(y = ab^x\). Take \(\ln\) of both sides:

\[ \ln y = \ln a + x\ln b. \]

This has the form (vertical variable) = (intercept) + (gradient) \(\times x\). So a graph of \(\ln y\) against \(x\) is a straight line with gradient \(\ln b\) and vertical intercept \(\ln a\). This is a semi-log graph, because only the \(y\)-axis is logarithmic. If your data give a straight line on a semi-log graph, an exponential model is suitable.

Linearising a power model (log-log). Suppose \(y = ax^n\). Then

\[ \ln y = \ln a + n\ln x. \]

A graph of \(\ln y\) against \(\ln x\) is a straight line with gradient \(n\) and vertical intercept \(\ln a\). This is a log-log graph, because both axes are logarithmic. A straight line on a log-log graph means a power model.

Summary of the method.

  1. Decide which relationship to test: \(y = ab^x\) (plot \(\ln y\) against \(x\)) or \(y = ax^n\) (plot \(\ln y\) against \(\ln x\)).
  2. Find the gradient and intercept of the straight line, from two points on it or from linear regression on the GDC applied to the transformed data.
  3. Convert back: \(b = e^{\text{gradient}}\) or \(n = \text{gradient}\), and \(a = e^{\text{intercept}}\).

You may use \(\log_{10}\) instead of \(\ln\). The method is the same, and then \(a = 10^{\text{intercept}}\) and \(b = 10^{\text{gradient}}\) for the exponential case.

Definitions and formulae

Term or formulaMeaning / when to use
Logarithmic scaleA scale where equal steps represent equal multiplication factors.
\(M = \log_{10} A\)A base-10 log scale. A rise of \(\Delta M\) multiplies \(A\) by \(10^{\Delta M}\).
\(\ln(pq) = \ln p + \ln q\)Product rule for logarithms.
\(\ln(p^n) = n\ln p\)Power rule for logarithms.
\(y = ab^x \Rightarrow \ln y = \ln a + x\ln b\)Semi-log linearisation. Plot \(\ln y\) against \(x\). Gradient \(\ln b\), intercept \(\ln a\).
\(y = ax^n \Rightarrow \ln y = \ln a + n\ln x\)Log-log linearisation. Plot \(\ln y\) against \(\ln x\). Gradient \(n\), intercept \(\ln a\).

Worked examples

Example 1 A scientist plots \(\ln y\) against \(x\) for the number of bacteria \(y\) (in thousands) in a culture after \(x\) hours. The points lie on a straight line through \((1, 1.9)\) and \((5, 4.3)\). Find a model of the form \(y = ab^x\) and predict \(y\) when \(x = 8\).

Gradient of the line \(= \dfrac{4.3 - 1.9}{5 - 1} = \dfrac{2.4}{4} = 0.6\).

Intercept: \(1.9 = c + 0.6(1)\), so \(c = 1.3\). The line is \(\ln y = 0.6x + 1.3\).

Compare with \(\ln y = \ln a + x\ln b\): \(\ln b = 0.6\) and \(\ln a = 1.3\).

So \(b = e^{0.6} = 1.822\ldots\) and \(a = e^{1.3} = 3.669\ldots\)

The model is \(y = 3.67(1.82)^x\). For \(x = 8\), use the unrounded line: \(\ln y = 0.6(8) + 1.3 = 6.1\), so \(y = e^{6.1} = 445.9\ldots\)

Answer: \(y = 3.67(1.82)^x\); about 446 thousand bacteria at 8 hours.

Example 2 The daily energy use \(R\) (in megajoules) of two mammals is measured: a mammal of mass 16 kg uses 40 MJ and one of mass 81 kg uses 135 MJ. It is thought that \(R = aM^n\). (a) Show how to linearise the model. (b) Find \(a\) and \(n\). (c) Predict \(R\) for a mass of 256 kg.

(a) Taking logarithms: \(\ln R = \ln a + n\ln M\). A graph of \(\ln R\) against \(\ln M\) is a straight line with gradient \(n\) and intercept \(\ln a\).

(b) The two points are \((\ln 16, \ln 40)\) and \((\ln 81, \ln 135)\), which are \((2.7726, 3.6889)\) and \((4.3944, 4.9053)\).

Gradient \(n = \dfrac{4.9053 - 3.6889}{4.3944 - 2.7726} = \dfrac{1.2164}{1.6219} = 0.7500\ldots\)

Intercept: \(\ln a = 3.6889 - 0.75(2.7726) = 1.6094\ldots\), so \(a = e^{1.6094} = 5.00\).

The model is \(R = 5M^{0.75}\).

(c) \(R = 5 \times 256^{0.75} = 5 \times 64 = 320\).

Answer: \(a = 5.00\), \(n = 0.750\); \(R = 320\) MJ.

Example 3 The magnitude of an earthquake is given by \(M = \log_{10} A\), where \(A\) is the largest ground movement in micrometres on a standard instrument. (a) Compare the ground movement for magnitudes 6.3 and 4.8. (b) Find \(A\) for \(M = 5.2\).

(a) The difference in magnitude is \(6.3 - 4.8 = 1.5\). A rise of 1.5 on a base-10 scale multiplies \(A\) by \(10^{1.5} = 31.6\ldots\)

Check with the definition: \(\dfrac{A_1}{A_2} = \dfrac{10^{6.3}}{10^{4.8}} = 10^{1.5}\).

(b) \(A = 10^{5.2} = 158\,489\ldots\) micrometres.

Answer: (a) about 31.6 times larger; (b) \(A = 1.58 \times 10^5\) micrometres.

Common errors

  • Plotting \(\ln y\) against \(\ln x\) for an exponential model, or \(\ln y\) against \(x\) for a power model. Match the graph to the model.
  • Reporting the intercept as \(a\) instead of \(e^{\text{intercept}}\), or the gradient as \(b\) instead of \(e^{\text{gradient}}\) in the exponential case.
  • Thinking a rise of 1 on a log scale means "10 more". It means 10 times as much.
  • Rounding the gradient and intercept early and then getting a noticeably different prediction.
  • Mixing bases, for example taking \(\log_{10}\) of the data but converting back with \(e\).

Exam tip: Write the linearised equation next to the standard straight-line form \(Y = mX + c\) and identify \(Y\), \(X\), \(m\) and \(c\) explicitly. This makes the conversion back to \(a\) and \(b\) or \(n\) easy to follow.

Check yourself

  1. Write \(y = 3(2)^x\) in linear form. State the gradient and intercept of the graph of \(\ln y\) against \(x\).
    Answer\(\ln y = \ln 3 + x\ln 2\). The gradient is \(\ln 2 = 0.693\) and the intercept is \(\ln 3 = 1.10\).
  2. For \(y = 5x^3\), what is plotted to get a straight line, and what are the gradient and intercept?
    Answer\(\ln y = \ln 5 + 3\ln x\). Plot \(\ln y\) against \(\ln x\). The gradient is 3 and the intercept is \(\ln 5 = 1.61\).
  3. A semi-log graph of \(\ln y\) against \(x\) is the line \(\ln y = 0.2x + 4\). Find \(y\) when \(x = 10\).
    Answer\(\ln y = 0.2(10) + 4 = 6\), so \(y = e^6 = 403\).
  4. Two earthquakes have magnitudes 7.1 and 5.1 on a base-10 scale. How many times larger is the ground movement of the first?
    AnswerThe difference is 2, so the ratio is \(10^2 = 100\). The first is 100 times larger.