# Types of Functions — Complete Classification with Examples

## What is a Function?  
A **function** is a rule that assigns to every input exactly one output. Written as f(x), where x is the input and f(x) is the output.

The set of allowed inputs is the **domain**. The set of resulting outputs is the **range**. The collection that the outputs sit inside (the "target") is the **codomain**.

A useful test for whether a rule is a function: every input maps to _exactly one_ output. The vertical line test on a graph is the visual version of this rule.

## How Types of Functions are Classified  
Functions are sorted along three axes — and the same function can be classified in multiple ways at once.

| Axis | Question being asked | Types under it |  
| --- | --- | --- |  
| Mapping | How do inputs connect to outputs? | One-one, many-one, onto, into, bijection |  
| Degree | What is the highest power of x? | Constant, linear, quadratic, cubic, polynomial |  
| Concept | What mathematical family does the rule belong to? | Algebraic, trigonometric, exponential, logarithmic, and more |

We will walk through each group below, with the type-completeness covering every named function a student meets through Grade 12.

## Types of Functions Based on Mapping  
### One-one function (Injective)  
Every element of the domain maps to a _distinct_ element of the codomain. No two inputs share an output.  
Example: f(x)=2x+1.  
### Many-one function  
Two or more elements of the domain map to the _same_ element of the codomain.  
Example: f(x)=x2.  
### Onto function (Surjective)  
Every element of the codomain is hit by at least one input. The range equals the codomain.  
Example: f:R→R, f(x)=x3.  
### Into function  
At least one element of the codomain is _not_ hit. The range is strictly inside the codomain.  
Example: f:R→R, f(x)=x2.  
### Bijection (One-one and onto)  
A function that is both one-one and onto. Every input maps to a distinct output, and every output is achieved.  
Example: f(x)=x+5.

## Types of Functions Based on Degree  
Polynomial functions, sorted by their highest power.

| Type | Form | Example |  
| --- | --- | --- |  
| **Constant function** | f(x)=c | f(x)=7 |  
| **Identity function** | f(x)=x | f(x)=x |  
| **Linear function** | f(x)=ax+b | f(x)=2x+3 |  
| **Quadratic function** | f(x)=ax2+bx+c | f(x)=x2−4 |  
| **Cubic function** | f(x)=ax3+bx2+cx+d | f(x)=x3−x |  
| **Polynomial function** | f(x)=anxn+⋯+a1x+a0 | f(x)=x4−3x+1 |

The constant function is the degree-zero case; the identity is a specific linear function with slope 1 and intercept 0.

## Types of Functions Based on Math Concepts  
### Algebraic function  
A function that can be written using a finite combination of addition, subtraction, multiplication, division, powers, and roots.  
Example: f(x)=x2+1/(x−3).  
### Trigonometric function  
Functions defined from the geometry of the unit circle — sin(x), cos(x), tan(x), and their reciprocals.  
### Inverse trigonometric function  
The inverses of the trigonometric functions: sin−1(x), cos−1(x), tan−1(x).  
### Exponential function  
Example: f(x)=a^x for a positive constant a.  
### Logarithmic function  
Example: f(x)=log_a(x).

## Other Named Function Types

| Type | Definition | Example |  
| --- | --- | --- |  
| **Modulus (absolute value) function** | f(x)=|x| — output is always the non-negative version of the input | f(−3)=3 |  
| **Rational function** | A ratio of polynomials: f(x)=P(x)/Q(x) | f(x)=1/x |  
| **Signum function** | Outputs +1, 0, or -1 depending on sign of input | sgn(−5)=−1 |  
| **Even function** | f(−x)=f(x) — graph is symmetric about the y-axis | f(x)=x2 |  
| **Odd function** | f(−x)=−f(x) — graph has rotational symmetry about the origin | f(x)=x3 |  
| **Periodic function** | Repeats: f(x+T)=f(x) for some period T | f(x)=sin(x) |  
| **Greatest integer (floor) function** | Outputs the largest integer ≤ input | ⌊3.7⌋=3 |  
| **Inverse function** | Undoes the original function | f(x)=x+5 has f−1(x)=x−5 |  
| **Composite function** | Apply one function to the result of another | If f(x)=x2 and g(x)=x+1, then (f∘g)(x)=(x+1)2 |

## How Do You Classify a Function? Three Worked Examples  
### Quick example  
**Quick.** Classify f(x)=5x−2.  
- **Degree-based:** linear.  
- **Mapping-based:** one-one.  
- **Concept-based:** algebraic.

**Final answer:** linear, one-one, algebraic.

### The detour students take  
**Standard.** Is f(x)=x2 a one-one function on R?  
_Correct path._ Test for one-one: pick two different inputs and check whether their outputs match.

### Stretch example  
**Stretch.** Is f:R→R defined by f(x)=2x−3 a bijection?  
_One-one check._ If f(a)=f(b), then a=b. Different inputs give different outputs. One-one ✓.

_Onto check._ For any y in the codomain R, can we find an x with f(x)=y?  
Both conditions met.

**Final answer:** f(x)=2x−3 is a bijection on R, with inverse f−1(x)=x+3/2.

## Why Do Types of Functions Matter?  
1. **Inverses.** Only bijections have true inverses.  
2. **Solving equations.** Linear equations have one solution; quadratics have up to two; polynomial of degree n has up to n roots over the complex numbers.  
3. **Graphing.** Knowing the type tells you the shape before plotting a single point.  
4. **Calculus.** The derivative of x^n follows a power rule; the derivative of sin(x) is cos(x).  
5. **Real-world modelling.** Classification picks the model.

## The Mistakes Students Make Most Often  
1. **Confusing "function" with "one-one function."**  
2. **Forgetting the codomain matters for onto.**  
3. **Confusing even functions with odd-numbered exponents.**

## The Mathematician Who Shaped The Function Concept  
**Leonhard Euler** (1707–1783, Switzerland).

## Conclusion  
- Functions are classified along three axes: mapping, degree, and concept.  
- Mapping types track how inputs connect to outputs: one-one, many-one, onto, into, bijection.  
- Degree types track the highest power: constant, linear, quadratic, cubic, polynomial.  
- Concept families track the rule family: algebraic, trigonometric, exponential, logarithmic.

## A Practical Next Step  
1. Classify f(x)=x3+2x by degree, mapping, and concept.
2. Determine whether f(x)=3x+1 on R is a bijection, and if so, find its inverse.
3. State whether f(x)=x4−x2 is even, odd, or neither, and justify with the symmetry test.
