← mapFunctions & Growth

Functions & Their Graphs

⚗ Dr. Möbius, from the lab

You spent the Sets stratum learning that a function is a specific kind of relation — a set of ordered pairs where every input has exactly one output. Now we bolt that machine onto the coordinate plane and watch the fucking thing draw itself. The graph IS the function; the curve IS the rule. They are the same object wearing two different suits, and every half-baked textbook that treats them as separate ideas has been wasting your time.

THE BIG IDEA

A function's graph is the complete picture of its input-output behavior, and every algebraic transformation of the rule corresponds to a visible geometric shift of that picture.

The reunion: set theory meets the coordinate plane

Back in the Sets stratum, you built functions from scratch. A function f:ABf: A \to B is a relation — a subset of A×BA \times B — where every aAa \in A appears as the first coordinate of exactly one pair. The "vertical line test" you may have heard about? It's literally just "single-valued" wearing graph clothing. The Federation of Boring Textbook Authors presents it as some mysterious visual ritual; it is not.

Now let A=RA = \mathbb{R} and B=RB = \mathbb{R}. The function f:RRf: \mathbb{R} \to \mathbb{R} defined by, say, f(x)=x2f(x) = x^2 is the set of all pairs {(x,x2)xR}\{(x, x^2) \mid x \in \mathbb{R}\} — and when you plot that set in the coordinate plane (the one we built as R×R\mathbb{R} \times \mathbb{R} in the Sets stratum), you get the parabola. The curve isn't an approximation of the function. It is the function, drawn. Full stop. Anyone who told you otherwise owes you an apology.

f(x) notation and reading graphs

The notation f(x)f(x) means "evaluate ff at the input xx." So f(3)f(3) is the unique output paired with 33. On a graph, it's the yy-coordinate of the point directly above x=3x = 3. That's all. There's no mystery here, only notation.

Domain and range from formulas. The domain of ff is the set of all valid inputs. For formulas built from arithmetic, three things kill inputs:

  • Division by zero: f(x)=1x2f(x) = \frac{1}{x-2} has domain R{2}\mathbb{R} \setminus \{2\}.
  • Even roots of negatives: f(x)=x3f(x) = \sqrt{x-3} needs x3x \ge 3.
  • Logarithms of non-positives (more on that in the Logarithms lesson).

The range (image) is the set of outputs actually produced — what ff earns, not what was declared. On a graph, it's the set of yy-values the curve visits.

Reading graphs. Given the graph of ff, you can extract:

  • f(a)f(a): trace vertically from x=ax = a to the curve, read the yy-value.
  • Where f(x)=0f(x) = 0: the xx-intercepts (zeros of ff).
  • Where f(x)>0f(x) > 0: intervals where the curve sits above the xx-axis.

Drag the probe below across different functions and watch f(x)f(x) update live:

function grapher
x = 1.2x^2 → 1.44abs(x) → 1.2sqrt(x) → 1.095

Transformations: shifting, stretching, flipping

Here is the single most important thing about graph transformations: every transformation is just function composition in disguise. Once you see that, you never need to memorize any of this.

Vertical shift: f(x)+kf(x) + k. Adding kk to every output shifts every point up by kk. The rule for the output changed; the input machinery is identical.

Horizontal shift: f(x+h)f(x + h). This one catches everyone. You'd think +h+h shifts right, but it shifts LEFT. Why? Because f(x+3)=0f(x + 3) = 0 when x+3x + 3 hits a zero of ff — which requires xx to be 33 units to the LEFT of where ff was zero. The graph slides in the direction opposite the sign. If it helps: f(x+h)f(x + h) replaces each input xx with the perversely shifted x+hx + h, so the zero that used to be at x=ax = a is now at x=ahx = a - h. Left for h>0h > 0, right for h<0h < 0. Infuriating? Hell yes. Wrong? Absolutely not. The math doesn't care about your feelings.

Vertical stretch: af(x)af(x). Every output multiplied by aa — stretches the graph away from the xx-axis (if a>1|a| > 1), compresses it toward (if a<1|a| < 1), and flips across the xx-axis if a<0a < 0.

