A set of ordered pairs is a function when no two pairs share the same first coordinate (x-value) with different second coordinates (y-values). Check the x-values only: if each input appears exactly once, the relation is a function. If any x-value repeats with a different y attached, it fails. That single rule settles nearly every problem you'll see on a worksheet or exam.

The Definition That Does All the Work

The formal definition of a function is a rule that assigns each input in the domain exactly one output in the range. That word "exactly" carries the whole test. The x-coordinate is the input; the y-coordinate is the output. One input producing one output is fine, one input producing two different outputs breaks the definition immediately, and many inputs producing the same output is still perfectly legal.

This is why you scan the x-column and ignore the y-column almost entirely. A repeated y-value like (2, 5) and (7, 5) is not a problem β€” two different students can score the same grade, two different days can hit the same temperature. A repeated x-value like (3, 4) and (3, 9) is fatal, because input 3 now answers to two outputs with no rule deciding which is correct.

The convention in most U.S. curricula, including the Common Core standards that shaped Algebra I sequencing, is that the first element of the pair is the input. Some textbooks phrase it as "the set of first components must not repeat." Same test, different packaging.

One boundary matters here. The x-value test applies to relations given as finite lists of pairs. If you're handed a graph, table, or equation instead, the underlying principle is identical, but the way you hunt for repeats changes. We'll come back to that.

The X-Value Scan, Step by Step

Here's the procedure in the order you actually perform it at a desk with a pencil.

