Relation in Maths: Definition, Types, and Worked Examples
Represent a relation using ordered pairs, rules, tables, mapping diagrams or graphs. Check its domain, range, and whether it is a function.
TL;DR
A relation in maths is a set of ordered pairs. The domain is the first coordinates used and the range is the second coordinates used. A function assigns each input exactly one output.
Key Points
- A relation from a set to a set is a subset of the Cartesian product .
- Ordered pairs have a direction. The pair places 2 first and 5 second.
- Roster notation lists pairs, while set-builder notation describes the rule that selects them.
- Repeating an input with different outputs makes a relation fail the function test.
- Symmetry and transitivity describe how a relation on a single set links its elements.
What is a relation in maths?
Pick two sets. Suppose contains the days Monday and Tuesday and contains the clubs Art and Chess. The Cartesian product lists every possible day–club pair. A weekly schedule is a relation if it selects only the pairs on which an activity actually meets.
For instance, the pairs and might both belong to the schedule. Monday has two clubs. A relation allows that. If a different rule supplies the start time of each club, and each club has exactly one start time, that rule can be a function.
In the notation , the letters mean that is related to by . This is another way to write . Empty relations are possible since the empty set is a subset of any Cartesian product. A relation can also contain every pair.
How do you represent a relation?
Take and . Set to contain the pairs for which .
| Representation | How it works for this relation |
|---|---|
| Roster form | List the pairs . |
| Set-builder notation | Write . |
| Mapping diagram | Draw one arrow from 1 to 2, one from 2 to 4, and one from 3 to 6. |
| Table | Use one column for the first coordinate and one for the second. |
| Coordinate graph | Plot , , and as separate points. |
The set restrictions in the rule matter. Drawing a continuous line would add pairs such as , which the declared sets exclude even though . Use a continuous graph only when the relation includes every point along the line or curve in the specified interval. Review the Cartesian plane if you are new to plotting points.
How do you find the domain, range, and codomain?
The domain of a relation is the set of first coordinates that actually appear. Its range is the set of second coordinates that actually appear. The codomain is the declared target set . Some texts call the source set. It can include elements that do not appear in the domain of an arbitrary relation.
If , and , the domain is and the range is . The codomain remains . Include each value only once, even when several pairs use the same coordinate. The domain and range guide explains how to read both sets from a larger graph.
How can you tell if a relation is a function?
Check each input in the stated domain. A function assigns exactly one output to each of them. Two inputs can share an output. If the problem asks for a function from all of to , every element of needs an output.
On a graph, imagine sliding a vertical line from left to right. If the line hits two distinct points, both points share the same with different values. That relation fails the vertical-line test. A horizontal line asks a different question. If a function’s graph passes the horizontal-line test, no two inputs share an output and the function is one-to-one. OpenStax, Functions and Function Notation
What are reflexive, symmetric, and transitive relations?
These properties apply when both coordinates come from the same set.
| Property | Test |
|---|---|
| Reflexive | Every element pairs with itself. |
| Symmetric | Every pair has the reverse pair . |
| Antisymmetric | If both directions exist, then . |
| Transitive | Whenever and exist, exists too. |
“Has the same number of letters as” is reflexive, symmetric, and transitive for words. Such a relation is called an equivalence relation. It divides a word list into groups by length. The relation on numbers is reflexive, antisymmetric, and transitive. The guide to relation properties shows how to check these conditions with counterexamples.
Where are relations used outside the classroom?
A database can store pairs of student IDs and class IDs to represent class registrations. One student can appear in multiple pairs and a class can have multiple students. Repeated names do not cause confusion when the IDs are distinct.
A directed graph records one-way connections. Its arrows might show which tasks must finish before others start. For example, a route map can record a one-way street from to without including the reverse pair. Reversing every pair gives the inverse relation. In the registration example, this switches a student-to-class view to a class-to-student view.
Six Worked Examples of Relations
Example 1
Let and . List the pairs that satisfy .
- Input 1 gives 2, input 2 gives 3, and input 3 gives 4.
- All outputs belong to .
- The roster is .
Example 2
Find the domain and range of .
- The first coordinates give .
- The second coordinates give after removing the duplicate 4.
- Each input has one output, so this relation is a function on its domain.
Example 3
Decide whether defines as a function of over real numbers.
- Set . Both and satisfy the equation.
- The vertical line meets the graph twice.
- Restricting to leaves , which does define a function for .
Example 4
On , a relation contains pairs whose sum is even. Find the roster.
- The two coordinates need the same parity.
- The odd values 1 and 3 give .
- The even value gives . These five pairs form a reflexive, symmetric and transitive relation.
Example 5
On , start with . Add the fewest pairs needed for transitivity.
- The pair followed by requires .
- Adding creates no further two-step chains.
- The resulting relation contains exactly three pairs.
Example 6
Reverse the pairs in .
- The inverse contains .
- Its domain is and its range is .
- The original relation is a function. The inverse is a relation with two outputs for 5.
Common Mistakes With Relations
Mistake 1: Switching the coordinates while reading a pair
In , the domain value is 3. The pair is a different statement.
Mistake 2: Treating repeated outputs as a function failure
Pairs and can coexist in a function because the inputs differ. Repeated outputs affect whether a function is one-to-one.
Mistake 3: Calling the full target set the range
First identify the target set, then mark which values actually have incoming arrows. Only those values belong to the range.
Try It Yourself
- List the domain and range of . Is it a function?
- Write the inverse relation of .
- Is “has the same last digit as” an equivalence relation on nonnegative integers?
Answers. 1. Domain and range . It fails the function test at 1. 2. . 3. Yes. Equality of last digits is reflexive, symmetric, and transitive.
Conclusion
- Write one ordered pair for each allowed match.
- Read the used first and second coordinates before comparing them with the target set.
- Check each input for one output before naming the relation a function.
Read More
Research Behind This Article
- OpenStax, Intermediate Algebra 2e: Relations and Functions. OpenStax
- OpenStax, College Algebra 2e: Functions and Function Notation. OpenStax
- Dana C. Ernst, An Introduction to Proof via Inquiry-Based Learning: Relations. LibreTexts
- OpenStax, Precalculus 2e: Domain and Range. OpenStax