---
tag: 0XE690QF65
kind: definition
name: Even and odd functions
msc: [26A09]
defines: 0FP31SX5EA
sources:
  - url: https://en.wikipedia.org/wiki/Even_and_odd_functions
    locator: Definition and examples
---

## Definition

Let $f \colon \mathbb{R} \to \mathbb{R}$ be a function.
The function $f$ is even if $f(-x) = f(x)$ for all $x \in \mathbb{R}$.
It is odd if $f(-x) = -f(x)$ for all $x \in \mathbb{R}$.

## Remarks

The graph of an even function is symmetric about the $y$-axis. The graph of an odd function is symmetric about the origin.
For example, $x^2$ and $\cos x$ are even, and $x^3$ and $\sin x$ are odd.
Each function splits in a unique way into an even part and an odd part: $f(x) = \frac{f(x) + f(-x)}{2} + \frac{f(x) - f(-x)}{2}$.
Leonhard Euler introduced the two notions in 1727. Mathlib defines even functions as `Function.Even`.

## Explanations

### L1 human

An even function takes the same value at $x$ and at $-x$.
An odd function takes opposite values at $x$ and at $-x$.
