Start from
The graph of passes through (0, 1), (1, 2), (2, 4) and (3, 8), doubling its height at each step to the right. To the left it halves instead, through and , closing in on the x-axis without reaching it. Every power of 2 is positive, so the whole curve lies above the x-axis.
So takes any number x as an input, and its outputs are the positive numbers only. The logarithm to base 2 undoes it: is the power of 2 that gives x. Its graph is found from the graph of in one move.
Swapping x and y is a reflection
A function and its inverse undo each other. If sends 2 to 4, then sends 4 back to 2. So the point (2, 4) on the graph of becomes the point (4, 2) on the graph of . The input and the output change places.
Swapping the coordinates of a point reflects it in the line y = x. Take (2, 4) and (4, 2). The segment joining them has gradient (2 − 4) ÷ (4 − 2) = −1, and the line y = x has gradient 1. The product of the gradients is −1, so the segment crosses y = x at a right angle. Its midpoint is , which lies on y = x. So (4, 2) is the mirror image of (2, 4) in that line, and the same argument works for any point (a, b) and its swap (b, a).
A reflection only looks like one when the two axes have the same scale. On a stretched grid the line y = x is not at 45°, and the two curves stop looking like mirror images.
The graph of
Reflect every point of in y = x. The points , , (0, 1), (1, 2), (2, 4) and (3, 8) become , , (1, 0), (2, 1), (4, 2) and (8, 3). Each one is a logarithm fact: (8, 3) says , and says .
Read along the new curve: each time x doubles, y goes up by exactly 1. From x = 1 to 2 it rises 1, and from x = 4 to 8 it also rises only 1, over a much longer stretch. So the curve climbs more and more slowly.
The gold curve is , the white curve is , and the white straight line is y = x. The pairs (2, 4) and (4, 2), (0, 1) and (1, 0), and and are mirror images in y = x.
Every base greater than 1
The same reflection works for any base a greater than 1. Three points on come straight from the powers of a. Since , the curve passes through (1, 0). Since , it passes through (a, 1). Since , it passes through .
So every logarithm graph crosses the x-axis at x = 1. The base decides how fast it climbs after that: passes through (10, 1) and (0.1, −1), so it needs x = 10 to reach the height that reaches at x = 2. To the right of x = 1, a bigger base gives a flatter curve: its exponential climbs more steeply, and the reflection of a steeper curve is a flatter one.
The y-axis is an asymptote
No power of 2 is 0, and no power of 2 is negative. So and do not exist, and the graph has no points at all for . The domain of is x > 0.
Close to 0 the curve falls steeply. , , and of one millionth is about −19.93. Each halving of x takes the curve down by 1 more, and x can be halved forever without reaching 0. So the curve runs down alongside the y-axis without ever touching it: the y-axis is a vertical asymptote.
This is the reflection of a fact about . The x-axis is a horizontal asymptote of on the left, and reflecting in y = x turns the x-axis into the y-axis.
through , , (1, 0), (2, 1) and (4, 2). To the left of x = 1 each halving of x lowers the curve by 1, and it runs down alongside the y-axis. Nothing is drawn to the left of the y-axis.
No ceiling
To the right the curve keeps climbing, however slowly. and , so the curve reaches every height: a height h is reached at x = 2ʰ. It never levels off, so it has no horizontal asymptote. The range of is every real number, which is the domain of , just as its domain, x > 0, is the range of .
Moving the graph
Transforming Graphs gave the rules: a number added outside the function moves the graph up or down, and a number inside the bracket moves it left or right, the opposite way to its sign. For a logarithm graph, remember to move the asymptote too.
is moved 3 to the right. The input x − 3 must be positive, so the domain is x > 3, and the asymptote is the line x = 3. The landmarks move 3 right as well: (1, 0) goes to (4, 0), and (2, 1) goes to (5, 1). Check: .
is moved 2 up. The asymptote is still the y-axis, and the curve crosses the x-axis where , at . is moved 1 to the left, with the asymptote x = −1, and it passes through the origin, since .
The white curve is , through (1, 0) and (2, 1). The gold curve is , through (4, 0) and (5, 1): every point has moved 3 to the right, and its asymptote is the dashed line x = 3.
A stretch that is also a translation
A logarithm graph has one more property that other graphs do not. By the product law, . So squeezing the graph of horizontally by a factor of 8, which gives , draws exactly the same curve as moving it 3 up. Every horizontal stretch of a logarithm graph is a vertical translation.
The usual mistakes
Drawing through (0, 1). That point belongs to . Swapped, it becomes (1, 0): every logarithm graph crosses the x-axis at x = 1 and never meets the y-axis.
Reading the coordinates the wrong way round. The point (8, 3) on says : the number 8 is across, and its logarithm 3 is up. The logarithm is the power, not the number itself.
Letting the curve cross the y-axis. There is no logarithm of 0 or of a negative number, so nothing is drawn for .
Drawing the curve leveling off to a horizontal line. It climbs slowly, but it reaches every height.
Moving to the left. The input is 3 less than x, so the curve reaches each height 3 later, to the right, and its asymptote moves to x = 3.
Worked example: The Magnitude of an Earthquake from a Seismograph: A Logarithmic Graph, and the Same Graph at a More Distant Station
Question At a seismograph station 100 km from an earthquake, the magnitude of the earthquake is M = log10 A, where A micrometers is the greatest swing of the recording needle. (a) An earthquake swings the needle by 5000 micrometers at this station. Find its magnitude, to 1 decimal place. (b) At a station 300 km from an earthquake the waves have spread out further, and the magnitude is M = log10 A + 1. Describe how the graph of this function is obtained from the graph of M = log10 A, and find, to the nearest 10 micrometers, the swing of the needle that the same earthquake makes at the 300 km station.
1.On the graph of M = log10 A, each tenfold swing adds 1: log10 1000 = 3 and log10 10 000 = 4. A swing of 5000 micrometers lies between these, so its magnitude is between 3 and 4.
The graph of M = log10 A climbs 1 for every tenfold swing: log10 1000 = 3 and log10 10 000 = 4. 2.(a) log10 5000 = log10 5 + log10 1000 = 0.699 + 3 = 3.699, so the magnitude is 3.7 to 1 decimal place.
(a) log10 5000 = 0.699 + 3 = 3.699, so the magnitude is 3.7. 3.In M = log10 A + 1 the 1 is added outside the logarithm, to the output. Every point (A, M) of the first graph moves to (A, M + 1): the graph is translated 1 unit up, in the direction of the M-axis.
Adding 1 outside the logarithm moves every point of the graph 1 unit up: M = log10 A + 1 is a translation of M = log10 A. 4.The magnitude belongs to the earthquake, not to the station, so it is still 3.699 at 300 km. Solve log10 A + 1 = 3.699: log10 A = 2.699, so A = 102.699 ≈ 500. Exactly: log10 A = log10 5000 − log10 10 = log10 500.
The earthquake keeps its magnitude, 3.699. On the upper graph that height is reached at log10 A = 2.699, so A = 500. 5.(b) The new graph is the graph of M = log10 A translated 1 unit up, and the same earthquake swings the needle by 500 micrometers at the 300 km station, a tenth of the swing at 100 km. Check: log10 500 + 1 = 2.699 + 1 = 3.699.
(b) The graph is translated 1 unit up, and at 300 km the needle swings 500 micrometers, a tenth of the swing at 100 km.
Answer: (a) 3.7; (b) a translation of 1 unit up, in the direction of the M-axis; a swing of 500 micrometers
Common mistakes
- Moving the graph 1 unit sideways, as if the function were log10(A + 1). The 1 is added after the logarithm is taken, to the output, so the graph moves up. log10(A + 1) would add 1 to the input and move the graph 1 unit to the left.
- Putting the same swing of 5000 micrometers into the new formula and giving a magnitude of 4.7. One earthquake has one magnitude. The formula for the further station adds 1 to make up for the spreading of the waves, so the swing it records must be smaller: a tenth, 500 micrometers.