---
title: Even and Odd Functions
---
## Even and Odd Functions

### General Functions

A function `f` is a mapping from a set A (input/domain) to a set B (output/co-domain).

### Even Function:

A function `f(x)` is even if and only if `f(x) = f(-x)`.

An example of an even function would be `f(x) = x^2` because `(-x)^2 = x^2`. For example, `f(2) = 2^2 = 4 = (-2)^2 = f(-2)`.

The trigonometric functions -  `cos(x)` and `sec(x)` are also even functions

### Odd Function

A function `f(x)` is odd if and only if `f(x) = -f(-x)`

An example of an odd function would be `f(x) = x^3` because `(-x)^3 = -x^3`, so `-(-x)^3 = x^3`. For example, `f(2) = 2^3 = 8 = -(-8) = -(-2)^3 = -f(-2)`.

The trigonometric functions -  `sin(x)`, `tan(x)`,`cot(x)` and `cosec(x)` are also odd functions

#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

- [Wikipedia](https://en.wikipedia.org/wiki/Even_and_odd_functions)
