Use adaptive quiz-based learning to study this topic faster and more effectively.

# Functions: basic concepts

## Basic definitions

A function $f:X\rightarrow Y$ maps each input element $x$ of a given set $X$ to exactly one value $y$ of a set $Y$.

An element of $X$ cannot be mapped to more than one element of $Y$, but two elements of $X$ may be mapped to the same element of $Y$.

$f(x) = \vert x\vert$ associates both $1$ and $-1$to $1$. This is a function. The mapping that sends $1$ to both $-1$ and $1$ is not a function.

The value $f(x)$ is the image of $x$. The image of $x$ is often written as $y$. This image is expressed by $$f:x\mapsto f(x).$$

The set for which the function is defined is the domain. It is usually denoted by $D_f$. Often the function is written as $f:X\rightarrow Y$ where the set $X$ contains the domain. This is usually done for convenience.

The domain of the function $f(x) = 1/x$ is $D_f =\R\backslash\{0\}$.

The collection of values $f(x)$ for all the elements $x\in D_f$ is the range of $f$. This is contained in the set $Y$, which is called the target set or co-domain.

$f(x)= 1/(x-1)^2$ is defined for $x\ne 1$. Its range is $(0,+\infty)$.

The function $x\mapsto 1/(x-1)^2.$
The function is defined only on its domain. The resulting values give the range. The co-domain could be all of the $y$-axis.

## Periodic functions

A function $f$ is periodic with period $T\gt 0$ if $$f(x+T)=f(x)$$ for all $x$. The period of a periodic function is the smallest positive $T$ with this property.

The function $\sin x$ is periodic with period $2\pi$. The function $\tan x$ is periodic with period $\pi$. The function $x$ is not periodic. A constant function is periodic for any period.

The graph of a periodic function is invariant by translation along the $x$-axis of distance $T$.

In practice, it is enough to define a periodic function on an interval of width $T$. For any $x\in\R$, we can find an integer $k$ so that $x-kT$ lies in the interval on which the function was defined. We then have $f(x) = f(x-kT)$.

All these waves have the same period.

## Graph

The graph of a function is the representation of the function using the Cartesian coordinate system. It is the collection of all points $$\big(x,f(x)\big)$$ where $x$ ranges through $D_f$.

The graph of $x\mapsto 1/(x-1)^2.$

Because $f(x)$ takes only one value, each $x$-coordinate in the graph has only one corresponding $y$-coordinate. Any vertical line intersects the graph at most once.

The blue circle on the left is not the graph of a function since the red vertical line intersects it twice. The semi-circle on the right is the graph of a function.

## Odd and even functions

A numerical function is even if its graph is symmetric across the $y$-axis. Analytically, this means that, for all $x$, $$f(-x) = f(x).$$

Examples of even functions are $x^2$, $\cos(x)$, $\vert x\vert$.

A numerical function is odd if its graph has rotational symmetry of angle $\pi$ about the origin. Analytically, this means that, for all $x$, $$f(-x) = - f(x).$$

Examples of odd functions are $x$, $x^3$, $\sin(x)$ and $\tan(x)$.

Parity is the property of being either odd or even for a function.

Some functions are neither even nor odd, such as $x^2 - 3$

## Monotonicity and boundedness

A function $f$ is bounded if, for some constant $M$ and all $x\in D_f$, $$\vert f(x) \vert \le M.$$ It is bounded below if $f(x)\ge -M$ and bounded above if $f(x)\le M$.

The graph of a bounded function lies within two horizontal lines. The graph of a function bounded below remains above an horizontal line.

$\sin(x)$ is bounded; $x^2$ is bounded below; $x^3$ is unbounded.

A function is increasing if, whenever $x\gt y$, $$f(x)\ge f(y).$$ It is decreasing if $f(x)\le f(y)$. A function is strictly increasing or strictly decreasing if the inequalities are all strict. A function is monotonic if it is either always increasing or always decreasing.

The graph of an increasing function "climbs up or stays flat" as $x$ increases.

$x^3$ is strictly increasing; $e^{-x}$ is strictly decreasing; $\max(x,0)$ is increasing, but not strictly increasing when $x\lt 0$.