Horizontal stretch: f(bx)f(bx). Similarly perverse, and similarly non-negotiable. f(2x)f(2x) compresses the graph horizontally by a factor of 22 (the same features appear at half the xx-distance). f(x/2)f(x/2) stretches it. The horizontal factor is 1/b1/b, opposite of what bb suggests. I know. I know. Write it down and move on.

Reflection f(x)f(-x) flips the graph across the yy-axis.

All of these chain. The function g(x)=2f(x1)+3g(x) = -2f(x - 1) + 3 takes ff, shifts right 1, stretches vertically by 2, flips vertically, and shifts up 3 — in that order, reading outward from xx.

Even and odd functions

A function is even if f(x)=f(x)f(-x) = f(x) for all xx in its domain. Graphically: symmetric about the yy-axis. Even functions are "indifferent to direction" — they treat xx and x-x identically. Examples: x2x^2, x|x|, cos(x)\cos(x).

A function is odd if f(x)=f(x)f(-x) = -f(x). Graphically: 180° rotational symmetry about the origin. Odd functions "flip sign with direction." Examples: x3x^3, xx, sin(x)\sin(x).

Most functions are neither, you beautiful disaster. Don't force it. Check the algebra: plug in x-x, simplify, see what you get. This is a computation, not a guess.

Piecewise functions and the flagship: |x|

A piecewise function is defined by different formulas on different pieces of the domain. The notation:

