Calculator Inputs
Enter the domain, codomain, and mapped outputs. The output list must follow the same order as the domain list. You may separate entries with commas, semicolons, or new lines.
Example Data Table
This example shows a surjective function because every codomain value appears at least once.
| Step | Domain Element | Mapped Output | Covered Codomain Value |
|---|---|---|---|
| 1 | 1 | A | A |
| 2 | 2 | B | B |
| 3 | 3 | C | C |
| 4 | 4 | A | A |
| 5 | 5 | B | B |
| 6 | 6 | C | C |
Formula Used
Surjective criterion: A function f : A → B is surjective if every element of B is hit by at least one element of A.
Logical condition: ∀ y ∈ B, ∃ x ∈ A such that f(x) = y
Image set: Im(f) = { f(x) | x ∈ A }
Surjective test: Im(f) = B
Coverage ratio: (number of covered codomain values ÷ total codomain values) × 100
How to Use This Calculator
- Enter the function name and optional set labels.
- List all domain elements once in the first textarea.
- List all codomain values once in the second textarea.
- Enter mapped outputs in the exact order of the domain list.
- Submit the form to validate the function and test surjectivity.
- Review the result summary, coverage table, and chart.
- Download the result set as CSV or PDF when needed.
FAQs
1. What does surjective mean?
A surjective function hits every value in the codomain at least once. Another common name is an onto function.
2. Can a surjective function repeat outputs?
Yes. Several domain elements may map to the same codomain value. Surjectivity only requires full codomain coverage.
3. Does surjective also mean injective?
No. A function can be surjective without being injective. It becomes bijective only when it is both surjective and injective.
4. Why must outputs belong to the codomain?
A function from A to B must map every domain element into B. Any output outside B breaks the stated function definition.
5. What is the image of a function?
The image is the set of actual outputs produced by the function. Surjectivity happens when the image equals the codomain.
6. Why does the output count need to match domain size?
Each domain element must have exactly one mapped value. Missing or extra outputs prevent a complete function check.
7. Can I use text labels instead of numbers?
Yes. The calculator accepts letters, words, numbers, and mixed symbols, provided the entries are separated clearly.
8. What does the coverage ratio show?
It shows the percentage of codomain values reached by at least one preimage. A surjective function always has 100% coverage.