## Increasing, Decreasing, and Constant Functions

Functions can either be constant, increasing as $x$ increases, or decreasing as $x$ increases.

### Learning Objectives

Apply the definitions of increasing and decreasing functions to determine whether a function is increasing, decreasing, or neither in a given interval

### Key Takeaways

#### Key Points

• A constant function is a function whose values do not vary, regardless of the input into the function.
• An increasing function is one where for every $x_{1}$ and $x_{2}$ that satisfies $x_{2}$> $x_{1}$, then $f(x_{2}) \geq f(x_{1})$. If it is strictly greater than, then it is strictly increasing.
• A decreasing function is one where for every $x_{1}$ and $x_{2}$ that satisfies $x_{2}$> $x_{1}$, then $f(x_{2}) \leq f(x_{1})$. If it is strictly less than, then it is strictly decreasing.

#### Key Terms

• decreasing function: Any function of a real variable whose value decreases (or is constant) as the variable increases.
• constant function: A function whose value is the same for all the elements of its domain.
• increasing function: Any function of a real variable whose value increases (or is constant) as the variable increases.

### Graphical Behavior of Functions

As part of exploring how functions change, we can identify intervals over which the function is changing in specific ways. We say that a function is increasing on an interval if the function values increase as the input values increase within that interval. Similarly, a function is decreasing on an interval if the function values decrease as the input values increase over that interval.

• An increasing function is one where for every $x_1$ and $x_2$ that satisfies $x_2 > x_1$, then $f(x_{2}) \geq f(x_{1})$. If it is strictly greater than $(f(x_2)>f(x_1))$, then it is strictly increasing.
• A decreasing function is one where for every $x_1$and $x_2$ that satisfies $x_2 > x_1$, then $f(x_{2}) \leq f(x_{1})$. If it is strictly less than $(f(x_2) < f(x_1))$, then it is strictly decreasing.

In terms of a linear function $f(x)=mx+b$, if $m$ is positive, the function is increasing, if $m$ is negative, it is decreasing, and if $m$ is zero, the function is a constant function.

The average rate of change of an increasing function is positive, and the average rate of change of a decreasing function is negative. The figure below shows examples of increasing and decreasing intervals on a function. Types of Functions: The function $f(x)=x^3−12x$ is increasing on the $x$-axis from negative infinity to $-2$ and also from $2$ to positive infinity.  The interval notation is written as: $(−∞, −2)∪(2, ∞)$.  The function is decreasing on on the interval: $(−2, 2)$.

### Constant Functions

In mathematics, a constant function is a function whose values do not vary, regardless of the input into the function.  A function is a constant function if $f(x)=c$ for all values of $x$ and some constant $c$.  The graph of the constant function $y(x)=c$ is a horizontal line in the plane that passes through the point $(0,c).$ Constant Function: The graph of $f(x)=4$ illustrates a constant function.

## Identifying Function Behavior

### Example 1:  Identify the intervals where the function is increasing, decreasing, or constant.

Look at the graph from left to right on the $x$-axis; the first part of the curve is decreasing from infinity to the $x$-value of $-1$ and then the curve increases.  The curve increases on the interval from $-1$ to $1$ and then it decreases again to infinity. Increasing Decreasing Function Graph: For the function pictured above, the curve is decreasing across the intervals:   $(-\infty,-1)\cup (1,\infty )$ and increasing on the interval $(-1,1)$.

### Relative Minima and Maxima

Relative minima and maxima are points of the smallest and greatest values in their neighborhoods respectively.

### Learning Objectives

Determine the local and global maxima and minima of a given function

### Key Takeaways

#### Key Points

• Minima and maxima are collectively known as extrema.
• A function has a global (or absolute) maximum point at $x$* if $f(x*) ≥ f(x)$ for all $x$.
• A function has a global (or absolute) minimum point at $x$* if $f(x*) ≤ f(x)$ for all $x$.
• A function $f$ has a relative (local) maximum at  $x=b$ if there exists an interval  $(a,c)$ with $a<b<c$ such that, for any $x$ in the interval $(a,c)$, $f(x)≤f(b)$.
• A function $f$  has a relative (local) minimum at $x=b$ if there exists an interval $(a,c)$ with $a<b<c$ such that, for any $x$ in the interval $(a,c)$, $f(x)≥f(b)$.
• Functions don’t necessarily have extrema in them. For example any line, $f(x) = mx+b$ where $m$ and $b$ are constants, does not have any extrema, be they local or global.