1: Rewrite the set as a two-column table with x in the left column and y in the right, keeping every pair on its own row. 2: List the x-values separately in a fresh column, in the order they appear. 3: Sort that x-list from smallest to largest (or alphabetically, if the inputs aren't numbers). 4: Compare each neighboring pair in the sorted list. Any two identical entries are a flag. 5: For each flagged x-value, pull out the y-values attached to it and compare them. Different y-values mean the relation is not a function. 6: If every repeated x-value carries the same y-value, the set is a function β€” the duplicate pair is just redundant. 7: Confirm by counting: number of distinct x-values equals number of rows means a clean pass.

The failure handling is in steps 5 and 6, and it's where most students slip. A repeated pair like (4, 1) appearing twice in a set of eight pairs looks like a repeat on the x-scan, but (4, 1) and (4, 1) are the same point listed twice. That's a function. The test is not "no x repeats"; it's "no x maps to two different y's." Rewrite step 6 as your personal mantra and you'll stop losing points on it.

Three Worked Examples: One Pass, One Fail, One Trick

Work the same problem three ways and the rule sticks.

Set A: {(1, 2), (3, 5), (4, 2), (6, 8), (7, 1)}. X-values are 1, 3, 4, 6, 7 β€” all distinct. Y-value 2 appears twice, attached to x = 1 and x = 4. That's allowed. Set A is a function.

Set B: {(βˆ’2, 0), (0, 3), (1, 4), (1, βˆ’4), (5, 7)}. X-values are βˆ’2, 0, 1, 1, 5. The x-value 1 maps to both 4 and βˆ’4. Two outputs for one input means Set B fails. This is the classic symmetric pair β€” students see the neat y = 4 and y = βˆ’4 values and assume symmetry implies a function. It doesn't.

Set C: {(2, 3), (5, 9), (2, 3), (8, 0)}. X = 2 repeats, but both instances pair with y = 3. Listing the same ordered pair twice doesn't violate anything. Set C is a function, and the duplicate is cosmetic.

For a quick cross-check after you've decided, sketch the points on a coordinate plane. A function's points will never stack vertically at the same x. Set B has a vertical stack at x = 1, and that picture is exactly what the vertical line test detects on a graph.

Reading a Function Check Off a Table or Mapping Diagram

When the relation arrives as a table with x in one column and y in the other, the scan is the same but the layout can hide the repeat. A table sorted by y-value instead of x-value is a trap some worksheets use deliberately. Re-sort by x before deciding anything.

A mapping diagram β€” ovals of x-values on the left, ovals of y-values on the right, arrows drawn between them β€” makes the rule visible at a glance. Count the arrows leaving each x-oval. One arrow leaving every input means a function. Two arrows leaving the same input means it isn't. A mapping diagram with an input that has no arrow at all is still a function, just one whose domain is smaller than the full oval suggests.

For infinite relations given by an equation, the domain is usually all real numbers unless a squared term, a fraction, or a square root restricts it. A student who learns to say "usually all reals" will get tripped by xΒ² on the next page. The relation y = xΒ² is a function because each input squares to one value. The relation x = yΒ² is not, because x = 4 comes from both y = 2 and y = βˆ’2. Same two variables, reversed roles, opposite verdicts β€” and the standard example in most algebra textbooks.

Graph-Test Equivalents When You're Given a Picture Instead of a List

The vertical line test is the graph version of the x-value scan. Drag an imaginary vertical line across the coordinate plane. If it ever touches the curve at two or more points, the relation fails. Each of those touch points shares the same x but different y's, which is a repeat with conflicting outputs. If every vertical line touches at most once, the relation is a function.

The test fails for two graphic shapes that students memorize incorrectly. A circle fails everywhere except its leftmost and rightmost points, because a vertical line through the interior crosses twice. An ellipse is the same restricted circle, so only a degenerate ellipse (a vertical or horizontal segment) can pass. A parabola opening up or down passes; one opening left or right fails.

For a table check on your graphing calculator, plot the points in the stat list and use the table view β€” a vertical scan shows the same issue. Version differences here are cosmetic; the TI-84 family and the NumWorks both offer an x-y table view that makes duplicate x's easy to spot by eye. Note the older TI-83 will not detect duplicates in a list automatically, so sorting by x first is still your move.

How a Function Check Changes When You Use Interval Notation

A relation's domain and range are separate questions from "is it a function," and exam questions often combine them. If you've verified a function, the domain is the set of every distinct x-value and the range is the set of every distinct y-value. Write both in set notation on a paper homework; use interval notation on a calculator-savvy exam when the relation is an inequality or a continuous equation.

For Set A above, domain = {1, 3, 4, 6, 7}, range = {1, 2, 5, 8}. Notice that y = 2 was written once in range, not twice despite appearing in two pairs. Range lists distinct outputs; multiplicitous outputs are still one value.

For a relation defined by a formula, the domain is the set of x's that don't break the expression. A square root requires a non-negative radicand β€” that's a domain restriction, not a function-test failure. A fraction with x in the denominator excludes the zero of the denominator. A function that passes the x-scan can still fail on domain grounds only if the problem prohibits certain inputs. That distinction catches students who conflate "not a function" with "not defined there."

Where Sets of Ordered Pairs Show Up on Real Tests

SAT and ACT math sections use this exact task in two flavors. The straightforward flavor lists five or six pairs and asks whether the relation is a function, with the repeat hidden in the middle of the list. The harder flavor lists pairs in mixed order and asks how many pairs would need to be deleted before the set qualifies. The number you're looking for is the count of offending x-values minus one, per x β€” you keep the first pair for each repeated input and drop the rest.

State standardized tests follow the Common Core math standards, which introduce functions in eighth grade and return to them in Algebra I and Algebra II. The wording most likely on a test: "Determine whether the relation is a function. Explain your reasoning." Full credit usually requires stating the x-value that repeats and the two y-values attached, not just "yes" or "no."

For students studying precalculus, the same test reappears as "is the inverse a function?" The inverse of a relation fails the function check exactly when the original relation's y-values repeat. This is why y = xΒ² has no inverse function β€” y = 4 comes from both x = 2 and x = βˆ’2, so the inverse maps 4 to two x's.

Four Mistakes That Cost Points, Ranked by Frequency

The most common error is assuming that a function's y-values must also be unique. That belief produces wrong answers on any set with a repeated output, which is roughly a third of textbook exercises. The y-column has no bearing on the function test.

The second most common mistake is calling a set a function because the pairs are written in increasing x-order. Sorted input is a stylistic choice, not a mathematical property. Unsorted sets with repeats still fail.

Third: confusing "the relation is not a function" with "the relation has no meaning." A failing relation is still a relation; it just isn't a function. State the verdict precisely.

Fourth: forgetting that a repeat must have a different y. Two identical pairs listed twice are a function. Students trained by a mnemonic like "no x repeats" get caught by a worksheet designed to test that exact edge, and the cost is a point per question on a typical 40-point quiz β€” roughly two and a half percent of the final grade, sustained over the unit.

When a Relation Fails: Interpreting What the Failure Actually Means

A relation that fails the function test is not "wrong" or "invalid." It's a perfectly well-defined collection of paired data that simply doesn't meet the function contract. Temperature readings recorded twice per day can fail β€” the same hour reading with two different temperatures on two separate days, if the data set uses hour-of-day as the x-value. That's a real data-collection issue, and the analyst's job is to decide whether to average the two readings, split the day into AM/PM, or drop the second reading. The test flags the structural problem; the interpretation is context-specific.

A surprisingly common failure case on exams: the set is given with x-values as letters, not numbers. It's still a function if the letters are unique, and the range is the set of y-values corresponding to each letter. The letter set fails only if a letter appears twice with different y's. The letter values have no ordering or magnitude, and that surprises students who expect the domain to be a set of numbers.

If you're writing code to classify these relations, the cheapest approach is a dictionary keyed by x that records the first y seen, then flags a mismatch on subsequent hits. That's O(n) in the number of pairs β€” for a 500-pair data set, the check runs in milliseconds on any phone. Python doesn't ship a built-in for this, so the ten-line script is standard practice in a statistics course. If a mismatch matters for downstream analysis, name it, not just its existence.

FAQ

Can a function have repeated x-values at all?

Not with different y-values. If x = 3 appears twice, both pairs must carry the same y β€” that's a single-point match, not a repeat. A set that assigns x = 3 to both y = 5 and y = 7 fails by definition. The single exception is when the repeated pair is literally identical.

Is a vertical line a function?

No. A vertical line x = 2 has every point (2, y) for any y, so x = 2 maps to infinitely many outputs. A vertical line can pass the "every x-value on the line" view of the x-scan only if you think of it as one x with one output β€” but the y-values are unbounded, which violates the definition. Any homework that asks this expects "not a function."

What if a set has more x-values than y-values?

That's fine and doesn't affect the verdict. The relation is a function if the x-column has no conflicting duplicates, regardless of how many distinct y-values exist. A set like {(1, 2), (2, 2), (3, 2), (4, 2)} is a valid function β€” the domain is four values, the range is one. Plotting it produces four points on a horizontal line.

How does this test change on a calculator or graphing app?

The underlying rule is unchanged. On a TI-84 Plus CE, put the x-values into L1 and the y-values into L2 via 2nd β†’ STAT β†’ Edit, then sort ascending with the SortA( command found under STAT β†’ 2:SortA. Scanning L1 by eye is fast for any worksheet-sized set. Calcs from TI's later operating systems also offer a table view (2nd β†’ GRAPH), where duplicate x's appear in neighboring rows.

Does the function test change if the x-values are negative or fractions?

The verdict is identical. What changes is the sorting step β€” negative numbers sort leftmost, and fraction x-values like 1/2 and 2/4 are the same input and must be recognized as such. Rewriting fractions in simplest form before comparing is the safest move; 2/4 is the same x-value as 1/2, so a set with pairs (1/2, 3) and (2/4, 5) fails the test.

How many pairs would I need to remove to fix a failing set?

One, in the usual case β€” remove one of the two pairs sharing a repeated x. The offending x remains a valid input on the surviving pair, and every other input is untouched. For a set with two repeated x-values that each map to conflicting outputs, you need to remove two pairs. The minimum-removal question always reduces to "one deletion per conflicting input."

Could a relation be a function but not one-to-one?

Yes, and this is where the two terms get confused. A function passes the x-scan (each input, one output). One-to-one functions additionally require each output to come from only one input β€” the horizontal line test. A function like {(1, 2), (2, 2), (3, 2)} is a function but not one-to-one because y = 2 arrives from three different x's. The common misconception is that "function" implies "one-to-one." It doesn't.

What's the quickest way to check a set on a spreadsheet?

Paste the x-column into column A and the y-column into column B, then sort by column A. Duplicates become adjacent rows, and a quick visual scan of column B at the duplicate rows confirms the verdict. This works the same in Google Sheets and Excel β€” sort is under the Data menu in both. For large data sets, a COUNTIF on the x-column flags any entry appearing more than once.