Even and Odd Functions

Category: Functions   Level: 201

even: f(-x) = f(x) odd: g(-x) = -g(x)

An even function looks the same in a mirror held on the y-axis. An odd function looks the same after a half turn about the origin.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Plot an even function

Here is f(x) = x²/2 − 1. The left half looks like the right half in a mirror.

f(x) = x2/2 - 1

Step 1: Plot an even function

Step 2: Mirror on the y-axis

Pick x = 2 and x = −2. Both give 1, so the two points sit at the same height, the same distance from the y-axis. That is the mirror rule.

f(-2) = f(2) = 1

Step 2: Mirror on the y-axis

Step 3: Plot an odd function

Here is g(x) = x³/4 − x/2. Its left half is the right half flipped upside down as well as left to right.

g(x) = x3/4 - x/2

Step 3: Plot an odd function

Step 4: Half turn about the origin

Pick x = 2: g(2) = 1. Then g(−2) = −1. The segment between the two points passes through the origin, and the origin is its midpoint.

g(-2) = -g(2) = -1

Step 4: Half turn about the origin

Step 5: Check with algebra

Swap x for −x. Squares hide the sign, so f does not change. Cubes and plain x keep the sign, so g flips. Most functions are neither, and that is allowed.

f(-x) = (-x)2/2 - 1 = f(x), g(-x) = -x3/4 + x/2 = -g(x)

Step 5: Check with algebra

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render even-odd-functions --out /tmp/even-odd-functions

Source: svgmath/diagrams/function_basics.py