#### Key Terms

• maximum: The greatest value of a set.
• extremum: A point, or value, which is a maximum or a minimum.
• minimum: The smallest value of a set.

Minima and maxima are used heavily in optimization problems and artificial intelligence where, given a number of constraints on resources, we want the best use of our resources. For instance, we may want to maximize our profits given the items we can make and our available resources. In artificial intelligence we may want to discover what the least costly plan of action to take is for a robot (ie. the shortest path). Ideally you’d want to find the global minima for the plans. However, because there is not unlimited time to identify the right plan, artificial intelligence often simply finds the local minima.

### Definitions of Minimums and Maximums: Relative versus Global

In mathematics, the maximum and minimum of a function (known collectively as extrema) are the largest and smallest value that a function takes at a point either within a given neighborhood (local or relative extremum ) or within the function domain in its entirety (global or absolute extremum). Examples of Relative and Global Extrema: This graph has examples of all four possibilities: relative (local) maximum and minimum, and global maximum and minimum.

While some functions are increasing (or decreasing) over their entire domain, many others are not.  A value of the input where a function changes from increasing to decreasing (as we go from left to right, that is, as the input variable increases) is called a relative maximum.  If a function has more than one, we say it has local maxima.  Similarly, a value of the input where a function changes from decreasing to increasing as the input variable increases is called a relative minimum. The plural form is local minima.

A function is also neither increasing nor decreasing at extrema. Note that we have to speak of local extrema, because any given local extremum as defined here is not necessarily the highest maximum or lowest minimum in the function’s entire domain.

• A function $f$ has a relative (local) maximum at  $x=b$ if there exists an interval  $(a,c)$ with $a<b<c$ such that, for any $x$ in the interval $(a,c)$, $f(x)≤f(b)$.
• Likewise, $f$ has a relative (local) minimum at $x=b$ if there exists an interval $(a,c)$ with $a<b<c$ such that, for any $x$ in the interval $(a,c)$, $f(x)≥f(b)$. Local Maximum Minimum Graph: For the function pictured, the local maximum is at the $y$-value of 16, and it occurs when  $x=-2$.  The local minimum is at the $y$-value of−16 and it occurs when $x=2$.

A function has a global (or absolute) maximum point at $x$* if $f(x∗) ≥ f(x)$ for all $x$. Similarly, a function has a global (or absolute) minimum point at $x$ if $f(x∗) ≤ f(x)$ for all $x$.  Global extrema are also relative extrema.

Functions may not have any extrema in them, such as the line $y=x$. This line increases towards infinity and decreases towards negative infinity, and has no relative extrema.

### Example 1:  Find all maxima and minima in the graph below: Relative Max and Min graph: This curve shows a relative minimum at $(-1,-2)$ and relative maximum at $(1,2)$.

The graph attains a local maximum at $(1,2)$ because it is the highest point in an open interval around $x=1$.  The local maximum is the y-coordinate at $x=1$ which is $2$.

The graph attains a local minimum at $(-1,-2)$ because it is the lowest point in an open interval around $x=-1$. The local minimum is the y-coordinate $x=-1$which is $-2$.

### Example 2: Find all global maxima and minima in the graph below: Global Max and Min Graph: For the function pictured above, the absolute maximum occurs twice at $y=16$ and the absolute minimum is at $(3,-10)$.

The graph attains an absolute maximum in two locations, $x=-2$ and $x=2$, because at these locations, the graph attains its highest point on the domain of the function. The absolute maximum is the y-coordinate which is $16$.

The graph attains an absolute minimum at $x=3$, because it is the lowest point on the domain of the function’s graph. The absolute minimum is the y-coordinate which is $-10$.

## Piecewise Functions

A piecewise function is defined by multiple subfunctions that are each applied to separate intervals of the input

### Learning Objectives

Practice graphing piecewise functions and determine their domains and ranges

### Key Takeaways

#### Key Points

• Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated subdomains.
• The absolute value, $\left | x \right |$ is a very common piecewise function.  For a real number, its value is $-x$ when $x<0$ and its value is $x$ when $x\geq0$.
• Piecewise functions may have horizontal or vertical gaps (or both) in their functions. A horizontal gap means that the function is not defined for those inputs.
• An open circle at the end of an interval means that the end point is not included in the interval, i.e. strictly less than or strictly greater than. A closed circle means the end point is included.

#### Key Terms

