What Is the Difference Between a Relation and a Function? A Complete Overview

Oct 12, 2026 | Altadena
A group of students engaged in discussion while seated at a table in a classroom setting.

Relations and functions often show up around the same time in pre-algebra or early algebra, so it’s easy to confuse them at first.

At Mathnasium, we see this mix-up come up often because the two concepts use much of the same language and can even appear in the same kinds of diagrams and graphs. That can make them feel almost interchangeable.

But as we move into more advanced math, we need to know which one we’re looking at so that equations, graphs, patterns, and real-world relationships are easier to work with.

Today, we’ll review what relations and functions mean, then work through a few clear ways to tell them apart.

Math tutors in Altadena, CA.

Quick Review: What Is a Relation and a Function?

Before we get into what separates a relation from a function, let’s refresh what each one means on its own.

A. Relation

A relation is a set of ordered pairs that connects inputs to outputs. One input can be paired with more than one output.

Picture a class where we match each student with the clubs they belong to. Mia might be in both the chess club and the art club, while Sam might belong to only the debate club.

We can write those pairings as ordered pairs in the form (student, club):

{(Mia, Chess Club),(Mia, Art Club),(Sam, Debate Club)}.

Mia appears twice because she participates in two different clubs, so one input connects to two outputs. This means it’s a relation because the same input is paired with more than one output.

We can spot relations in plenty of other everyday situations too: 

Real-life relation Why it’s a relation
Books and the genres they belong to One book can fit more than one genre, like a novel that’s both “mystery” and “historical fiction.”
Foods and the food groups they are a part of We may include one food in more than one group. For example, cheese pizza belongs to dairy, grains, and vegetables all at once.
Students and the sports teams they play on One student might play on multiple teams across a school year.

B. Function

A function is a special type of relation where each input is paired with exactly one output. In other words, one input cannot point to two different outputs. 

Think about students and their locker numbers. Mia might have locker 14, Sam locker 22, and Priya locker 31. Each student is matched with one locker number, so no student can have two different lockers.

Let’s write those matches as ordered pairs (student, locker number):

{(Mia, 14), (Sam, 22), (Priya, 31)}.

Every input, a student, connects to exactly one output, their locker number. That single-output rule tells us that this relation is a function.

Here are a few more examples of functions in the real world:

Real-life example What makes it a function
A vending machine button and the snack it releases When we press one button, the machine gives us one specific item.
A date and the day of the week it falls on One date can fall on only one day of the week.
A student and the school ID number they use Each student has one ID number assigned to them.

Now, we can put the two ideas side by side and focus on what sets them apart.

Relation vs. Function: What’s the Difference?

The main difference between a relation and a function comes down to how inputs connect to outputs. In a function, each input connects to exactly one output, while in a relation, the same input can have more than one output.

We can also say that every function is a relation, but not every relation is a function. A relation is a broader category, which includes functions. 

Let’s make this concrete with a pair of numeric examples.

Take this set of ordered pairs:

{(1, 2), (1, 3), (2, 4)}.

Input 1 appears twice and connects to two different outputs, 2 and 3. Because the same input has more than one output, this is a relation, but not a function. 

Now compare the example to this set:

{(1, 2), (2, 4), (3, 6)}.

This time, each input, 1, 2, and 3, appears with only one output. That means the relation follows the rule for a function.

Notice that different inputs can share the same output in a function. We only need to make sure that each individual input has one output.

You can use this quick comparison table as a breakdown of the main distinction.

What to check Relation Function
How inputs and outputs pair up An input may connect to more than one output. Each input has only one output.
Can one input have two different outputs? Yes. No.
Can different inputs share the same output? Yes. Yes.
Example {(1, 2), (1, 3), (2, 4)} {(1, 2), (2, 4), (3, 6)}

We can also spot the difference between relations and functions by comparing how they appear in different formats, such as mapping diagrams and graphs. 

How to Use a Mapping Diagram to Check If a Relation Is a Function  

