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\).
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
Thus \(f\) is even. In particular, the constant term does not prevent evenness. For \(g\), the substitution gives
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:
Now substitute \(-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
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
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
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
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\).
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.
- On \(\mathbb{R}\), determine whether \(x^5-4x\) is even, odd, or neither. Show the substitution.
- If \(f\) and \(g\) are even on a symmetric domain, prove directly that \(2f-3g\) is even.
- If \(0\in D\) and \(h\) is odd on \(D\), what must \(h(0)\) equal? Derive the value from the defining identity.
- On \(D=\{-1,0,1\}\), give a value list for an even function and a different value list for an odd function.
- Why does the subspace result require a symmetric domain when parity is defined using \(f(-x)\)?