f(x)={formula1if xregion1formula2if xregion2f(x) = \begin{cases} \text{formula}_1 & \text{if } x \in \text{region}_1 \\ \text{formula}_2 & \text{if } x \in \text{region}_2 \end{cases}

is nothing exotic — it's just a function where the rule depends on which piece of the domain xx lives in.

The absolute value is the flagship:

x={xif x0xif x<0|x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases}

This is the same x|x| you met in the Bedrock stratum — distance from zero — now wearing its piecewise costume so you can differentiate, integrate, and transform it in peace. The graph is the famous V-shape, with vertex at the origin.

Important: being piecewise is about the definition, not some weird property that makes a function badly behaved. The absolute value is one perfectly well-behaved function; it just needs two formulas to describe it. The lab equipment here is a beaker, not a bomb.

The big picture

Every lesson in this stratum is going to hand you a family of functions and ask: what does it look like, how does it grow, what can it do? You now have the whole apparatus — domain, range, transformations, symmetry, piecewise structure — to answer those questions for anything they throw at you. Don't waste it. Go do the damn gauntlet.

🔬 SPECIMENS (worked examples)

Worked example 1 — reading domain, range, and values from a formula

Let f(x)=1x1f(x) = \dfrac{1}{\sqrt{x - 1}}. Find the domain, evaluate f(5)f(5), and state the range.

Domain. Two things can kill the input: x1\sqrt{x-1} requires x10x - 1 \ge 0, giving x1x \ge 1; but also the denominator cannot be zero, so x10x - 1 \ne 0, i.e. x1x \ne 1. Combining: x>1x > 1. Domain =(1,)= (1, \infty).

Evaluating f(5)f(5). Plug in: f(5)=151=14=12.f(5) = \frac{1}{\sqrt{5 - 1}} = \frac{1}{\sqrt{4}} = \frac{1}{2}.

Range. On (1,)(1, \infty), as x1+x \to 1^+, x10+\sqrt{x-1} \to 0^+, so f(x)+f(x) \to +\infty. As xx \to \infty, x1\sqrt{x-1} \to \infty, so f(x)0+f(x) \to 0^+. The output decreases continuously from ++\infty down toward 00 but never reaches 00. Range =(0,)= (0, \infty).

Worked example 2 — chasing a transformation chain (don't get lost)

Starting from the graph of f(x)=x2f(x) = x^2, describe the graph of g(x)=3(x+2)2+5g(x) = -3(x + 2)^2 + 5 in terms of transformations, and identify the vertex.

Read outward from xx, step by step:

  1. f(x+2)=(x+2)2f(x+2) = (x+2)^2: horizontal shift LEFT by 22. Vertex moves from (0,0)(0,0) to (2,0)(-2, 0).
  2. 3(x+2)23(x+2)^2: vertical stretch by factor 33. Vertex unchanged at (2,0)(-2, 0); parabola narrows.
  3. 3(x+2)2-3(x+2)^2: vertical flip (multiply outputs by 1-1). Parabola opens downward. Vertex stays at (2,0)(-2, 0).
  4. 3(x+2)2+5-3(x+2)^2 + 5: vertical shift UP by 55. Vertex moves to (2,5)(-2, 5).

So g(x)g(x) is a downward-opening parabola, three times as steep as x2x^2, with vertex at (2,5)(-2, 5). Vertex confirmed: when x=2x = -2, g(2)=3(0)2+5=5g(-2) = -3(0)^2 + 5 = 5. Correct.

Worked example 3 — the even/odd trap (most functions are neither, goddamn it)

Classify each function as even, odd, or neither: (a) h(x)=x43x2h(x) = x^4 - 3x^2, (b) p(x)=x3+x2p(x) = x^3 + x^2, (c) q(x)=x34xq(x) = x^3 - 4x.

Method: compute f(x)f(-x), compare to f(x)f(x) and f(x)-f(x).

(a) h(x)=(x)43(x)2=x43x2=h(x)h(-x) = (-x)^4 - 3(-x)^2 = x^4 - 3x^2 = h(x). This equals h(x)h(x), so hh is even. The yy-axis symmetry makes sense: only even powers of xx appear.

(b) p(x)=(x)3+(x)2=x3+x2p(-x) = (-x)^3 + (-x)^2 = -x^3 + x^2. Is this p(x)=x3+x2p(x) = x^3 + x^2? No. Is it p(x)=x3x2-p(x) = -x^3 - x^2? No (the x2x^2 term has the wrong sign). So pp is neither. When a polynomial has both even and odd powers, it's almost always neither.

(c) q(x)=(x)34(x)=x3+4x=(x34x)=q(x)q(-x) = (-x)^3 - 4(-x) = -x^3 + 4x = -(x^3 - 4x) = -q(x). This equals q(x)-q(x), so qq is odd. Only odd powers of xx appear — this is the pattern for odd functions built from monomials.

☠ KNOWN HAZARDS

  • The horizontal shift trap. f(x+3)f(x+3) shifts the graph LEFT by 3, not right. The curve moves opposite the sign inside the argument. Don't fight the math — the zero moves left because f(x+3)=0f(x+3)=0 when x+3x+3 hits a zero of ff, which happens at x=zero3x = \text{zero} - 3. I know it feels backwards. It IS backwards. That's the point.

  • Confusing range with codomain. The codomain is whatever you declared; the range is what ff actually hits. For f:RRf: \mathbb{R} \to \mathbb{R} defined by f(x)=x2f(x) = x^2, the codomain is R\mathbb{R} but the range is [0,)[0, \infty). They are different, and conflating them makes bijection arguments fall apart. This mistake will haunt you all the way to the linear algebra stratum if you let it.

  • Assuming most functions are even or odd. The vast majority of functions are neither — stop assuming they are. f(x)=x2+xf(x) = x^2 + x is neither even nor odd: f(x)=x2xf(x)f(-x) = x^2 - x \ne f(x) and f(x)\ne -f(x). Check the damn algebra.

  • Forgetting domain restrictions in piecewise functions. The boundary point belongs to exactly one piece — the \ge or << in the definition decides which. Overlap or gap at the boundary is a malformed function. A malformed function is not a function. Don't hand me a malformed function.

TL;DR

  • The graph of ff is literally the set {(x,f(x))}\{(x, f(x))\} plotted in R2\mathbb{R}^2 — the same function-as-relation object you built in the Sets stratum, now wearing coordinates.

  • Domain: the set of valid inputs (kill division-by-zero and even-roots-of-negatives). Range: the set of outputs actually produced.

  • Transformations: f(x)+kf(x)+k shifts up, f(x+h)f(x+h) shifts LEFT (counter-intuitive but forced), af(x)af(x) stretches vertically, f(bx)f(bx) compresses horizontally.

  • Even function: f(x)=f(x)f(-x) = f(x), symmetric about yy-axis. Odd function: f(x)=f(x)f(-x) = -f(x), symmetric about origin.

  • Piecewise functions use different formulas on different domain pieces; x|x| is the canonical example.

unlocks