Types of Functions in Math: Mapping, Rules, and Examples
Compare types of functions by mapping, formula, domain, and graph. Learn one-to-one, onto, even, odd, inverse and composite with examples.
TL;DR
Types of functions describe how inputs map to outputs, what a rule looks like, or how its graph behaves. Start with the domain and codomain, then test the property the problem asks about.
Key Points
- The domain contains allowed inputs, the codomain names allowed outputs, and the range contains output values the function actually reaches.
- A one-to-one function sends distinct inputs to distinct outputs, while an onto function reaches every element of its stated codomain.
- One function can belong to several types, such as a quadratic that is also polynomial, even and many-to-one on the real numbers.
- Changing the domain or codomain can change whether the same formula is one-to-one, onto or invertible.
What are the main types of functions?
A function assigns exactly one output to each input in its domain. OpenStax introduces functions by testing this condition in rules, tables and graphs. To classify one, first ask what sort of classification the question uses.
| Classification | What it checks | Examples |
|---|---|---|
| Mapping | Whether outputs repeat and whether every allowed target is reached | One-to-one, many-to-one, onto, into, bijective |
| Formula or degree | How the rule builds the output | Constant, linear, quadratic, cubic, polynomial, rational |
| Output or input restrictions | Which values a rule accepts or produces | Absolute value, step, real-valued, sequence |
| Graph behavior | Whether values reflect, repeat or preserve order | Even, odd, periodic |
| Relationship with other rules | Whether the function reverses or combines mappings | Inverse, composite |
The domain and range describe different sides of the rule. In , the domain is and the codomain is . The range is the set of actual outputs inside . Those sets matter when you decide whether the rule reaches every allowed output.
How do one-to-one, many-to-one and onto functions differ?
Check separately for repeated outputs and unused codomain values. The University of California, Davis, handout on functions uses these two independent tests to distinguish injective, surjective and bijective mappings.
| Term | Test |
|---|---|
| One-to-one, or injective | If , then . |
| Many-to-one | Two different inputs give the same output. |
| Onto, or surjective | Every element of the codomain is the output of at least one input. |
| Into | In texts using this contrast, the range is a proper subset of the codomain. |
| Bijective | Each codomain element comes from exactly one input. The function is both one-to-one and onto. |
A function can be many-to-one and onto at the same time. For example, if the codomain in the left-hand diagram contained only A and B, the arrows would reach every target even though A has two preimages. Leaving C in the codomain makes the same arrows into rather than onto.
How do you test a function from a graph?
A vertical line test checks whether a relation assigns more than one output to an input. A horizontal line test checks whether a valid function reaches the same output from more than one input. OpenStax uses both checks with plotted relations.
For injectivity, each horizontal line may meet the graph at most once. To check that the function is onto, you still need the stated codomain. Every horizontal level belonging to that codomain must meet the graph at least once.
How do you classify a function by its formula or degree?
Classify a polynomial by its highest power after simplification. Classify other formulas by how they use roots, ratios, signs, or exponents. OpenStax’s domain and range chapter illustrates the standard toolkit functions and piecewise rules.
| Family | Example | What to notice |
|---|---|---|
| Constant | Every allowed input maps to the same output. | |
| Identity | The output equals the input. | |
| Linear, degree one | The graph has a constant nonzero slope in this definition. | |
| Quadratic, degree two | The largest remaining power is two. | |
| Cubic, degree three | The largest remaining power is three. | |
| Other polynomial | The powers of are nonnegative integers. | |
| Rational | A quotient of polynomials requires a nonzero denominator. | |
| Radical | The real square-root example requires . | |
| Absolute value | The rule applies two different formulas according to the sign of . | |
| Exponential | The input appears in the exponent. | |
| Logarithmic | The input to a real logarithm must be positive. | |
| Trigonometric | The rule relates an angle input to a trig value. |
Polynomial, rational and many radical functions are algebraic. Exponential, logarithmic and trigonometric functions are common transcendental examples. Some courses write the family with included and call the resulting horizontal graph a linear function. For polynomial degree, a nonzero constant has degree zero.
The formula also suggests the possible outputs. The absolute-value and square-root functions shown here produce nonnegative real values. A greatest-integer function rounds downward to the nearest integer and produces integer values. A ceiling function rounds upward. A sign function returns , or according to whether the input is negative, zero or positive.
The domain can also determine the type. A sequence is a function whose inputs are usually an integer index such as . Its outputs might be real values, even though the inputs are discrete. A real-variable function can take a whole interval of inputs instead.
What makes a function even, odd or periodic?
Compare outputs at related inputs. OpenStax’s transformations chapter describes even and odd functions in terms of graph reflections.
- Even. If the domain is symmetric about zero and , the graph is symmetric about the y-axis.
- Odd. If the domain is symmetric about zero and , reflecting through the origin preserves the graph.
- Periodic. A positive number is a period if shifting allowed inputs by preserves the domain and throughout it.
Polynomial degree alone does not determine parity. The function has even degree, but the first-power term makes the values at and differ for most nonzero .
How do composite and inverse functions work?
A composite passes one function’s output into another function. OpenStax’s lesson on composition writes this as
The output of must be an allowed input of , so the composition can have a more limited domain. Interchanging and usually changes the result.
An inverse reverses a mapping. An inverse on the entire stated codomain is itself a function when the original mapping is bijective. If the original function is one-to-one but misses some codomain values, it has an inverse defined on its range. The OpenStax inverse-functions lessons verify this by composing in both directions. The inverse operations guide explains the idea of undoing a rule.
Examples of Types of Functions
Separate the mapping from the formula. The same expression can receive different mapping labels when you change the stated sets.
Example 1
Classify as a function from the real numbers to the real numbers.
- If , subtracting 1 and dividing by 2 gives . The function is one-to-one.
- For any real target , the input maps to that target.
- The function is onto as well, so it is bijective.
Example 2
Is bijective from the real numbers to the real numbers?
- Substituting may look like it reaches every output, but a negative target such as has no real square root.
- Also, inputs and both give , so the rule is many-to-one.
- Restrict both the domain and codomain to . Then each nonnegative target has exactly one input, , and the restricted mapping is bijective.
Example 3
Classify as a function from the real numbers to the real numbers.
- Increasing the exponent strictly increases the output, so the function is one-to-one.
- The output is always positive. Zero and negative numbers in the codomain are missed.
- This is an exponential function and an example of a one-to-one, into mapping.
Example 4
Find the natural real domain and range of .
- Exclude , since the denominator would vanish.
- Exclude from the range, since a nonzero numerator divided by a finite nonzero number cannot produce zero.
- For any nonzero , choosing gives . The range is every real number except zero.
Example 5
Decide whether is even or odd. Is it one-to-one on the real numbers?
- Substitute to get , so it is odd.
- Check , and . They all equal zero.
- The function is many-to-one. Parity and injectivity describe different properties.
Example 6
Let and . Compare with .
- Applying first gives .
- Applying first gives .
- At the results are 5 and 25, so the compositions are different functions.
Where can a function classification go wrong?
Check the actual rule and sets. A shortcut based on a graph’s appearance can answer a different classification question.
Mistake 1. Treating a many-to-one rule as an invalid function
Where it slips in
Two arrows arrive at the same target, and the shared output looks like a violation.
The tempting calculation
Rejecting because and both map to 9 confuses incoming arrows with outgoing arrows.
The correction
Check each input separately. A function requires one output per input. Distinct inputs can share an output.
Mistake 2. Calling a function onto without naming its codomain
Where it slips in
The graph shows every value in its own range, which is true of any graph.
The tempting calculation
Saying “reaches every output” ignores negative elements if the codomain is all real numbers.
The correction
Read the codomain first. With real inputs, is onto and into the full set of real numbers.
Practice with answers
- Is from real numbers to real numbers injective, onto or both?
- Is with real inputs and nonnegative-real codomain one-to-one or onto?
- Classify by polynomial degree and parity.
Check your solutions
- For any target , the unique input is . The function is both injective and onto.
- It reaches every nonnegative value, so it is onto. Opposite nonzero inputs give the same output, so it is many-to-one.
- It has degree two. Substituting gives , which is generally neither nor . The function is neither even nor odd.
Frequently Asked Questions
Can a function belong to more than one type?
Yes. Sine is a trigonometric function, an odd function, and a periodic function. A type describes the property you are currently checking.
Is every linear function one-to-one?
A function with is one-to-one. If and the domain has several inputs, the constant rule repeats the same output.
Can a function be both even and odd?
The zero function on a symmetric domain satisfies both identities. Any function that satisfies both must equal its own negative at every input and therefore be zero there.
What to Remember About Function Types
- Name the domain and codomain before applying mapping labels.
- Test for repeated outputs and unused codomain values separately.
- A formula’s family, degree and symmetry can all describe the same function.
- Check domains when composing or reversing rules.
Read More
Research Behind This Article
- OpenStax, Algebra and Trigonometry, Functions and Function Notation. OpenStax.
- University of California, Davis, ECS 20 Handout 4, Functions. UC Davis course notes.
- OpenStax, Algebra and Trigonometry, Domain and Range. OpenStax.
- OpenStax, Algebra and Trigonometry, Transformation of Functions. OpenStax.
- OpenStax, Algebra and Trigonometry, Composition of Functions. OpenStax.
- OpenStax, College Algebra with Corequisite Support 2e, Inverse Functions. OpenStax.