Which Piecewise Relation Defines a Function?

A piecewise relation defines a function when every input (x-value) produces exactly one output (y-value). In practice, this means the sub-domains of each piece cannot overlap in a way that assigns two different outputs to the same input. If you’re looking at a homework problem with multiple piecewise options, the one that qualifies as a function is the one where no x-value gets sent to more than one y-value.

The Core Rule: One Input, One Output

A piecewise function uses two or more formulas to cover different portions of the domain. Each formula handles its own interval, and the full domain is the union of all those intervals. The critical requirement is that these intervals don’t overlap in a way that creates conflicting outputs. If an x-value falls into two intervals and the two formulas give different y-values for it, the relation fails the definition of a function.

On a graph, this is the vertical line test. If you can draw a vertical line anywhere and it crosses the graph more than once, the relation is not a function. For piecewise graphs, the place to watch is the boundary between pieces. A piecewise relation passes the vertical line test at those boundaries only if one endpoint is open (excluded) and the other is closed (included), or both formulas happen to give the same y-value at the shared x-value.

How Inequality Signs Make or Break It

The difference between a piecewise function and a piecewise relation that isn’t a function often comes down to a single symbol: whether an inequality is strict (<) or inclusive (≤). Consider a relation defined as one formula for x ≤ 3 and another formula for x ≥ 3. Both pieces claim ownership of x = 3. If the two formulas produce different outputs at x = 3, that input maps to two outputs, and the relation is not a function.

Fix it by making one of those inequalities strict: use x < 3 for the first piece and x ≥ 3 for the second (or x ≤ 3 and x > 3). Now x = 3 belongs to only one piece, and there’s no conflict. As Khan Academy’s explanation puts it, if a boundary value is included in two intervals, the function “would be defined both places,” and it wouldn’t be a function anymore. The only exception is when both formulas give the exact same output at the shared point, in which case the overlap is harmless.

What to Check When Comparing Options

If you’re given several piecewise relations and asked which one is a function, here’s a systematic way to check each one:

  • Look at the boundary x-values. These are the points where one formula stops and another begins. Write down each boundary value and see whether it’s included in one piece, both pieces, or neither.
  • Test for double inclusion. If a boundary x-value is included in two pieces (both use ≤ or ≥ at that point), plug it into both formulas. If the outputs differ, that relation is not a function.
  • Check for gaps. If a boundary value is excluded from both pieces (both use strict inequalities), that x-value has no output. The relation can still be a function; it just isn’t defined at that point. Whether that matters depends on the stated domain.
  • Verify the rest of the domain. Away from the boundaries, each x-value should fall into exactly one interval. Overlapping intervals like “x < 5” and “x > 2” create a shared zone (2 < x < 5) where both formulas apply. Unless they produce identical outputs across that entire zone, the relation is not a function.

A Concrete Example

Suppose you’re comparing two piecewise relations:

Relation A: f(x) = 2x + 1 for x ≤ 4, and f(x) = x² for x ≥ 4.

Relation B: f(x) = 2x + 1 for x < 4, and f(x) = x² for x ≥ 4.

In Relation A, x = 4 is included in both pieces. The first formula gives 2(4) + 1 = 9. The second gives 4² = 16. Two different outputs for the same input, so Relation A is not a function.

In Relation B, x = 4 belongs only to the second piece (x ≥ 4), which gives 16. The first piece uses a strict inequality (x < 4), so it doesn’t claim x = 4 at all. Every input maps to exactly one output. Relation B is a function.

Jumps and Gaps Are Allowed

A common point of confusion: a piecewise function does not need to be continuous. It can have jump discontinuities, where the graph suddenly leaps from one value to another at a boundary. At x = 4 in Relation B above, the left side of the graph approaches 9 while the right side starts at 16. That’s a visible jump, and it’s perfectly fine. The function is still valid because x = 4 maps to only one value (16), even though the graph has a gap.

The vertical line test still passes at a jump discontinuity as long as only one of the endpoints is filled in (a closed dot) and the other is open. You’ll see this on graphs as a solid dot on one piece and a hollow dot on the other at the same x-value.

Why This Comes Up in Real Life

Tax brackets are a classic example of a piecewise function done correctly. In a simplified system, income up to $10,000 might be taxed at 10%, and any income above $10,000 is taxed at 20%. Written as a piecewise function, the first formula (0.10 × S) applies for S ≤ $10,000, and the second formula ($1,000 + 0.20 × (S − $10,000)) applies for S > $10,000. Each income amount produces exactly one tax bill because the boundary at $10,000 is assigned to only one piece. Phone plans, shipping rates, and parking fees all work the same way: different rules for different ranges, with no ambiguity about which rule applies at any given value.

The subdomains in a valid piecewise function are usually required to be intervals, and together they need to cover the entire intended domain. In formal terms, the intervals should form a partition of the domain, meaning they don’t overlap and they leave no gaps. That structure is what guarantees every input gets handled by exactly one formula, which is the whole point of calling it a function.