Quarry School

The logarithmic function, its domain and its graph

Subject: MathematicsLeans on: Solving a linear inequalityLeans on: Inverse graphs
Level 1 · FoundationsAbout 7 min read2 new termsKeystone idea. Later lessons build on this one.
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Quick review (2 minutes)

    In plain words

    The rule f(x) = logb x is a function: each positive input has one logarithm.

    Rule

    For b > 0 and b ≠ 1, f(x) = logb x has domain x > 0, range all real numbers, x-intercept (1, 0) and vertical asymptote x = 0. For b > 1 it rises from left to right; for 0 < b < 1 it falls. The domain of logb (g(x)) is the set of x with g(x) > 0.

    Step

    1. Find the domain: set the inside of the logarithm greater than 0 and solve.

    2. For a linear inside with a nonzero slope, such as x − h or a − x, mark the vertical asymptote where the inside equals 0: as x moves toward that line from the domain side, the inside shrinks to 0 through positive values and the logarithm grows without bound in size.

    3. Mark the point where the inside equals 1 (the logarithm there is 0, so the output is whatever is added after the logarithm) and the point where the inside equals b (the logarithm there is 1).

    4. For logb (x − h) with b > 1, draw the curve rising steeply immediately to the right of the asymptote and flattening as x grows; with 0 < b < 1 it falls instead. When the inside is a − x, the curve is the mirror image across the asymptote, so each direction reverses.

    Question

    Find the domain, the vertical asymptote and the x-intercept of f(x) = log (x + 4). In plain words: the inside must be positive; find where it is 0 and where it is 1.

    Answer

    Domain x > −4; asymptote x = −4; x-intercept (−3, 0)

    Trap

    Taking the domain as x > 0 for every logarithm. The condition is on the inside: log (x + 4) is defined for x > −4, and log (5 − x) for x < 5.

    Term

    logarithm

    Definition

    The exponent you raise a base to in order to get a number: logb x = y means by = x.

    Term

    natural logarithm

    Definition

    The logarithm with base e ≈ 2.718, written ln x.

    Term

    logarithmic function

    Definition

    A function f(x) = logb x with b > 0 and b ≠ 1, defined for x > 0; it is the inverse of bx.

    Term

    vertical asymptote

    Definition

    A vertical line x = c near which the graph's outputs grow without bound, up or down, as x moves toward c from at least one side; for y = logb x with b > 1 it is the y-axis, x = 0, where the outputs fall without bound as x moves toward 0.

    1 In plain words

    The rule f(x) = logb x is a function: each positive input has one logarithm. Its graph is the graph of y = bx flipped across the line y = x, because the logarithm undoes the power: every point (a, c) of y = bx becomes the point (c, a) of y = logb x. Picture a road map and the same map held up to a mirror placed along y = x: every landmark moves to the swapped position. So the exponential graph's horizontal asymptote y = 0 becomes the vertical asymptote x = 0, its y-intercept (0, 1) becomes the x-intercept (1, 0), and its range of positive numbers becomes the logarithm's domain, x > 0.

    2 Picture it

    −4−22468−4−22468−4−22468−4−22468
    y = log2 x (solid) and y = 2x (dashed) are mirror images across the line y = x.

    Reminder

    Reminder: Solving a linear inequality, Inverse graphs
    • Solving a linear inequality. x + 4 > 0 gives x > −4; 5 − x > 0 gives x < 5. Multiplying or dividing by a negative number turns the sign around.
    • Inverse graphs. The graph of an inverse function is the graph of the function flipped across the line y = x: (a, c) becomes (c, a).

    3 Why

    A logarithm is defined only for a positive input, so the domain of logb x is x > 0, and the domain of logb (g(x)) is every x where g(x) > 0. Every real number is a logarithm of some positive number, since logb (by) = y, so the range is all real numbers. The graph is the exponential graph flipped across y = x because the two functions undo each other: if ba = c, then logb c = a.

    4 The rule

    For b > 0 and b≠1,f(x)= logb x has domain x > 0, range all real numbers, x-intercept (1, 0) and vertical asymptote x=0.

    For b > 1 it rises from left to right; for 0 < b < 1 it falls. The domain of logb (g(x)) is the set of x with g(x) > 0.

    The same idea, other ways

    As a picture

    Draw y = log2 x. It passes (1, 0), (2, 1), (4, 2) and (12, −1), rises slowly to the right, and drops toward the y-axis without touching it as x moves toward 0.

    (1, 0)(2, 1)(4, 2)2468−4−224
    y = log2 x passes (1, 0), (2, 1) and (4, 2); the y-axis, x = 0, is its vertical asymptote.
    As a swap of a table

    y = 2x pairs x = −1, 0, 1, 2 with 12, 1, 2, 4. Swap the rows and you have y = log2 x pairing 12, 1, 2, 4 with −1, 0, 1, 2. The outputs of one are the inputs of the other.

    input xoutput log₂ x1/2−110214283
    y = log2 x: the rows of y = 2x swapped.
    With a shift

    y = log2 (x − 3) moves the graph 3 units right. Its inside must be positive, so x − 3 > 0 and the domain is x > 3. The asymptote moves too, to x = 3.

    (4, 0)(5, 1)2610−4−224
    y = log2 (x − 3): the curve moves 3 units right, and its vertical asymptote is the line x = 3.

    5 How

    1. Find the domain: set the inside of the logarithm greater than 0 and solve.
    2. For a linear inside with a nonzero slope, such as x − h or a − x, mark the vertical asymptote where the inside equals 0: as x moves toward that line from the domain side, the inside shrinks to 0 through positive values and the logarithm grows without bound in size.
    3. Mark the point where the inside equals 1 (the logarithm there is 0, so the output is whatever is added after the logarithm) and the point where the inside equals b (the logarithm there is 1).
    4. For logb (x − h) with b > 1, draw the curve rising steeply immediately to the right of the asymptote and flattening as x grows; with 0 < b < 1 it falls instead. When the inside is a − x, the curve is the mirror image across the asymptote, so each direction reverses.

    6 Worked example

    Worked example

    Domain and asymptote of a shifted logarithm

    Find the domain, the vertical asymptote and the x-intercept of f(x) = log (x + 4). In plain words: the inside must be positive; find where it is 0 and where it is 1.

    Show the steps and the answer
    1. x+4>0, so x>−4.The input of a logarithm must be positive.
    2. The vertical asymptote is x=−4.As x moves toward −4 from the right, x + 4 shrinks toward 0 through positive values and log (x + 4) falls without bound, so the graph runs down beside the line x = −4.
    3. x+4=1 gives x=−3, so the x-intercept is (−3,0).log 1 = 0, so the output is 0 where the inside is 1.
    Answer
    • Domain x > −4
    • asymptote x = −4
    • x-intercept (−3, 0)
    Double-check x + 4 > 0 exactly when x > −4; as x moves toward −4 from the right, x + 4 shrinks toward 0 through positive values and log (x + 4) falls without bound; and f(−3) = log 1 = 0, f(6) = log 10 = 1.

    Ladder: from easy to exam-hard

    Try each rung before you open its steps.

    Rung 1 of 4

    The plain domain

    What is the domain of f(x) = ln x?

    Show the steps and the answer
    1. ln x needs x > 0.The input of a logarithm must be positive.
    2. The domain is x > 0, written (0,∞).Every positive number has a natural logarithm.
    Answer
    x > 0
    Double-check ln x is defined exactly when x > 0, because the values of ey are exactly the positive numbers.

    Rung 2 of 4

    A reflected inside

    Find the domain of g(x) = log3 (5 − x).

    Show the steps and the answer
    1. 5−x>0.The inside must be positive.
    2. 5 > x, so x < 5.Add x to both sides.
    Answer
    x < 5
    Double-check 5 − x > 0 for every x < 5 and 5 − x ≤ 0 for every x ≥ 5; for example, g(4) = log3 1 = 0.

    Rung 3 of 4

    Points of a graph

    Give three points of y = log5 x.

    Show the steps and the answer
    1. y=0 at x=1.log5 1 = 0.
    2. y=1 at x=5.log5 5 = 1.
    3. y=−1 at x=15.log5 15 = −1.
    Answer
    (1,0),(5,1),(15,−1)
    Double-check 5⁰ = 1, 5¹ = 5 and 5−1 = 15.

    Rung 4 of 4

    A shifted logarithm

    For h(x) = log2 (x − 1) + 3, find the domain, the asymptote and the value at x = 9.

    Show the steps and the answer
    1. x−1>0, so x > 1.The inside must be positive.
    2. The asymptote is x=1.As x moves toward 1 from the right, x − 1 shrinks toward 0 through positive values, log2 (x − 1) falls without bound, and adding 3 keeps it falling.
    3. h(9)= log28+3=3+3=6.9−1=8=23.
    Answer
    • Domain x > 1
    • asymptote x = 1
    • h(9) = 6
    Double-check x − 1 > 0 exactly when x > 1; as x moves toward 1 from the right, log2 (x − 1) falls without bound and adding 3 keeps it falling; and 2h(9)−3 = 23 = 8 = 9 − 1.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: The domain of log2 (x − 3) is x > 0.
    At x = 2 the inside is −1, and log2 (−1) has no value.
    ✓ Instead: x − 3 > 0, so x > 3.
    ✗ Not this: The graph of y = log x crosses the y-axis at (0, 0).
    log 0 has no value, so the graph has no point with x = 0.
    ✓ Instead: It crosses the x-axis at (1, 0) and has the y-axis as its asymptote.

    Tips and tricks

    • Inside > 0 gives the domain.
    • For a linear inside with a nonzero slope, inside = 0 gives the asymptote.
    • Inside = 1 makes the logarithm 0.

    7 The trap

    Taking the domain as x > 0 for every logarithm. The condition is on the inside: log (x + 4) is defined for x > −4, and log (5 − x) for x < 5.

    Flash cards

    Say the answer out loud, then flip.

    What is the domain of logb x?
    x > 0.
    Where is the vertical asymptote of y = log (x − 2)?
    x = 2, where the inside is 0.
    Which point lies on y = logb x for every allowed base b?
    (1, 0), because logb 1 = 0.