A mapping diagram shows inputs in one column and outputs in another, with arrows connecting each input to its corresponding output. To check if a relation is a function, we build a mapping diagram for the set of ordered pairs and look at the arrows leaving each input: 

  • If one input points to more than one output, the relation is not a function. 

  • If every input has just one arrow leading to one output, the relation is a function. 

We’ll put this into practice with this relation: 

{(1, 2), (1, 3), (2, 4)}.

  • Step 1: List the inputs, 1 and 2, in one column and the outputs, 2, 3, and 4, in another. 

  • Step 2: Draw an arrow from each input to its corresponding output: 1 → 2, 1 → 3, and 2 → 4. 

  • Step 3: Check the arrows leaving each input. Input 1 points to two different outputs, so this relation is not a function.

Mapping diagram, not a function example.

Now, walk this set through the steps:

{(1, 2), (2, 4), (3, 6)}.

  • Step 1: List the inputs, 1, 2, and 3, in one column and the outputs, 2, 4, and 6, in another. 

  • Step 2: Draw an arrow from each input to its corresponding output: 1 → 2, 2 → 4, and 3 → 6. 

  • Step 3: Check the arrows leaving each input. No input points to two different outputs, so the diagram represents a function.

Mapping diagram, function example.

📕 You May Also Like: Functions vs. Equations: What Is the Difference?

How to Tell Whether a Relation Is a Function With a Vertical Line Test

To tell whether a relation is a function using the vertical line test, we plot the relation on a coordinate plane and draw vertical lines through the graph. Then we check how many points each line crosses: 

  • When any vertical line crosses more than one point, this means that the relation is not a function.

  • When every vertical line crosses no more than one point, we know the relation is a function.

Let’s test this example: 

{(1, 2), (1, 3), (2, 4)}.

  • Step 1: Plot the ordered pairs on a coordinate plane. In our set, (1,2) and (1,3) share the same x-value, 1.

  • Step 2: Draw vertical lines through the graph. One line crosses the graph at both (1,2) and (1,3), while another crosses it at (2, 4).

  • Step 3: Check how many points each line crosses. As one vertical line crosses the graph at two points, the relation fails the vertical line test. So it is a relation, but not a function.

Vertical line test, not a function example.

We’ll do the same for this set of ordered pairs: 

{(1, 2), (2, 4), (3, 6)}.

  • Step 1: Plot the ordered pairs on a coordinate plane. In this example, each point has a different x-value. 

  • Step 2: Draw vertical lines through the graph. Each line crosses only one point. 

  • Step 3: Check how many points each line crosses. Because no vertical line hits more than one point, we can say that this graph represents a function.

Vertical line test, function example.

📕 You May Also Like: How to Prepare Your Student for Algebra: Graphs to Variables

A Complete Overview: The Difference Between a Relation and a Function

Need to jog your memory before a quiz or homework assignment? Take a look at the table below. Our tutors put it together to sum up the main clues that separate functions from other relations.

What to check Relation Function
What it means A set of ordered pairs that connects inputs to outputs. A relation where each input connects to exactly one output.
Real-life example Students paired with every club they belong to. Students paired with their assigned locker numbers.
Numerical example {(1, 2), (1, 3), (2, 4)}. {(1, 2), (2, 4), (3, 6)}.
Mapping diagram One input may have arrows pointing to more than one output. Each input has only one arrow leading to an output.
Vertical line test Vertical lines may cross the graph more than once. No vertical line hits two points at a time.

Your Turn: Is It a Relation or a Function?

For each challenge below, decide whether the relation is also a function. You can check your answers at the bottom of the page.

Challenge 1

A city’s weather station records the temperature at noon each day for a week. On Monday, it records 72°F, on Tuesday, 75°F, and on Wednesday, 71°F. Based on that pattern, does this relation also count as a function? 

Challenge 2

Consider a mapping diagram with inputs A, B, and C:

  • Input A has one arrow leading to 5.

  • Input B has two arrows, one leading to 5 and another to 8.

  • Input C has one arrow leading to 10.