• subdomain: A domain that is part of a larger domain.
• absolute value: For a real number, its numerical value without regard to its sign; formally, $-1$ times the number if the number is negative, and the number unmodified if it is zero or positive.
• piecewise function: A function in which more than one formula is used to define the output over different pieces of the domain.

In mathematics, a piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain.  Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated intervals.  We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain “boundaries.”

### Example 1: Consider the piecewise definition of the absolute value function:

$\displaystyle \left | x \right |= \left\{\begin{matrix} -x, & if\ x<0\\ x, & if\ x\geq0 \end{matrix}\right.$

For all $x$-values less than zero, the first function $(-x)$ is used, which negates the sign of the input value, making the output values positive. Allowing $y=f(x)$, where $f(x)=|x|$, some ordered pair examples of $(x,|x|)$ are:

$\displaystyle (-2,2) \\ (-1,1) \\ (-0.5,0.5)$

For all values of $x$ greater than or equal to zero, the second function $(x)$ is used, making the output values equal to the input values.  Some ordered pair examples are:

$\displaystyle (2,2) \\ (1,1) \\ (0.5,0.5)$

After finding and plotting some ordered pairs for all parts (“pieces”) of the function the result is the V-shaped curve of the absolute value function below. Piecewise function: absolute value: The piecewise function, $\left | x \right |= \left\{\begin{matrix} -x, & if\ x<0\\ x, & if\ x\geq0 \end{matrix}\right.$, is  the graph of the absolute value function.  Each part of the function is graphed based upon the specific domain chosen.

### Example 2: Graph the function and determine its domain and range:

$\displaystyle f(x)= \left\{\begin{matrix} x^2, & if\ x \leq 1\\ 3, & if\ 1<x\leq 2\\ x, & if\ x>2\\ \end{matrix}\right.$

Start by choosing values for $x$ for the first piece of the function, such as:

$\displaystyle x=-2,-1,0,1$

Substitute those values into the first part of the piecewise function $f(x)=x^2$:

$\displaystyle f(-2)=4 \\ f(-1)=1 \\ f(0)=0 \\ f(1)=1$

Those points satisfy the first part of the function and create the following ordered pairs:

$\displaystyle (-2,4)\\ (-1,1)\\ (0,0)\\ (1,1)$

For the middle part (piece), $f(x)=3$ (a constant function) for the domain $1<x\leq 2$, a few ordered pairs are:

$\displaystyle (1.5,3)\\ (1.8, 3)\\ (2,3)$

For the last part (piece), $f(x)=x$ for the domain $x>2$, a few ordered pairs are:

$\displaystyle (2.5,2.5)\\ (3,3)\\ (4,4)$

Now graph all the ordered pairs: Piecewise Function: The piecewise function $f(x)= \left\{\begin{matrix} x^2, & if\ x \leq 1\\ 3, & if\ 1<x\leq 2\\ x, & if\ x>2\\ \end{matrix}\right.$ has three parts (pieces).  Depending on the value of the domain, each piece is different.

Notice the open and closed circles in the graph.  This has to do with the specific domains for each part of the function.  An open circle at the end of an interval means that the end point is not included in the interval, i.e. strictly less than or strictly greater than. A closed circle means the end point is included (equal to).

The domain of the function starts at negative infinity and continues through each piece, without any gaps, to positive infinity.  Since there is an closed AND open dot at $x=1$ the function is piecewise continuous there.  When $x=2$, the function is also piecewise continuous.  Therefore the domain of this function is the set of all real numbers, $\mathbb{R}$.

The range begins at the lowest $y$-value, $y=0$ and is continuous through positive infinity.  Even though there looks like a gap from $y=1$ to $y=2$, the piece of the function $f(x)=x^2$ includes those values.  Therefore the range of the piecewise function is also the set of all real numbers greater than or equal to $0$, or all non-negative values: $y \geq 0$.

## One-to-One Functions

A one-to-one function, also called an injective function, never maps distinct elements of its domain to the same element of its codomain.

### Learning Objectives

Use the properties of one-to-one functions to determine if a given function is one-to-one

### Key Takeaways

#### Key Points

• A one-to-one function has a unique output for each unique input.
• Domain restriction can allow a function to become one-to-one, such as in the case of $f(x)=x^2$ for $x\geq 0$.
• To check if a function is a one-to-one perform the horizontal line test.  If any horizontal line intersects the graph in more than one point, the function is not one-to-one.
• If every element of a function’s range corresponds to exactly one element of its domain, then the function is said to be one-to-one.

#### Key Terms

• injective function: A function that preserves distinctness: it never maps distinct elements of its domain to the same element of its codomain.

#### Properties of a One-To-One Function

A one-to-one function, also called an injective function, never maps distinct elements of its domain to the same element of its co-domain. In other words, every element of the function’s range corresponds to exactly one element of its domain. Occasionally, an injective function from $X$ to $Y$ is denoted $f: X \mapsto Y$, using an arrow with a barbed tail.

An easy way to check if a function is a one-to-one is by graphing it and then performing the horizontal line test. If any horizontal line intersects the graph at more than one point, the function is not one-to-one. To see this, note that the points of intersection have the same y-value, because they lie on the line, but different x values, which by definition means the function cannot be one-to-one. Horizontal line test: Because the horizontal line crosses the graph of the function more than once, it fails the horizontal line test and cannot be one-to-one.

### Example 1:  Is the function $f(x)={x}^{2}$ (with no domain restrictions) one-to-one?

One way to check if the function is one-to-one is to graph the function and perform the horizontal line test.  The graph below shows that it forms a parabola and fails the horizontal line test. ### Parabola graph

The graph of the function $f(x)=x^2$ fails the horizontal line test and is therefore not a one-to-one function.  If a horizontal line can go through two or more points on the function’s graph then the function is not one-to-one.

Another way to determine if the function is one-to-one is to make a table of values and check to see if every element of the range corresponds to exactly one element of the domain.  A list of ordered pairs for the function are:

$\displaystyle (-2,4)\\ (-1,1)\\ (0,0)\\ (1,1)\\ (2,4)$

The ordered pairs $(-2,4)$ and $(2,4)$ do not pass the definition of one-to-one because the element $4$ of the range corresponds to to $-2$ and $2$. Each unique input must have a unique output so the function cannot be one-to-one. Notice also, that these two ordered pairs form a horizontal line; which also means that the function is not one-to-one as stated earlier.

### Example 2:  Is the function $f(x)=\left | x \right |$ one-to-one?

This is an absolute value function, which is graphed below. Notice it fails the horizontal line test. Because each unique input does not have a unique output, this function cannot be one-to-one. Absolute value graph: The graph of the function,$f(x)=\left | x \right |$, fails the horizontal line test and is therefore not a one-to-one function.

## Symmetry of Functions

Two objects have symmetry if one object can be obtained from the other by a transformation.

### Learning Objectives

Determine whether or not a given relation shows some form of symmetry

### Key Takeaways

#### Key Points

• A function has symmetry if it can be transformed in some way without changing the function.
• A function can be symmetric about a point if it can be rotated a fixed amount around that point without changing it.
• A function can be symmetric about a line if it can be reflected over that line without changing it.

#### Key Terms

• symmetry: A property in mathematics where an object can undergo a transformation while preserving its properties.

### Symmetry

In mathematics, an object such as a shape or a function has symmetry if it can be transformed in some way that preserves the properties of the mathematical object. In geometry, a geometric shape or object is symmetric if it can be divided into two or more identical pieces that are arranged in an organized fashion.s means that an object is symmetric if there is a transformation that moves individual pieces of the object but doesn’t change the overall shape.

For functions, a function exhibits symmetry if each point of a function can be changed according to a mathematical rule without changing the overall function. Determining symmetry can involve graphing the function or evaluating the function algebraically.

### Symmetric Function Types

Functions and relations can be symmetric about a point, a line, or an axis.  They can also have symmetry after a reflection.

To determine if a relation has symmetry, graph the relation or function and see if the original curve is a reflection of itself over a point, line, or axis.  The image below shows examples of reflecting a function over the $x$-axis (vertical reflection) and over the $y$-axis (horizontal reflection). Reflection: A function can be reflected over the $x$ or $y$ axis. If the function looks the same after the reflection, the function is symmetric over that axis.

In the next graph below, quadratic functions have symmetry over a line called the axis of symmetry.  The axis splits the U-shaped curve into two parts of the curve which are reflected over the axis of symmetry. Symmetry Parabola: The function $y=x^2+4x+3$ shows an axis of symmetry about the line $x=-2$.  The curve is split into $2$ equivalent halves.  Notice that the $x$-intercepts are reflected points over the axis of symmetry and are equidistant from the axis.

### Example:  Does the function below show symmetry? Symmetry about a point: The graph above has symmetry since the points labeled are reflected over the origin.

The graph has symmetry over the origin or point $(0,0)$.  The points given, $(1,3)$ and $(-1,-3)$ are reflected across the origin.

## Even and Odd Functions

Functions that have an additive inverse can be classified as odd or even depending on their symmetry properties.

### Learning Objectives

Determine whether a function is even, odd, or neither

### Key Takeaways

#### Key Points

• The parity of a function does not necessarily reveal whether the function is odd or even.
• Even functions are algebraically defined as functions in which the following relationship holds for all values of: $f(x)=f(-x)$.
• An even function is symmetric about the $y$-axis: for every point $(x,y)$ on the graph, the corresponding point $(-x,y)$ or vice versa is also on the graph.
• Odd functions are algebraically defined as functions in which the following relationship holds true for all values of: $-f(x)=f(-x)$.
• An odd function is symmetric with respect to the origin: for every point $(x,y)$ on the graph, the corresponding point $(-x,-y)$ or vice versa is also on the graph.  In other words, rotating the graph $180$  degrees about the point of origin results in the same, unchanged graph.

#### Key Terms

• parity: A set with the property of having all of its elements belonging to one of two disjoint subsets, especially a set of integers split in subsets of even and odd elements.

### Even and Odd Definitions

Functions can be classified as “odd” or “even” based on their composition. These labels correlate with symmetry properties of the function.

The terms “odd” and “even” can only be applied to a limited set of functions. For a function to be classified as one or the other, it must have an additive inverse. Therefore, it must have a number that, when added to it, equals $0$.

Oftentimes, the parity of a function will reveal whether it is odd or even. For example, the function $f(x)=x^2$ is even because it has an exponent, $2$, that is an even integer. This, however, does not apply in every instance.  For example, $f(x)=\left | x^3 \right |$ has an exponent that is of an odd integer, $3$, but is also an even function.  How can we check if a function is odd or even?  Let’s look at their characteristics.

### Even Functions

Even functions are algebraically defined as functions in which the following relationship holds for all values of $x$:

$\displaystyle f(x)=f(-x)$

To check if a function is even, any $x$-value chosen must yield the same output value when substituted into the function as $-x$.

### Example 1: Is the function $f(x)=x^4+2x$ even?

Remember the degree of the function, in this case a $4$ which is even, may not always dictate if the function is in fact even.

First, perform an algebraic check:  Substitute a value for $x$ and $-x$ into the function and check that the same output is found.  Let $x=2$: will $f(2)=f(-2)?$

\displaystyle \begin{align} f(2)&=(2)^4+2(2)\\ &=16+4\\ &=20 \end{align}

\displaystyle \begin{align} f(-2)&=(-2)^4+2(-2)\\ &=16-4\\ &=12 \end{align}

Therefore $f(2)\neq f(-2)$ and the function is not even. Symmetry: even function?: The function $f(x)=x^4+2x$ pictured above is not even because the graph is not symmetric about the $y$-axis.  For example the point $(-1,-1)$ does not reflect onto the point $(1,-1)$.

We can confirm this graphically: functions that satisfy the requirements of being even are symmetric about the $y$-axis. Therefore, for every point $(x,y)$ on the graph, the corresponding point $(-x,y)$ or vice versa, is also on the graph.

### Odd Functions

Odd functions are algebraically defined as functions in which the following relationship holds true for all values of $x$:

$\displaystyle -f(x)=f(-x)$

This relationship can also be expressed as:

$\displaystyle f(x)+f(-x)=0$

To check if a function is odd, the negation of the function (be sure to negate all terms of the function) must yield the same output as substituting the value $-x$.

### Example 2: Is the function $f(x)=x^3-9x$ odd?

Algebraic check: Does $-f(x)=f(-x)$?

\displaystyle \begin{align} -f(x)&=-(x^3-9x)\\& =-x^3+9x \end{align}

\displaystyle \begin{align} f(-x)&=(-x)^3-9(-x)\\& =-x^3+9x \end{align}

Therefore $-f(x)=f(-x)$ and the function is odd.

Graphical check:  Functions that satisfy the requirements of being odd are symmetric with respect to the origin. In other words, rotating the graph $180$ degrees about the point of origin results in the same, unchanged graph.  In addition, for every point $(x,y)$ on the graph, the corresponding point $(-x,-y)$ is also on the graph. Symmetry: odd function?: The function, $f(x)=x^3-9x$ is odd since the graph is symmetric about the origin.  One can also check that any point is symmetric about the origin: for example, does $(-1,8)$ yield $(1,-8)$?  Yes, those two points are symmetric about the origin.