Tutorials › Linear Algebra › Even and Odd Functions as Subspaces

Vector Spaces and Subspaces · Tutorial 290 of 1000

Even and Odd Functions as Subspaces

Learn to test even and odd functions on symmetric domains and prove that each class is a subspace under pointwise operations.

Intermediate 9 min read

What You'll Learn

  • Define even and odd functions on a domain symmetric about zero
  • Use pointwise addition and scalar multiplication in the function space
  • Prove that even functions form a subspace
  • Prove that odd functions form a subspace
  • Check parity identities on polynomial and finite domains
  • Avoid confusing the two parity conditions or overlooking the domain

Parity Depends on the Domain

Evenness and oddness are identities that compare the value of a function at \(x\) with its value at \(-x\). Those two inputs must both belong to the function’s domain. This is why the domain matters: a function defined only on positive numbers cannot, in general, be tested by substituting \(-x\). When the domain is symmetric about zero, the identities make sense for every input, and they define two useful collections of functions.

Let \(D\) be a subset of \(\mathbb{R}\) that is symmetric about zero, meaning that \(x\in D\) implies \(-x\in D\). The real-valued functions on \(D\), written \(\mathcal{F}(D,\mathbb{R})\), form a vector space with pointwise operations: \((f+g)(x)=f(x)+g(x)\) and \((af)(x)=a f(x)\) for \(a\in\mathbb{R}\). Its zero vector is the zero function, which takes the value \(0\) at every point of \(D\).

Definition: A function \(f\in\mathcal{F}(D,\mathbb{R})\) is even if \(f(-x)=f(x)\) for every \(x\in D\). It is odd if \(f(-x)=-f(x)\) for every \(x\in D\). Write \(E_D\) for the set of even functions on \(D\), and \(O_D\) for the set of odd functions on \(D\).

The subspace test says that a nonempty subset of a vector space is a subspace if it is closed under linear combinations: whenever \(f\) and \(g\) belong to the subset and \(a,b\in\mathbb{R}\), the function \(af+bg\) also belongs to it. This test includes the zero function, since taking \(a=b=0\) produces it. Here, every function combination is formed pointwise, so \((af+bg)(x)=a f(x)+b g(x)\).

Checking the Identities in Examples

Worked Example: Polynomial Functions on the Real Line

Let \(D=\mathbb{R}\), and consider \(f(x)=x^4-3x^2+2\) and \(g(x)=x^3-2x\). Test the parity of each function by substituting \(-x\).

For \(f\), substitution gives

$$ f(-x)=(-x)^4-3(-x)^2+2=x^4-3x^2+2=f(x). $$

Thus \(f\) is even. In particular, the constant term does not prevent evenness. For \(g\), the substitution gives

$$ g(-x)=(-x)^3-2(-x)=-x^3+2x=-(x^3-2x)=-g(x). $$

Thus \(g\) is odd. As numerical checks, \(f(1)=0=f(-1)\), while \(g(1)=-1\) and \(g(-1)=1=-g(1)\). These checks agree with the identities; the substitutions above establish them for every real \(x\).

An identity must hold at every point of the domain, not just at a few chosen inputs. In the next example, we verify the parity of linear combinations directly, in a way that works for all \(x\) in the domain.

Worked Example: Linear Combinations Preserve Each Parity

On \(D=[-2,2]\), let \(p(x)=x^2+1\) and \(q(x)=2x^2-3\). Both are even. Form \(h=3p-2q\) and check its parity.

First compute the function using pointwise operations:

$$ h(x)=3(x^2+1)-2(2x^2-3) =3x^2+3-4x^2+6 =-x^2+9. $$

Now substitute \(-x\):

$$ h(-x)=-(-x)^2+9=-x^2+9=h(x). $$

So \(h\) is even. For instance, \(h(1)=8=h(-1)\), also confirming the identity at that pair of inputs.

The same calculation applies to odd functions. On the same domain let \(r(x)=2x\) and \(s(x)=x^3\). Both are odd, and \(k=3r-2s\) satisfies

$$ k(x)=6x-2x^3,\qquad k(-x)=-6x+2x^3=-(6x-2x^3)=-k(x). $$

For a numerical check, \(k(1)=4\) and \(k(-1)=-4\). In both cases the substitution proves the claim for all \(x\in[-2,2]\).

Why Both Classes Are Subspaces

Theorem: If \(D\subseteq\mathbb{R}\) is symmetric about zero, then \(E_D\) and \(O_D\) are subspaces of \(\mathcal{F}(D,\mathbb{R})\), with its pointwise operations.

Proof. Let \(z\) be the zero function on \(D\). For every \(x\in D\), \(z(-x)=0=z(x)\), so \(z\in E_D\); also \(z(-x)=0=-z(x)\), so \(z\in O_D\). Thus both sets are nonempty.

Take any \(f,g\in E_D\) and any \(a,b\in\mathbb{R}\). For every \(x\in D\), symmetry ensures that \(-x\in D\), and the even identities give

$$ (af+bg)(-x) =a f(-x)+b g(-x) =a f(x)+b g(x) =(af+bg)(x). $$

