Types of functions and their graphs

Open a maths exam on functions and the same handful of "shapes" appear again and again: a flat line, a diagonal line, a smooth curve, a V, a staircase, a curve that never touches an axis. Rather than treating every formula as a brand-new mystery, this topic gives you nine named real-valued functions — constant, identity, polynomial, rational, modulus, signum, exponential, logarithmic, and greatest integer — each with a fixed formula, a fixed graph shape, and a domain and range you should be able to state on sight. Once you recognise which family a formula belongs to, its domain, range and graph follow almost automatically, without redrawing anything from scratch. This article builds that recognition, derives the piecewise rule that governs the trickiest of these graphs — the modulus function — and works through evaluating the fussiest cases: negative and fractional inputs to the greatest integer and signum functions, which is exactly where marks are lost.

The core insight

Each of the nine named real functions is a fixed formula with a fixed graph shape, and recognising the family instantly tells you its domain and range without needing to plot a single point.

The core idea

Every function below is a rule f:R→Rf : \mathbb{R} \to \mathbb{R}, or to a suitable subset of R\mathbb{R}, given by one specific formula. Learning the family means learning the formula, the domain, the range, and the shape together, as one package.

Straight-line shapes. The constant function f(x)=cf(x) = c is a horizontal line at height cc, with range {c}\{c\}. The identity function f(x)=xf(x) = x is the 45°45° line through the origin, with domain == range =R= \mathbb{R}. Both are polynomial functions of degree 00 and 11 respectively.

Polynomial and rational functions. A polynomial function has the general form

f(x)=a0+a1x+a2x2+⋯+anxnf(x) = a_0 + a_1x + a_2x^2 + \cdots + a_nx^n

where: a0,a1,…,an∈Ra_0, a_1, \ldots, a_n \in \mathbb{R} are fixed coefficients and nn is a non-negative integer (the degree). Its domain is always R\mathbb{R}; the range depends on the degree — for example f(x)=x2f(x) = x^2 has range [0,∞)[0, \infty). A rational function is one polynomial divided by another, f(x)=g(x)/h(x)f(x) = g(x)/h(x), and its domain is R\mathbb{R} minus wherever the denominator h(x)h(x) vanishes — the numerator's zeros are irrelevant to the domain.

Piecewise shapes. The modulus function f(x)=∣x∣f(x) = |x| and the signum function (which reports only the sign of xx, as 11, 00, or −1-1) are both defined by cases rather than a single algebraic expression, which is exactly why students find them harder to evaluate quickly — see the derivation below for the modulus function's rule.

Curves that hug an axis. The exponential function f(x)=axf(x) = a^x (with a>0a>0, a≠1a \neq 1) has range (0,∞)(0,\infty): it gets arbitrarily close to the xx-axis but never touches it, rising for a>1a>1 and falling toward 00 for 0<a<10<a<1. The logarithmic function f(x)=log⁡axf(x) = \log_a x is its mirror image in the line y=xy=x: domain (0,∞)(0,\infty), range R\mathbb{R}, defined only for positive xx.

The staircase. The greatest integer function f(x)=[x]f(x) = [x] rounds down to the largest integer not exceeding xx, giving domain R\mathbb{R} and range Z\mathbb{Z}; its graph is a staircase of unit-length steps, each step's left end included and right end excluded.

Figure
Four small graph panels showing the V shape of the modulus function, the two-level shape of the signum function, the rising curve of an exponential function, and the staircase shape of the greatest integer function
Four named function shapes, recognised on sight modulus f(x) = |x| signum f(x) exponential f(x) = a^x greatest integer f(x) = [x]
Derivation ADeriving the piecewise rule for the shifted modulus function

The goal is to derive, from the basic definition of the modulus function, the general piecewise formula for f(x)=∣x−a∣f(x) = |x - a| for any fixed real number aa, which is the single formula behind nearly every modulus graph you will be asked to sketch or evaluate in this chapter, including the shifted V-shapes that trip students up when the vertex is not at the origin.

Step 1. Start from the basic definition of the modulus of any real quantity tt: ∣t∣=t|t| = t when t≥0t \geq 0, and ∣t∣=−t|t| = -t when t<0t < 0. This is the only rule that needs to be remembered; everything else is substitution.

Step 2. Substitute t=x−at = x - a into that definition. The condition t≥0t \geq 0 becomes x−a≥0x - a \geq 0, which rearranges to x≥ax \geq a; the condition t<0t < 0 becomes x−a<0x - a < 0, which rearranges to x<ax < a. So the two cases of the modulus definition translate directly into two cases on xx, split at the single point x=ax = a.

Step 3. Write out f(x)f(x) in each case. For x≥ax \geq a, f(x)=t=x−af(x) = t = x - a. For x<ax < a, f(x)=−t=−(x−a)=a−xf(x) = -t = -(x-a) = a - x. Combining these gives the general rule

