Graphs of special functions

Open any Class 11 domain-range question and five shapes keep reappearing: a "V", a three-step staircase of heights, a curve that hugs an axis without touching it, its mirror twin, and a staircase that climbs forever. These are the modulus, signum, exponential, logarithmic, and greatest integer functions — not because the syllabus wants laborious point-plotting, but because recognising the shape on sight is the fastest route to reading off domain and range. Once you know that ∣x∣|x| never dips below zero, or that log⁡ax\log_a x has no graph left of the yy-axis, half the algebra in a domain-range problem evaporates before you write a single line. This article sketches each shape and proves the one structural fact — that axa^x and log⁡ax\log_a x are mirror images — tying two of the five functions together.

The core insight

Each special function has one unmistakable shape — V, three-step, one-sided-asymptotic curve, its mirror, or a rising staircase — and that shape alone hands you the domain and range without any computation.

The core idea

Modulus (absolute value) function. f(x)=∣x∣f(x) = |x|, defined as xx for x≥0x \ge 0 and −x-x for x<0x < 0, graphs as a symmetric "V" with its vertex at the origin. It never goes negative, so:

Domain=R,Range=[0,∞)\text{Domain} = \mathbb{R}, \qquad \text{Range} = [0, \infty)

where: the two straight arms have slopes +1+1 (right of the vertex) and −1-1 (left of it), meeting at a sharp corner rather than a smooth turn.

Signum function. This one is piecewise-constant, not piecewise-linear:

f(x)=sgn⁡(x)={1,x>00,x=0−1,x<0f(x) = \operatorname{sgn}(x) = \begin{cases} 1, & x > 0 \\ 0, & x = 0 \\ -1, & x < 0 \end{cases}

where: the graph is three horizontal pieces — a ray at height 11 for x>0x>0, the single point (0,0)(0,0), and a ray at height −1-1 for x<0x<0 — with open circles at (0,1)(0,1) and (0,−1)(0,-1) marking that those heights are not attained at x=0x=0. Domain R\mathbb{R}, range {−1,0,1}\{-1, 0, 1\}.

Exponential function. f(x)=axf(x) = a^x with a>0a > 0, a≠1a \ne 1, always positive since a positive base raised to any real power stays positive. It passes through (0,1)(0,1) (because a0=1a^0 = 1), and for a>1a > 1 it rises steeply as xx increases while flattening toward the xx-axis as x→−∞x \to -\infty — the xx-axis is a horizontal asymptote, a line the curve approaches but never touches. Domain R\mathbb{R}, range (0,∞)(0, \infty).

Logarithmic function. f(x)=log⁡axf(x) = \log_a x, the inverse of axa^x, passes through (1,0)(1, 0) (because log⁡a1=0\log_a 1 = 0) and exists only for x>0x > 0; as x→0+x \to 0^+ it plunges toward −∞-\infty, making the yy-axis a vertical asymptote. Domain (0,∞)(0, \infty), range R\mathbb{R} — exactly the domain and range of axa^x with the two swapped, which is the fingerprint of an inverse pair.

Greatest integer function. f(x)=[x]f(x) = [x] (also ⌊x⌋\lfloor x \rfloor) takes the largest integer not exceeding xx. On every interval [n,n+1)[n, n+1) for integer nn, the value sits constant at nn: a horizontal segment with a filled dot at its left end (n,n)(n, n) and an open circle at its right end (n+1,n)(n+1, n), then the graph jumps up by exactly 11 at the next integer. Domain R\mathbb{R}, range Z\mathbb{Z} (all integers).

Figure
A staircase graph of the greatest integer function showing horizontal steps at heights minus two minus one zero one and two with a closed dot at the left of each step and an open circle at the right
f(x) = [x] — the greatest integer "staircase" x y -2 -1 0 1 2 -202 filled dot = included, open circle = excluded, step jumps by 1 at each integer

The core idea (continued)

Two structural relationships are worth internalising rather than memorising separately. First, ∣x∣|x| and [x][x] are both "corner" functions — piecewise, non-smooth — while axa^x and log⁡ax\log_a x are smooth curves. Second, axa^x and log⁡ax\log_a x are not two unrelated shapes; they are the same curve seen from opposite directions, which is exactly what the next section proves.

Derivation AWhy the graphs of a^x and log_a x are reflections of each other in the line y = x

The goal is to show, using nothing beyond the definition of a logarithm and the definition of a reflection, that y=log⁡axy = \log_a x is always obtainable from y=axy = a^x by swapping the two axes — reflecting every point (p,q)(p, q) on one curve to (q,p)(q, p) on the other, which is precisely reflection in the line y=xy = x; this single fact is why the two curves' domains and ranges swap exactly, and why memorising one shape gives you the second for free.

Step 1. Start from the defining relationship between an exponential and a logarithm: y=log⁡axy = \log_a x means exactly the same thing as x=ayx = a^y, by the definition of log⁡a\log_a. So every point (x,y)(x, y) that lies on the graph of y=log⁡axy = \log_a x satisfies x=ayx = a^y.

Step 2. Rename the coordinates to compare with the exponential graph. The equation x=ayx = a^y says: take the point (y,x)(y, x) — first coordinate yy, second coordinate xx — and it lies on the graph of Y=aXY = a^X (writing X=yX = y, Y=xY = x), because that graph is exactly the set of points where the second coordinate equals the base raised to the power of the first coordinate.

Step 3. Compare the two points. The point (x,y)(x, y) lies on y=log⁡axy = \log_a x, and the point (y,x)(y, x) — its coordinates swapped — lies on y=axy = a^x. Swapping the coordinates of a point is precisely the geometric operation of reflecting it in the line y=xy = x (the line where the two axes are interchangeable).

Step 4. Conclude. Since every point on one graph corresponds, by a coordinate swap, to a point on the other graph, the whole curve y=log⁡axy = \log_a x is the mirror image of y=axy = a^x in the line y=xy = x. This also explains, without any further work, why (0,1)(0,1) on axa^x maps to (1,0)(1,0) on log⁡ax\log_a x, why the horizontal asymptote y=0y = 0 of axa^x becomes the vertical asymptote x=0x = 0 of log⁡ax\log_a x, and why domain and range trade places between the two functions.

Worked example

Problem. Sketch f(x)=∣x∣−2f(x) = |x| - 2 for −3≤x≤3-3 \le x \le 3, state its range over this interval, and then use the reflection idea to write down the range of g(x)=log⁡2xg(x) = \log_2 x for 14≤x≤8\tfrac{1}{4} \le x \le 8 without a separate calculation.

Step 1. f(x)=∣x∣−2f(x) = |x| - 2 is the standard "V" shifted down by 22: the vertex moves from (0,0)(0,0) to (0,−2)(0,-2), and the two arms keep slopes ±1\pm 1.

Step 2. Tabulate: f(−3)=3−2=1f(-3) = 3-2 = 1, f(−2)=0f(-2)=0, f(−1)=−1f(-1)=-1, f(0)=−2f(0)=-2, f(1)=−1f(1)=-1, f(2)=0f(2)=0, f(3)=1f(3)=1. Plotting these seven points gives two straight segments meeting at (0,−2)(0,-2), running from (−3,1)(-3,1) down to the vertex and back up to (3,1)(3,1).

Step 3. The lowest point on this restricted domain is the vertex, −2-2, and the highest points shown are the two ends, both equal to 11. So over [−3,3][-3,3],

Range of f=[−2,1]\text{Range of } f = [-2, 1]

Step 4. Now use the mirror-image fact from the derivation. g(x)=log⁡2xg(x) = \log_2 x is the reflection of y=2xy = 2^x in y=xy=x, so instead of computing logs directly we can reflect the exponential facts we already know: 2−2=142^{-2} = \tfrac14 and 23=82^3 = 8. Reflecting the points (−2,14)(-2, \tfrac14) and (3,8)(3, 8) on y=2xy=2^x swaps coordinates to give (14,−2)(\tfrac14, -2) and (8,3)(8, 3) on y=log⁡2xy = \log_2 x. Since log⁡2x\log_2 x increases steadily as xx increases (it is the mirror of an increasing curve), the range over 14≤x≤8\tfrac14 \le x \le 8 runs between these two values:

Range of g=[−2,3]\textbf{Range of } g = [-2, 3]

Competitive stretch

For h(x)=[x]+∣x∣h(x) = [x] + |x| on −2≤x<2-2 \le x < 2: at x=−1.5x = -1.5, [x]=−2[x]=-2 and ∣x∣=1.5|x|=1.5, so h(−1.5)=−0.5h(-1.5)=-0.5; at x=1.5x=1.5, [x]=1[x]=1 and ∣x∣=1.5|x|=1.5, so h(1.5)=2.5h(1.5)=2.5. Combining a staircase with a "V" gives a graph that is neither purely stepped nor purely linear — evaluate the two pieces separately before adding.

Common traps

  • Swapping which end of a greatest-integer step is open and which is closed: the left end (at the integer itself) is always closed (included), the right end is always open (excluded), since [x][x] rounds down.
  • Marking signum's graph with a solid dot at (0,1)(0,1) or (0,−1)(0,-1) — the only point actually on the graph at x=0x=0 is (0,0)(0,0); the rays approach but exclude those heights.
  • Forgetting log⁡ax\log_a x has no graph for x≤0x \le 0 — there is no reflection into the left half-plane, unlike ∣x∣|x| or [x][x] which are defined for all real xx.
  • Getting the asymptote direction of axa^x backwards: for a>1a>1 the curve hugs the xx-axis as x→−∞x \to -\infty, not as x→+∞x \to +\infty, where it instead grows without bound.

Ask the tutor: Want a quick-fire round where you're shown a bare shape and have to name the function and its domain and range on sight?

Why does the modulus function have a sharp corner instead of a smooth curve at the origin?

Because it is defined by two different straight-line rules that are stitched together: f(x)=xf(x) = x for x≥0x \ge 0 and f(x)=−xf(x) = -x for x<0x < 0. These two lines have different slopes, +1+1 and −1-1, and they only agree in value at x=0x=0 (both give 00), not in direction. Wherever two line segments of different slope meet at a shared point, the graph has a sharp corner rather than a smooth turn — there is no single well-defined slope right at x=0x=0.

Is the greatest integer function the same as simply rounding a number?

No — rounding can go up or down depending on which half of the interval a number sits in, but [x][x] always rounds down (toward −∞-\infty), regardless of how close xx is to the next integer. For example, [3.99]=3[3.99] = 3, not 44, and for negative numbers this trips people up most: [−0.3]=−1[-0.3] = -1, not 00, because −1-1 is the greatest integer that does not exceed −0.3-0.3. Always ask "which integer is at or just below this number on the number line," not "which integer is nearest."

Do I need to memorise separate shapes for a to the x and log base a of x, or is there a shortcut?

You only need to memorise one shape well — the exponential curve through (0,1)(0,1) — and the reflection fact from this article's derivation gives you the logarithmic curve for free: swap the coordinates of every key point. The point (0,1)(0,1) on axa^x becomes (1,0)(1,0) on log⁡ax\log_a x; the horizontal asymptote y=0y=0 becomes the vertical asymptote x=0x=0; and "domain all reals, range positive reals" flips to "domain positive reals, range all reals." Learning the swap is far more reliable under exam pressure than memorising two shapes independently.

Before this

Where this leads