Therefore \(af+bg\in E_D\), proving that \(E_D\) is closed under linear combinations.

Now take any \(f,g\in O_D\) and any \(a,b\in\mathbb{R}\). For every \(x\in D\), the odd identities give

$$ (af+bg)(-x) =a f(-x)+b g(-x) =-a f(x)-b g(x) =-(af+bg)(x). $$

Therefore \(af+bg\in O_D\), proving that \(O_D\) is closed under linear combinations. By the subspace test, both sets are subspaces of the stated ambient space. \(\square\)

The argument uses only the defining identities and pointwise operations. It does not rely on a special formula such as a polynomial. For example, the functions may be specified by tables of values, provided the values at opposite inputs obey the appropriate identity.

Worked Example: Parity on a Finite Symmetric Domain

Take \(D=\{-2,0,2\}\). Record the values of a function in the order \(f(-2),f(0),f(2)\). Consider \(e\) with value list \((5,-1,5)\) and \(o\) with value list \((-3,0,3)\). Check their parity.

For \(e\), the opposite inputs \(-2\) and \(2\) have the same value, and the value at \(0\) is unrestricted by the even identity: \(e(-0)=e(0)=-1\). Thus \(e\) is even. For \(o\), the values at opposite inputs are negatives: \(o(-2)=-3=-o(2)\). At zero, \(o(-0)=0=-o(0)\). Thus \(o\) is odd.

These checks cover every input in \(D\): the pair \(-2,2\) and the fixed point \(0\). As a further check on the odd identity at the fixed point, \((af+bg)(0)\) must be zero whenever \(f\) and \(g\) are odd; here \(o(0)=0\), as required.

What Happens at Zero

If \(0\in D\), the odd identity has a useful consequence. Setting \(x=0\) gives \(f(0)=-f(0)\), so \(2f(0)=0\). Because the scalars are real, this forces \(f(0)=0\). There is no corresponding requirement that an even function vanish at zero: the even identity at \(0\) is just \(f(0)=f(0)\). Example 1 illustrates this difference: its even function has \(f(0)=2\), while its odd function has \(g(0)=0\).

Proposition: On any symmetric domain \(D\), the only function that is both even and odd is the zero function.

Proof. If \(D\) is empty, there is only one function from \(D\) to \(\mathbb{R}\), and it is the zero function. Suppose instead that \(D\) is nonempty, and let \(f\) be both even and odd. For every \(x\in D\), the two identities give \(f(x)=f(-x)\) and \(f(-x)=-f(x)\). Combining them yields \(f(x)=-f(x)\), hence \(2f(x)=0\). Since \(2\ne0\) in \(\mathbb{R}\), \(f(x)=0\) for every \(x\in D\), so \(f\) is the zero function. Conversely, the zero function satisfies both identities at every input. \(\square\)

Common Mistakes and Domain Checks

Mistake: testing oddness by checking only whether signs appear in the formula. For \(f(x)=x^2\), one might write \(f(-x)=(-x)^2=-x^2\), then conclude that \(f\) is odd. The correction is to compute the square carefully: \((-x)^2=x^2\), not \(-x^2\). Thus \(f(-x)=f(x)\), so \(x^2\) is even. It is not odd; at \(x=1\), \(f(-1)=1\) but \(-f(1)=-1\).

Mistake: forgetting that the domain must contain the opposite input. The identity \(f(-x)=f(x)\) cannot be tested for a function defined only on \(D=(0,1)\), because \(-x\notin D\) for \(x\in D\). The subspace theorem above requires a symmetric domain precisely so that both sides of each defining identity refer to values of the function. A symmetric domain need not be an interval: the finite set in Example 3 is symmetric too.

Mistake: assuming a sum of different parities keeps either parity. On \(\mathbb{R}\), let \(u(x)=x^2\) and \(v(x)=x\). Then \((u+v)(1)=2\) and \((u+v)(-1)=0\), so \((u+v)(-1)\) is neither \((u+v)(1)\) nor \(-(u+v)(1)\). The subspace results guarantee closure when both functions come from the same parity class; they do not say that adding an even function to an odd one preserves either identity.

Keep the ambient space and the defining identity in view: \(E_D\) and \(O_D\) are subsets of all real-valued functions on \(D\), and their subspace property follows because each identity survives pointwise linear combinations. The symmetry condition on \(D\) makes those identities meaningful everywhere they are required.

Check Your Understanding

Use the defining identities, and state the domain assumptions needed for each answer.

  1. On \(\mathbb{R}\), determine whether \(x^5-4x\) is even, odd, or neither. Show the substitution.
  2. If \(f\) and \(g\) are even on a symmetric domain, prove directly that \(2f-3g\) is even.
  3. If \(0\in D\) and \(h\) is odd on \(D\), what must \(h(0)\) equal? Derive the value from the defining identity.
  4. On \(D=\{-1,0,1\}\), give a value list for an even function and a different value list for an odd function.
  5. Why does the subspace result require a symmetric domain when parity is defined using \(f(-x)\)?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon