WHY DOES PLOTTING log y AGAINST log x GIVE A STRAIGHT LINE?
A log-log plot is straight exactly when y and x obey a power law y = kxⁿ. Taking logs of both sides gives log y = n log x + log k, which is the equation of a line whose gradient is the power n and whose vertical intercept is log k, not k.
Plotting log y against log x for a set of data gives a straight line of gradient 3 passing through (0, log 2). What is y in terms of x?
Read the straight line back as an equation in logs first, then undo the logs in one step. Do not try to interpret the gradient and intercept directly as parts of the answer.
- the line is log y = 3 log x + log 2
- 3 log x = log x3, so log y = log x3 + log 2
- log x3 + log 2 = log(2x3)
- so y = 2x3
x³ + 2 is what you get if you read the intercept as an additive constant The intercept is added to log y, not to y. Adding inside a logarithm corresponds to multiplying outside it, which is the entire point of the technique.
3x + 2 is what you get if you forget you are looking at a log-log plot and read gradient 3 and intercept 2 as though the axes were y and x. On a log-log plot the gradient is a power, never a rate.
Two shapes, two plots, and it is worth knowing both cold. If log y against log x is straight, the relationship is a power law y = kxⁿ and the gradient is n. If log y against x is straight, the relationship is exponential y = ka^x and the gradient is log a. Which axis carries the log tells you which family you are in before you do any algebra at all.
THE GENERAL RULE
Logarithms are used in this context to turn multiplication into addition and powers into multipliers, so that a curved relationship becomes a straight one you can fit by eye. When you read a log plot back, undo it in the same order: convert every multiple of a log into a power, every sum of logs into a product, and only then remove the logs from both sides.
Updated · written to the published ESAT content specification