Calculator form
Example data table
| Example relation | Declared domain | Declared codomain | Function result | Why it matters |
|---|---|---|---|---|
| {(1,2), (2,3), (3,4)} | {1,2,3} | {2,3,4} | Bijective | Each input has one unique output, and every codomain value is used. |
| {(1,2), (1,3), (2,4)} | {1,2} | {2,3,4} | Not a function | Input 1 points to two different outputs. |
| {(1,2), (2,2), (3,4)} | {1,2,3} | {2,4,5} | Many-to-one function | Two different inputs share output 2, so it is not injective. |
| {(a,x), (b,y)} | {a,b,c} | {x,y,z} | Partial on domain | Input c is declared but missing a mapped output. |
Formula used
Relation definition
A relation is a subset R ⊆ A × B. Each ordered pair (x, y) links one input from A to one output from B.
Function test
R is a function when every input has at most one output: |{y : (x,y) ∈ R}| ≤ 1 for each input x.
Injective check
The function is injective when shared outputs force equal inputs: if f(x₁)=f(x₂), then x₁=x₂. No output may belong to two different inputs.
Surjective check
The function is onto a declared codomain B when every b ∈ B has at least one input with f(a)=b.
Bijective check
A function is bijective when it is both injective and surjective. That means every output is used once and only once.
Total-domain check
If you declare a domain, every listed input should appear in the relation. Missing declared inputs create a partial function on that domain.
How to use this calculator
- Enter the relation pairs in ordered-pair form, line form, or arrow form.
- Add a declared domain when you want to verify missing inputs.
- Add a declared codomain when you want to test onto behavior.
- Choose whether to remove duplicate pairs and whether the domain must be total.
- Submit the form to see the classification, metrics, conflict tables, and graph.
- Use the CSV or PDF buttons to export the checked relation and summary.
FAQs
1. What makes a relation a function?
A relation is a function when each input is assigned to only one output. The same ordered pair may repeat, but one input cannot point to two different outputs.
2. Can different inputs share one output?
Yes. That pattern is many-to-one, and it can still be a valid function. It only stops being injective because two or more inputs reuse the same output.
3. Why should I enter a domain and codomain?
They let the calculator test stronger rules. A declared domain helps check missing mappings, while a declared codomain allows onto and bijection analysis.
4. What happens if the same pair appears twice?
Exact duplicates do not change the mapping itself. With deduplication enabled, they are removed before checking so the relation summary stays cleaner.
5. Is every function one-to-one?
No. A function can be many-to-one. One-to-one means different inputs must produce different outputs, which is stricter than the basic function rule.
6. What does onto mean here?
Onto means every declared codomain element appears in the actual range. If a codomain value is never reached, the function is not surjective.
7. What if an output is outside the codomain?
The relation may still satisfy the core function rule, but it does not fit as a function from the declared domain to the declared codomain.
8. Which input formats are accepted?
You can enter ordered pairs like (a,b), one pair per line like a,b, or arrow forms like a->b and a=>b for quick parsing.