How to graph logarithmic functions: Points, shifts, and reflections

If you can plot a few powers of 3, you already have the points you need to graph a logarithm. We’ll swap the coordinates, then see what happens when we shift and reflect the graph. The video uses a different shift and adds a vertical compression.

Start with the exponential inverse

For a base b>0 with b≠1, a logarithm tells us the exponent on that base. The same relationship can be written in two ways:

y=logb(x)⇔x=by

The inverse of y=3x is y=log3(x). Swapping the coordinates of each point reflects the exponential curve across y=x. For example, (1,3) on the exponential becomes (3,1) on the logarithm. The same idea applies to ln(x), which uses base e.

An exponential curve and its logarithmic inverseThe blue graph of y equals three to the x and the pink graph of y equals log base three of x reflect across the dashed line y equals x. The point one, three swaps to three, one.1133y = 3ˣy = log₃ xy = xxy
The point (1, 3) on the exponential becomes (3, 1) on the logarithm.

Plot a few points and mark the asymptote

It’s easiest to choose small integer values for y and use x=3y to find the matching inputs. For instance, y=-1 gives x=13.

Points on the graph of log base 3
Input xOutput y
19-2
13-1
10
31
92

Powers of 3 are positive, so the logarithm’s domain is x>0. As y decreases without bound in x=3y, x approaches zero from the right. That gives the vertical asymptote x=0. The logarithm can produce any real output, so its range is all real numbers.

The parent logarithm increases when b>1 and decreases when 0<b<1. Either way, its x-intercept is (1,0) because b0=1.

Example: Shift right, then reflect across the x-axis

f(x)=log3(x)g(x)=log3(x-1)h(x)=-log3(x-1)

Replacing x with x-1 moves each point one unit to the right. The parent’s point (3,1) moves to (4,1), and the asymptote moves from x=0 to x=1.

Multiplying the output by -1 keeps x the same and changes the sign of y, so the reflection is across the x-axis. The point (4,1) becomes (4,-1). The domain remains x>1, and (2,0) stays on both graphs because its y-coordinate is zero.

A shifted logarithmic graph and its reflection across the x-axisBoth graphs stay to the right of the dashed line x equals one. The shifted logarithm increases and passes through four, one. Its reflection decreases and passes through four, negative one. Both pass through two, zero.1246y = log₃(x − 1)y = −log₃(x − 1)x = 1xy
The reflection changes the y-values. Both graphs have vertical asymptote x = 1 and x-intercept (2, 0).

Find the new domain and asymptote from the input

For f(x)=-2ln(2x+6)-4, the input to the logarithm has to be positive. Set 2x+6>0 to find the domain, x>-3. Its boundary is the vertical asymptote x=-3. The changes outside the logarithm change the outputs, so they don’t move that boundary.