✖

Even and odd functions

For a function, we can work out whether it is even or odd. In special cases a function can be both even and odd, but most functions are neither even nor odd.

Even functions

A function is even if it satisfies a simple rule – when you put an input x into the function and then its negative −x, the function must return the same output. A typical even function is f(x) = x2. If you put in 6 and −6, you get f(6) = 36 and f(−6) = 36. The inputs differed only in sign, so the output is the same.

A formal definition could look like this. If a function f is even, it must satisfy

f(x)=f(−x)for all x in the domain of f

For every x in the domain of the function, putting in the negative input −x must give the same function value.

How does an even function show up in a graph? If we put in x and −x, we get the same y. So if we think about it, x and −x are the same distance from the origin on the x-axis and have the same y-coordinate. This means the graph of an even function is symmetrical about the y-axis. To illustrate, here is the graph of x2:

Graph of the even function f(x)=x^2

Among the standard functions, the even ones are the cosine and functions of the form f(x) = xa where a is an even number. The modulus turns an odd function into an even one, for example f(x) = |x|, f(x) = |x3|, f(x) = |1/x|.

Odd functions

An odd function must satisfy rules similar to those for an even function. A function f is odd if it satisfies this rule:

f(−x)=−f(x)for all x in the domain of f

In practice this means that if the point (a, b) lies on the graph of an odd function, then the point with both coordinates negated, (−a, −b), must lie on it too. An example of an odd function is f(x) = x3. If we substitute 2 for x, we get:

f(−x)=f(−2)=(−2)3=−8

In the second expression we would get

−f(x)=−f(2)=−(23)=−8

How does this show up in the graph? If the graph is to contain the point (a, b) and also (−a, −b), then, as you’ll find if you draw it, the graph is symmetrical about the origin of the coordinate system, that is, the point (0, 0). The graph of f(x) = x3 is shown in the following figure.

Graph of the odd function f(x)=x^3

Among the standard functions, the odd ones are f(x) = xa where a is odd, and f(x) = ax where a is any real number (so this is a linear function with no constant term). Also f(x) = a/x and the sine.

Checking whether a function is even

How do we check whether a function is even? We have to use the definition. Take the familiar function f(x) = x2. The definition says that f(x) = f(−x). If the function is even, it must satisfy:

x2=(−x)2

Using the rules for working with powers, we can write minus x squared like this:

x2=(−1)2⋅x2

Minus one squared is one, so we get just x2 back.

x2=1⋅x2

Is the following function even?

f(x)=|1x|

Substitute into the definition:

|1x|=|1−x|

We can rearrange these fractions: instead of taking the modulus of the whole fraction, we move it to the numerator and the denominator.

|1||x|=|1||−x|

We change the denominator of the second fraction, because we know that |x| = |−x|, from the definition of the modulus.

|1||x|=|1||x|

Now we have equality, so the function is even.

Graph of the function f(x)=|1/x|

Checking whether a function is odd

How do we check whether a function is odd? Again we have to use the definition. It says that a function f is odd if

f(−x)=−f(x)

Let’s start with the function f(x) = x3. Substitute into the definition:

(−x)3=−x3

We can expand the left-hand side in the same way as in the previous example:

(−1)3⋅x3=−x3

Minus one cubed is minus one:

−1⋅x3=−x3

So we have equality:

−x3=−x3

The function is odd.

Is the given function odd?

f(x)=2x

Substitute into the definition:

2−x=−2x

There’s not much to rearrange here. We simply take the minus sign in the first fraction out in front of the whole fraction, so we get the equality:

−2x=−2x

The function is odd.

Graph of the function f(x)=2/x

Neither even nor odd

A function doesn’t have to be even or odd. Most functions are probably neither. An example is the linear function f(x) = x + 1. Let’s try substituting into the definition of an even function:

x+1=−x+1

Make x the subject:

x+1=−x+12x+1=12x=0

The equality doesn’t hold for all x, only for some, so the function is not even. Now for oddness:

−x+1=−(x+1)−x+1=−x−10x=−2

This equation never has a solution, so the function is not odd.

Graph of the function f(x)=x+1

Both even and odd

Is there a function that is both even and odd? Is there a graph that is symmetrical about the y-axis and about the origin at the same time? The answer is yes. There is exactly one such function, the constant function f(x) = 0. Its graph lies exactly along the x-axis.

Note: in fact there are infinitely many such functions, because we can define a function g(x) with the same rule but a different domain. For example, we can have the function g(x) = 0 whose domain is only the natural numbers. This function differs from the function f(x), which is defined over the real numbers. Still, the rule is always the same.

Combining functions

An interesting situation arises when we have two functions that are odd or even and we try to add them, multiply them and so on. For example, adding two even functions gives an even function again. There are lots of such rules and combinations.