Does this diagram represent a function?

Diagram illustrating the mapping process with inputs labeled A, B, and C, showing their relationships and connections.

Challenge 3

Use the vertical line test to decide whether this set of ordered pairs, {(2, 3), (2, 7), (4, 9)}, is a function.

📕 You May Also Like: 5 Ways Math Practice Impacts Brain Development + Benefits

In an office, a student shakes hands with his math tutor, accompanied by his mother standing next to him.At Mathnasium, we use a diagnostic assessment to pinpoint each child’s learning needs and help them build math mastery step by step from there.

How Mathnasium Helps Students Make Sense of Relations and Functions (and Beyond)

Mathnasium is a math-only learning center dedicated to helping K–12 students of all skill levels excel in math.

Whether students are working with ordered pairs, mapping diagrams, tables, or graphs, we help them understand how inputs connect to outputs and determine whether each input has exactly one output.

To meet students where they are and guide them forward step by step, we use the Mathnasium Method™, our proprietary teaching approach. 

Each student begins with a diagnostic assessment that helps us understand their current skill level, knowledge gaps, goals, and how they think and feel about math. 

Using these insights, we build a personalized learning plan focused on the skills the student needs most, whether that means distinguishing relations from functions, interpreting mapping diagrams, using the vertical line test, or preparing for more advanced algebra.

Our specially trained tutors follow that plan closely and provide live, face-to-face instruction in a caring and fun group environment. They use mental, verbal, visual, tactile, and written techniques to help students compare representations, trace input-output relationships, and explain why a relation does or does not qualify as a function.

Students also get room to think through problems before tutors step in. Our tutors guide them to test their ideas, check whether each input has only one output, and explain their reasoning. This helps students build critical thinking, problem-solving skills, and greater independence as they move into more advanced work with functions.

Fun is part of the approach, too. We use game-based activities, rewards, and consistent encouragement to keep students engaged as they work with relations, functions, and other algebra concepts.

The results speak for themselves:

  • 94% of parents report an improvement in their child's math skills and understanding

  • 93% of parents report their child's improved attitude toward math after attending Mathnasium

  • 90% of students saw an improvement in their school grades

With over 1,100 learning centers across North America, there is likely a Mathnasium close to you.

For families in and near Altadena, California, Mathnasium of Altadena brings that same approach close to home, with specially trained tutors who help students make sense of relations, functions, and the algebra concepts that build from them.

If your child needs support with relations, functions, or the algebra skills behind them, a free diagnostic assessment at Mathnasium of Altadena is a great place to start. Using what we learn, we create a personalized learning plan focused on the skills they need next.

📅 Schedule a Free Assessment at Mathnasium of Altadena

Not near Altadena?

📍 Find a Mathnasium Learning Center Near You

Pssst…! Check Your Answers Here

Ready to see how you did? Here are the answers to the practice problems above.

Challenge 1

This relation is a function. Each day connects to exactly one recorded temperature, so every input has just one output. 

Challenge 2

This is a relation, but not a function. Input B has two arrows leading out, to both 5 and 8, which breaks the one-output rule a function requires.

Challenge 3

This set is a relation, but not a function. If we plot these points on a coordinate plane and draw vertical lines through the graph. The line at x = 2 would cross both (2, 3) and (2, 7). So the set fails the vertical line test.

Graph illustrating the vertical line test with a relation set on it.

Visit Us at Mathnasium of Altadena

Mathnasium of Altadena is a math-only learning center for K-12 students in Altadena, CA. Trusted by over a million parents, Mathnasium uses personalized learning plans and the proprietary Mathnasium Method™ to help students catch up, keep up, and get ahead on their math journey.

Our specially trained tutors deliver face-to-face instruction in a supportive and fun small-group environment, working with students both in center and online to develop a deep understanding of math, build confidence, and improve academic performance.

Schedule Free Assessment
Loading