Unit 3 Lesson 2

Even and odd functions

Two kinds of symmetry that real functions can display: evenness (the graph is mirrored across the y-axis) and oddness (the graph is rotated by 180° about the origin). We give the algebraic definitions, see the geometric consequences, and prepare the language we will need for trigonometry.

Learning Objectives

  • State the conditions for a function to be even or odd, including the requirement on the domain.
  • Decide algebraically whether a given function is even, odd, or neither.
  • Read evenness and oddness off a graph by recognising the corresponding symmetry.
  • Identify functions that are neither even nor odd (the typical case).

Motivation

Look at the parabola \(y = x^2\) from Unit 1: it is mirror-symmetric. Fold the plane along the \(y\)-axis and the two halves of the parabola line up perfectly. Replacing the input \(x\) by its opposite \(-x\) leaves the output unchanged, because \((-x)^2 = x^2\).

Other functions display a different kind of symmetry. Consider the identity function \(f(x) = x\), also from Unit 1: its graph is the line \(y = x\), and rotating that line by \(180^\circ\) about the origin takes the line back to itself. Replacing \(x\) by \(-x\) flips the sign of the output instead of preserving it: \(-x = -(x)\).

These two patterns — mirror symmetry across the \(y\)-axis, and rotational symmetry about the origin — are common enough, and useful enough, to deserve their own names: evenness and oddness, respectively. Both will reappear in trigonometry, where \(\cos\) is even and \(\sin\) is odd, and both can simplify computations whenever they are present.

Symmetric domain

Before we define evenness and oddness, we have to be able to speak about \(f(-x)\). For this we need \(-x\) to be in the domain whenever \(x\) is. A set \(D \subseteq \mathbb{R}\) is symmetric about 0 if

\[\forall x \in D, \quad -x \in D.\]

Common examples: \(\mathbb{R}\), \((-a, a)\) for any \(a > 0\), \([-a, a]\), \(\mathbb{R} \setminus \{0\}\), and any set of the form \(\{-x_1, x_1, -x_2, x_2, \ldots\}\). Non-examples: \([0, +\infty)\) (negatives are missing) and any half-line. Throughout this lesson, when we talk about even or odd functions we assume the domain is symmetric about \(0\); without that, the definitions below cannot even be stated.

Even function

Let \(f \colon D \to \mathbb{R}\) be a function with \(D \subseteq \mathbb{R}\) symmetric about 0. We say \(f\) is even if

\[\forall x \in D, \quad f(-x) = f(x).\]

In words: replacing the input by its opposite leaves the output unchanged. Geometrically, the graph is symmetric about the \(y\)-axis: if \((x, y)\) is on the graph, then so is \((-x, y)\) — the mirror image across the vertical axis.

Examples of even functions

The squaring function. \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^2\) is even: \(f(-x) = (-x)^2 = x^2 = f(x)\). The graph is the parabola from Unit 1.

The absolute value. \(g \colon \mathbb{R} \to \mathbb{R},\; g(x) = |x|\) is even: \(g(-x) = |-x| = |x| = g(x)\). The V-shape is symmetric about the \(y\)-axis.

Constant functions. Any constant function \(c \colon \mathbb{R} \to \mathbb{R},\; c(x) = k\) is even: \(c(-x) = k = c(x)\). Its graph (a horizontal line) is, trivially, symmetric about the \(y\)-axis.

x y (−1, 1) (1, 1)
\(f(x) = x^2\)
x y (−2, 2) (2, 2)
\(g(x) = |x|\)
x y (−2, 2) (2, 2)
\(c(x) = 2\)

In all three graphs, the dashed \(y\)-axis is the line of mirror symmetry: every point \((x, y)\) on the curve has its reflection \((-x, y)\) on the curve as well.

Odd function

Let \(f \colon D \to \mathbb{R}\) be a function with \(D \subseteq \mathbb{R}\) symmetric about 0. We say \(f\) is odd if

\[\forall x \in D, \quad f(-x) = -f(x).\]

In words: replacing the input by its opposite flips the sign of the output. Geometrically, the graph is symmetric about the origin: if \((x, y)\) is on the graph, then so is \((-x, -y)\) — the point obtained by rotating \((x, y)\) by \(180^\circ\) around the origin.

Examples of odd functions

The identity. The identity function \(\mathrm{id} \colon \mathbb{R} \to \mathbb{R},\; \mathrm{id}(x) = x\) is odd: \(\mathrm{id}(-x) = -x = -\mathrm{id}(x)\). The graph is the line \(y = x\), which is mapped to itself under rotation by \(180^\circ\) about the origin.

The cubing function. \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^3\) is odd: \(f(-x) = (-x)^3 = -x^3 = -f(x)\).

The reciprocal. \(h \colon \mathbb{R} \setminus \{0\} \to \mathbb{R},\; h(x) = \frac{1}{x}\) is odd: \(h(-x) = \dfrac{1}{-x} = -\dfrac{1}{x} = -h(x)\). Note that the domain excludes \(0\) — but the domain is still symmetric about \(0\) (removing a single point that is its own opposite preserves the symmetry).

x y (1, 1) (−1, −1)
\(\mathrm{id}(x) = x\)
x y (1, 1) (−1, −1)
\(f(x) = x^3\)
x y (1, 1) (−1, −1)
\(h(x) = 1/x\)

In all three graphs, every point \((x, y)\) on the curve has its rotation \((-x, -y)\) on the curve. The dashed segment through the origin connects one such pair of symmetric points.

Most functions are neither

The two definitions are restrictive. For a function to be even, the output value must depend only on \(|x|\); for it to be odd, swapping the sign of the input must exactly swap the sign of the output. Most concrete functions satisfy neither condition.

For example, \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^2 + x\) is neither even nor odd. Compute \(f(-x) = x^2 - x\). This is not equal to \(f(x) = x^2 + x\) (so not even), and not equal to \(-f(x) = -x^2 - x\) (so not odd). To verify with a single test value: \(f(1) = 2\), but \(f(-1) = 0\) and \(-f(1) = -2\) — neither agrees.

This is the typical situation. Evenness and oddness are special properties; when we have one, we should exploit it, but we should not expect it.

The function identically zero is the only function that is both

Suppose \(f \colon D \to \mathbb{R}\) is both even and odd, with \(D\) symmetric about \(0\). Then for every \(x \in D\):

\[f(-x) = f(x) \qquad \text{(even)},\]

\[f(-x) = -f(x) \qquad \text{(odd)}.\]

Combining these: \(f(x) = -f(x)\), so \(2 f(x) = 0\), hence \(f(x) = 0\). The only function that is both even and odd is the constant function \(0\). Conversely, that constant function really is both: every condition becomes \(0 = 0\).

This is a small but striking observation: most functions are neither, and the only one that satisfies both is the most boring one.

Symmetry under sums and compositions

Parity behaves predictably under arithmetic and composition. Some useful rules — easy to verify directly from the definitions:

  • Sums. Even + Even = Even. Odd + Odd = Odd. Even + Odd is generally neither.

  • Products. Even × Even = Even. Odd × Odd = Even. Even × Odd = Odd. (The "rules" mirror the parity arithmetic: even × even = even, odd × odd = even, etc., where we treat "even" as 0 and "odd" as 1.)

  • Compositions. The parity of \(f \circ g\) is determined by the parity of the inner function \(g\):

    • If \(g\) is even, then \(f \circ g\) is even, regardless of \(f\). Reason: \(g(-x) = g(x)\), so \((f \circ g)(-x) = f(g(-x)) = f(g(x)) = (f \circ g)(x)\).

    • If \(g\) is odd, then \(f \circ g\) inherits the parity of the outer function \(f\): \(f\) even \(\Rightarrow\) \(f \circ g\) even; \(f\) odd \(\Rightarrow\) \(f \circ g\) odd. Reason: \(g(-x) = -g(x)\), so \((f \circ g)(-x) = f(-g(x))\), which equals \(f(g(x))\) when \(f\) is even and \(-f(g(x))\) when \(f\) is odd.

We will use these rules occasionally to read off the parity of a new function without computing from scratch — for instance, once we know \(\sin\) is odd and \(\cos\) is even, the parity of any combination follows.

Connection to Computer Science

Knowing a function is even or odd lets a program save work. To tabulate \(f(x) = x^4 + 1\) (even) on a symmetric interval, you only need to compute the values for \(x \geq 0\) and reuse them for the negatives. For an odd function, you compute the non-negative half and store the negatives with a flipped sign. The Fast Fourier Transform — one of the most influential algorithms in computing — gets its speed in part by exploiting exactly this kind of symmetry between real and complex inputs.

Why the domain symmetry condition cannot be dropped

It might seem reasonable to call a function "even" if \(f(-x) = f(x)\) holds for every \(x\) in the domain for which \(-x\) is also in the domain. After all, the equation makes sense only when both sides are defined. But this weakening is unwise.

Consider \(f \colon [0, 1] \to \mathbb{R},\; f(x) = x^2\). The condition \(f(-x) = f(x)\) is vacuously true, because no element \(x \in [0, 1]\) has \(-x\) in the domain (except \(x = 0\), where the condition is trivial). Calling this function "even" would let any function with a one-sided domain inherit the label, which is not what we mean by symmetry.

Insisting on a symmetric domain rules this out: the property of being even requires that the condition is testable at every point in a non-trivial way. Symmetry has to live in the structure of the domain, not as a vacuous consequence of its missing parts.

Exercises

Exercise 1

For each function, decide whether it is even, odd, or neither. Assume the domain is symmetric about 0.

a)

\(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^4\).

This function is:

b)

\(g \colon \mathbb{R} \to \mathbb{R},\; g(x) = x^5\).

This function is:

c)

\(h \colon \mathbb{R} \to \mathbb{R},\; h(x) = x^2 + x\).

This function is:

d)

\(k \colon \mathbb{R} \to \mathbb{R},\; k(x) = 0\).

This function is:

Exercise 2

Use the parity of each function to compute the requested values without re-deriving.

a)

Let \(f \colon \mathbb{R} \to \mathbb{R}\) be even, with \(f(2) = 7\), \(f(5) = -3\).

b)

Let \(g \colon \mathbb{R} \to \mathbb{R}\) be odd, with \(g(3) = 4\), \(g(1) = -2\).

Exercise 3

Decide whether each statement is true or false.

a)

A function whose graph is symmetric about the \(y\)-axis must be even.

b)

If \(f\) is odd and \(0\) is in its domain, then \(f(0) = 0\).

c)

Every function \(f \colon \mathbb{R} \to \mathbb{R}\) is either even or odd.

d)

If \(f\) and \(g\) are both odd, then \(f + g\) is odd.

Exercise 4

Use the composition rules for parity.

a)

Let \(f(x) = x^2\) (even) and \(g(x) = x^3\) (odd). What is the parity of \(f \circ g\)?

\(f \circ g\) is:

Exercise 5

Let \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^4 - 3x^2 + 5\). Compute the values below and notice the pattern.

a)

Summary

  • A set \(D \subseteq \mathbb{R}\) is symmetric about \(0\) if \(x \in D \implies -x \in D\). Evenness and oddness are defined only for functions on such domains.

  • A function \(f \colon D \to \mathbb{R}\) is even if \(f(-x) = f(x)\) for all \(x \in D\). Geometrically: the graph is symmetric about the \(y\)-axis.

  • It is odd if \(f(-x) = -f(x)\) for all \(x \in D\). Geometrically: the graph is symmetric about the origin.

  • Most functions are neither. The only function that is both even and odd is the constant \(0\).

  • Reference graphs: \(x^2,\, |x|,\, k\) (constant) — even; \(x,\, x^3,\, 1/x\) — odd.