f(x)=∣x−a∣={x−a,x≥aa−x,x<af(x) = |x-a| = \begin{cases} x-a, & x \geq a \\ a-x, & x < a \end{cases}

where: aa is the fixed real number the graph is centred on (the vertex location), and xx is the input variable.

Step 4. Read off the shape. Both branches are straight lines meeting exactly at x=ax = a, where f(a)=0f(a) = 0; the right branch has slope +1+1 and the left branch has slope −1-1, so the graph is always a V with its vertex at the point (a,0)(a, 0), regardless of what aa is. Setting a=0a=0 recovers the plain modulus function ∣x∣|x| used earlier, confirming the general rule matches the basic case.

Worked example

Using the derived rule with a=2a = 2, this extends the Pass-1 example f(x)=∣x−2∣f(x) = |x-2|: state f(x)f(x) in piecewise form, then solve the equation ∣x−2∣=3|x-2| = 3 for all values of xx.

Step 1. Apply the derived formula with a=2a=2: f(x)=∣x−2∣={x−2,x≥22−x,x<2f(x) = |x-2| = \begin{cases} x-2, & x \geq 2 \\ 2-x, & x < 2 \end{cases}, a V with vertex at (2,0)(2,0), matching the graph already described in Pass-1.

Step 2. To solve ∣x−2∣=3|x-2| = 3, use both branches, since either one could equal 33. On the branch x≥2x \geq 2: x−2=3⇒x=5x - 2 = 3 \Rightarrow x = 5. Check 5≥25 \geq 2, so this root is valid on this branch.

Step 3. On the branch x<2x < 2: 2−x=3⇒x=−12 - x = 3 \Rightarrow x = -1. Check −1<2-1 < 2, so this root is valid on this branch too.

Step 4. Verify both directly in the original equation: ∣5−2∣=∣3∣=3|5-2| = |3| = 3 ✓ and ∣−1−2∣=∣−3∣=3|-1-2| = |-3| = 3 ✓. The equation ∣x−2∣=3|x-2| = 3 has two solutions: x=5x = 5 and x=−1x = -1 — geometrically, the two points on the V-shaped graph at height 33.

Competitive stretch

The same branches solve the inequality ∣x−2∣<3|x-2| < 3: on x≥2x \geq 2, x−2<3⇒x<5x - 2 < 3 \Rightarrow x < 5; on x<2x < 2, 2−x<3⇒x>−12 - x < 3 \Rightarrow x > -1. Combining both pieces gives −1<x<5-1 < x < 5, the interval where the V-graph lies below height 33.

Common traps

  • Rounding instead of flooring. [x][x] always rounds down toward −∞-\infty, so [−2.1]=−3[-2.1] = -3, not −2-2 — a frequent slip on negative inputs.
  • Assuming signum is undefined at 00. The formula ∣x∣/x|x|/x suggests division by zero, but the syllabus's piecewise definition fixes f(0)=0f(0) = 0 exactly.
  • Forgetting a≠1a \neq 1 for exponential and logarithmic functions. If a=1a = 1, axa^x collapses to the constant function 11, which has no valid logarithmic partner.
  • Solving ∣x−a∣=k|x-a|=k using only one branch. Both branches must be checked, since a modulus equation with k>0k>0 generally has two valid roots, as in the worked example above.

Ask the tutor: Want more practice evaluating the greatest integer and signum functions at tricky negative or fractional inputs, or solving modulus equations with two branches? Ask the AI tutor to walk through additional examples with you.

Why does the greatest integer function round down for negative numbers instead of just dropping the decimal part?

Because [x][x] is defined as the greatest integer that does not exceed xx, not as truncation. For a positive number like 3.83.8, dropping the decimal and rounding down happen to give the same answer, 33. But for −2.1-2.1, the integers not exceeding it are …,−4,−3\ldots, -4, -3, and the greatest of these is −3-3 — dropping the decimal would wrongly suggest −2-2, which is actually greater than −2.1-2.1 and so does not satisfy "not exceeding." Always picture the number line and ask which integer sits at or just below the point.

How is the modulus function different from just removing the negative sign?

"Removing the negative sign" is really the piecewise rule in disguise: for x≥0x \geq 0 the modulus keeps xx unchanged, and for x<0x < 0 it multiplies by −1-1 to flip the sign, which is exactly what "removing the negative sign" describes for negative inputs. The piecewise definition is the rigorous version of that intuition, and it is essential once you shift the function, as in ∣x−a∣|x-a|, because then you cannot just eyeball the sign — you must apply the two-case rule at the shifted vertex x=ax=a, as derived above.

Do I need to memorise separate graphs for every rational function, or is there a shortcut?

At this syllabus level, you are only expected to identify that a given formula is a rational function (a ratio of two polynomials) and state its domain by excluding the denominator's zeros — you are not expected to sketch every possible rational graph from scratch. Focus your graph-sketching effort on the other eight named functions instead, since those are the ones with a single fixed shape you are expected to draw or recognise on sight; rational functions beyond the very simplest cases go beyond this chapter's scope.

Before this

Where this leads