This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# Classes of functions

### From Mathematics Is A Science

## Contents

- 1 The simplest functions
- 2 Sequences
- 3 Monotonicity and extreme values
- 4 Quadratic polynomials
- 5 Polynomial functions
- 6 Rational functions
- 7 Algebraic functions
- 8 Functions with symmetries
- 9 Trigonometric functions
- 10 The exponent
- 11 The logarithm
- 12 Change of variables
- 13 Systems of linear equations
- 14 The Euclidean spaces of dimensions $1$ and $2$
- 15 A very short history of functions

## 1 The simplest functions

In this chapter, we will study some specific functions as well as some broad categories of functions. We start with the former.

In the most general situation, there are always two functions that are very simple.

Let's consider our sets from the last chapters: $X$ is the five boys and $Y$ is the four balls. Now, what if *all* boys prefer basketball? The function $F$ cannot be simpler: all arrows point at the basketball.

The table of this function $F$ is also very simple: all crosses are in the same column; and the graph has all dots on the same horizontal line. The value of $y=F(x)$ doesn't vary as $x$ varies; it is *constant*.

**Definition.** Suppose sets $X$ and $Y$ are given. A function $f:X\to Y$ is a *constant function*, i.e., for some specified element $b$ of $Y$, we set:
$$f(x)=b,\text{ for all } x.$$

In the generic illustration below, all arrows converge on one output:

The graph of a constant *numerical* function is a horizontal line:

Of course, if the domain is disconnected, then so is the graph.

**Example.** Constant functions are convenient tools for building more complex functions. This is a familiar example of building from three constant functions a single “piece-wise constant” function:
$$\begin{array}{ccc}
\operatorname{sign}(x):& x & \mapsto & \begin{array}{|c|}\hline
&x&
\begin{array}{lllll}
\nearrow_{\text{ if }x> 0} &\begin{array}{|c|}\hline\quad \text{ choose }1 \quad \\ \hline\end{array} & \mapsto & y & \searrow\\
\to_{\text{ if }x=0} &\begin{array}{|c|}\hline\quad \text{ choose }0 \quad \\ \hline\end{array} &
\mapsto & y & \to\\
\searrow_{\text{ if }x<0} &\begin{array}{|c|}\hline\quad \text{ choose }-1 \quad \\ \hline\end{array} &
\mapsto & y & \nearrow\\
\end{array}& y\\ \hline\end{array}
& \mapsto & y
\end{array}.$$
If we zoom out from the graph of such a function, it might look like a curve:

$\square$

What can we say about compositions of this special function, $f$, with another, $g$? Consider this diagram: $$x\mapsto f(x)=b\ \Longrightarrow\ x\mapsto g(f(x))=g(b).$$ The output is the same for all $x$! And here is another one: $$y\mapsto x=g(y) \ \Longrightarrow\ y\mapsto f(g(y))=b.$$ Again, the output is the same for all $y$! So, whether the other function comes before or after a constant function, the result is the same; this is our conclusion.

**Theorem.** The composition of any function with a constant function is a constant function. Just consider this diagram:

As a transformation of the line, this function is extreme; it *crushes* the whole line into a point:

At the other end of the spectrum is another extreme transformation; it does *nothing* to the line:

So, for our set $X$ of boys we have a special function $G$ from $X$ to $X$ (and another from $Y$ to $Y$ for the balls). Each arrow comes back to the boy (or ball) it started with:

The table of this function $G$ is also very simple: all crosses are on the diagonal; and the graph has all dots on the diagonal. The output of $G$ is *identical* to the input.

**Definition.** Suppose one set $X$ is given. The *identity function* $i:X\to X$ is given by:
$$i(x)=x,\text{ for all } x.$$

In the generic illustration below, every arrow circles back to its input:

What can we say about compositions of this special function, $i$, with another, $g$? Consider this diagram: $$x\mapsto y=i(x)=x \ \Longrightarrow\ x\mapsto g(y)=g(i(x))=g(x).$$ The output is the same as the input! And here is another one: $$y\mapsto x=g(y) \ \Longrightarrow\ y\mapsto i(x)=i(g(y))=g(y).$$ Again, the output is the same as the input! So, whether the other function comes before or after the identity function, the result is the same; this is our conclusion.

**Theorem.** A composition of any function with the identity function is that function:
$$i\circ g=g,\quad g\circ i=g.$$

A function can be represented in a number of ways; how do we know that this is the same function?

What does it mean when we say that *two functions are equal*? When each possible input produces the same output for the two. Suppose $f$ and $g$ are two functions,
$$f:X\to Y;$$
they are equal, $f=g$, if for each $x$ in the domain, i.e., *same domain* for $f$ and $g$, we have
$$f(x)=g(x).$$
It is illustrated in the flowchart below:
$$\begin{array}{ccc}
x & \mapsto & \begin{array}{c}
&x&
\begin{array}{lllll}
\nearrow &x &\mapsto &\begin{array}{|c|}\hline\quad f \quad \\ \hline\end{array} & \mapsto & y \\
\\
\searrow &x &\mapsto &\begin{array}{|c|}\hline\quad g \quad \\ \hline\end{array} & \mapsto & u \\
\end{array} \text{same! } \end{array}
\end{array}$$

**Example.**
$$f(x)=2x+4 \text{ and } g(x)=2(x+2) \ \Longrightarrow\ f=g.$$
That's what symbol manipulation is about... $\square$

What does it mean when we say that *two functions are not equal*? The opposite: when an input is possible that produces two different outputs for the two. Suppose $f$ and $g$ are two functions,
$$f:X\to Y;$$
they are not equal, $f\ne g$, if there is $x$ -- in or out of either domain -- such that we have
$$f(x)\ne g(x).$$
It is illustrated in the flowchart below:
$$\begin{array}{ccc}
3 & \mapsto & \begin{array}{c}
&3&
\begin{array}{lllll}
\nearrow &3 &\mapsto &\begin{array}{|c|}\hline\quad f \quad \\ \hline\end{array} & \mapsto & 7 &\\
\\
\searrow &3 &\mapsto &\begin{array}{|c|}\hline\quad g \quad \\ \hline\end{array} & \mapsto & 12 \\
\end{array} \text{different! } \end{array}
\end{array}$$
As you can see, you only need to find a single value of $x$ for which we have a mismatch.

This case also includes the situation when the two domains are unequal: $$\begin{array}{ccc} 3 & \mapsto & \begin{array}{c} &3& \begin{array}{lllll} \nearrow &3 &\mapsto &\begin{array}{|c|}\hline\quad f \quad \\ \hline\end{array} & \mapsto & 7 &\\ \\ \searrow &3 &\mapsto &\begin{array}{|c|}\hline\quad g \quad \\ \hline\end{array} & \mapsto & \text{“not in the domain!”} \\ \end{array} \text{different! } \end{array} \end{array}$$

**Example.**
$$f(x)=\frac{x^2}{x} \text{ and } g(x)=x \ \Longrightarrow\ f\ne g.$$
Why? Because $f$ is undefined at $x=0$ which is in the implied domain of $g$. Replacing $f$ with $g$ is an example of how *not* to do symbol manipulation... $\square$

An established equality of two functions is called an *identity*. Why? Because the above theorem: they are connected by the identity function, $i$:
$$f=g\circ i.$$

In the definition of the inverse, we take two round trips and both times we arrive where we started -- with the same output: $$\begin{array}{ccc} \begin{array}{c} \begin{array}{lllll} \text{start}&x &\to &\begin{array}{|c|}\hline\quad f \quad \\ \hline\end{array} & \to & y \\ &||&&&&\downarrow\\ \text{finish}&x' &\leftarrow &\begin{array}{|c|}\hline\quad f^{-1} \quad \\ \hline\end{array} & \leftarrow & y \\ \end{array}& \end{array} \end{array} \qquad \begin{array}{ccc} \begin{array}{c} \begin{array}{lllll} x &\to &\begin{array}{|c|}\hline\quad f \quad \\ \hline\end{array} & \to & y &\text{finish}\\ \uparrow&&&&||&\\ x &\leftarrow &\begin{array}{|c|}\hline\quad f^{-1} \quad \\ \hline\end{array} & \leftarrow & y'&\text{start} \\ \end{array}& \end{array} \end{array}$$ We interpret this definition in terms of the identity function: $$f\circ f^{-1}=i \text{ and }f^{-1}\circ f=i.$$

The graph of the *numerical* identity function is the diagonal line:

Of course, if the domain and, therefore, the codomain are disconnected, then so is the graph.

The idea of such a function applies even if the two sets -- domain and codomain -- don't match. It suffices that the former is a subset of the latter. We modify the above example below:

We see $U$ *included* in $X$ and $V$ *included* in $Y$. There is only one way this can happen and this fact creates a function.

**Definition.** Suppose we have a set $X$ and a subset $A$ of $X$. Then the *inclusion* $i_A: A \to X$ *of* $A$ *into* $X$ is the function defined by the following:
$$i_A(x) = x,\text{ for all } x \text{ in } A.$$

Choosing a “smaller” domain creates a new function.

**Definition.** Suppose we have sets $X$ and $Y$, a function $f: X \to Y$, and a subset $A$ of $X$. Then the *restriction* *of* $f$ *to* $A$ is a function **denoted** as $f\Big|_A: A \to Y$ and defined by the following:
$$f\Big|_A (x) = f(x), \text{ for all } x \text{ in } A.$$

In particular, we can understand inclusions as restrictions of the identity functions.

Here the sine function is restricted to a subset of the real line made of two intervals.

**Example.** Restrictions allow us to create functions that are one-to-one and onto form those that aren't. We then build “restricted” inverses of these functions. For example, consider:
$$f:{\bf R}\to {\bf R},\quad f(x)=x^2.$$
It's not invertible!

Then, we just take one, of the two, branch of the graph (no matter which one):
$$g=f\Big|_{[0,+\infty)}\ \text{ or }\ g=f\Big|_{(-\infty,0]}.$$
Then,
$$g:[0,+\infty) \to [0,+\infty),\quad g(x)=x^2.$$
This one *is* invertible! Its inverse is the square root:
$$g^{-1}:[0,+\infty) \to [0,+\infty),\quad g^{-1}(x)=\sqrt{x}.$$
$\square$

## 2 Sequences

Watching a ping-pong ball bouncing off the floor and recording how high it goes every time will be producing an ever-expanding string of numbers:

Here is a sequence of numbers representing the distance covered by a falling ball recorded every $.05$ second:

We use the following **notation**:
$$a_1=1,\ a_2=1/2,\ a_3=1/3,\ a_4=1/4,\ ...,$$
where $a$ is the *name* of the sequence and adding a subscript indicates which element of the sequence we are considering. It is sometimes possible to provide a formula for the $n$-*th element of the sequence*:
$$a_n=1/n.$$

**Example.** What is the formula for this sequence:
$$1,\ 1/2,\ 1/4,\ 1/8,\ ...?$$
First, we notice that the numerators are just $1$s and the denominators are the powers of $2$. We write it in a more convenient form:
$$a_1=1,\ a_2=\frac{1}{2},\ a_3=\frac{1}{2^2},\ a_4=\frac{1}{2^3},\ ....$$
The pattern in clear and the correspondence is
$$a_n=\frac{1}{2^{n-1}}.$$
$\square$

**Example.** What is the formula for this sequence:
$$1,\ -1,\ 1,\ -1,\ ...?$$
First, we notice that the absolute values of these numbers are just $1$s and while the sign alternates. We write it in a more convenient form:
$$a_1=1,\ a_2=-1,\ a_3=1,\ a_4=-1,\ ....$$
The pattern in clear and the correspondence is can be written for the two cases (just as for a piece-wise defined function):
$$a_n=\begin{cases}
-1&\text{ if } n \text{ is even},\\
1&\text{ if } n \text{ is odd}.
\end{cases}$$
The trick we can use for sequences but not for functions is to write:
$$a_n=(-1)^{n+1}.$$
$\square$

**Exercise.** Point out a pattern in each of the following sequences and suggest a formula for its $n$th element whenever possible:

- (a) $1,\ 3,\ 5,\ 7,\ 9,\ 11,\ 13,\ 15,\ ...$;
- (b) $.9,\ .99,\ .999,\ .9999,\ ...$;
- (c) $1/2,\ -1/4,\ 1/8,\ -1/16,\ ...$;
- (d) $1,\ 1/2,\ 1/3,\ 1/4,\ ...$;
- (e) $1,\ 1/2,\ 1/4\ ,1/8,\ ...$;
- (f) $2,\ 3,\ 5,\ 7,\ 11,\ 13,\ 17,\ ...$;
- (g) $1,\ -4,\ 9,\ -16,\ 25,\ ...$;
- (h) $3,\ 1,\ 4,\ 1,\ 5,\ 1,\ 9,\ ...$.

Sequences are just *functions*! Just compare:

- a typical function: the independent variable is $x$, a real number; the dependent variable is $y=f(x)$ another real number;
- a typical sequence: the independent variable is $n$, a natural number; the dependent variable is $y=a_n$ a real number.

Side by side: $$\begin{array}{ccccrcccr} &&&&&\text{ name of the function} \\ &\downarrow &&&&& \downarrow\\ &f\big(&x&\big)&&\text{ vs. }&a&_n\\ &&\uparrow&&&&&\uparrow\\ &&&&&\text{ name of the variable}\\ \\ &&&&&\text{ value of the variable}\\ &&\downarrow&&&&&\downarrow\\ &f\big(&3&\big)&=5&\text{ vs. }&a&_3&=5\\ &&&&\uparrow&&&&\uparrow\\ &&&&&\text{ value of the function} \\ \end{array}$$

Moreover, they both can be (partially or fully) represented by tables of numbers: $$\begin{array}{c|c} x&y=x^2\\ \hline 0&0\\ 1&1\\ 2&4\\ 3&9\\ \vdots&\vdots \end{array} \quad\quad\quad \begin{array}{c|c} n&y=n^2\\ \hline 0&0\\ 1&1\\ 2&4\\ 3&9\\ \vdots&\vdots \end{array}$$ In contrast to the table of the sequence (right), the table of the function misses more, not just at the end, rows: for $x=.5,\ x=\sqrt{2},$ etc. One can also see the difference if we plot the graphs of both together:

Between any two values of the sequence, the function might have a whole interval of extra values...

Thus, every function $y=f(x)$ creates a sequence $a_n=f(n)$, but not necessarily vice versa. The $n$th term formula of the sequence serves the same purpose as the formula of the function.

**Definition.** A function defined on a set of consecutive integers is called a *sequence*. If this set is finite, such as an “interval” $\{p,p+1,...,q\}$, it is is called an *finite sequence*. If this set is infinite, such as an “ray” $\{p,p+1,...\}$, it is called an *infinite sequence*.

Most of the time, we will use the word “sequence” for both according to the context.

A more compact **notation** for a sequence is via its formula:
$$a_n=\{a_n=1/n:\ n=1,2,3,...\},$$
with the abbreviated notation on the left.

**Example.** The go-to example is that of the sequence of the reciprocals:
$$a_n=\frac{1}{n}.$$

$\square$

A major reason why we study sequences is that they are often defined in a way that is very different from functions!

**Example.** A person starts to deposit $\$20$ every month to in his bank account that already contains $\$ 1000$. Then, after the first month the account contains:
$$ \$1000+\$20=\$ 1020,$$
after the second:
$$ \$1020+\$20=\$ 1040,$$
and so on. Then, if $a_n$ is the amount in the bank account after $n$ months, we have a formula:
$$a_{n+1}=a_n+ 20.$$
For the spreadsheet, the formula is:
$$\texttt{=R[-1]C+20}.$$
Below, the current amount is shown in blue and the next -- computed from the current -- is shown in red:

Since repeated addition is multiplication, it is easy to derive a formula for the $n$th term : $$a_{n}=1000+ 20\cdot n,$$ assuming that $a_0=1000$.

$\square$

We have visualized sequences as graphs of functions defined on such a set of integers but there is a more compact way to present sequences dynamically, i.e., as if $n=1,2,3,...$ are the moments of time something happens: the value changes.

Thus, in addition to tables and formulas, sequences can be defined by defining their elements in a consecutive manner.

**Definition.** A sequence $\{a_n\}$ is *recursively* when its next term is found from the current term (or several previous terms) by a formula, i.e.,
$$a_{n+1}=F(a_n).$$

This kind of representation is impossible for functions defined on intervals of real numbers because there is no concept of “consecutive” among the inputs.

**Definition.** A sequence defined (recursively) by the formula:
$$a_{n+1}=a_n+ b,$$
is called an *arithmetic progression* with $b$ its *increment*.

We took $F(x)=x+b$ in the last definition.

**Example.** We saw an arithmetic progression with increment $b=20$ in the last example. Also typical is the following situation. A person deposits $\$ 1000$ in his bank account. Suppose the account pays $1\%$ APR compounded annually. Then, after the first year, the accumulated interest is
$$ \$1000\cdot.01=\$ 10,$$
and the total amount becomes $\$1010$. After the second year we have the interest:
$$ \$1010\cdot .01=\$ 10.10,$$
and so on. In other words, the total amount is multiplied by $.01$ at the end of each year and then added to the total. An even simpler way to put this is to say that the total amount is multiplied by $1.01$ at the end of each year. Now if $a_n$ is the amount in the bank account after $n$ years, then we have a *recursive formula*:
$$a_{n+1}=a_n\cdot 1.01.$$
For the spreadsheet, the formula is:
$$\texttt{=R[-1]C*1.01}.$$

It is easy to derive the $n$th term formula though: $$a_{n+1}=1000\cdot 1.01^n.$$ Only after repeating the step $100$ times one can see that this isn't just a straight line:

$\square$

It is easy to discover the $n$th term formula though.

**Theorem.** An arithmetic progression:
$$a_{n+1}=a_n+ b,$$
satisfies:
$$a_n=a_0+nb.$$

**Definition.** A sequence defined (recursively) by the formula:
$$a_{n+1}=a_n\cdot r,$$
with $r\ne 0$, is called a *geometric progression* with $r$ its *ratio*.

We took $F(x)=x\cdot r$ in the definition of recursiveness.

**Example.** If the population of a city declines by $2%$ every year, we have a geometric progression with ration $r=.97$. $\square$

It is easy to discover the $n$th term formula though.

**Theorem.** A geometric progression:
$$a_{n+1}=a_n\cdot r,$$
satisfies:
$$a_n=a_0r^n.$$

**Example.** What if we deposit money to our bank account *and* receive interest? The recursive formulas is simple, for example:
$$a_{n+1}=a_n\cdot 1.05+200.$$
We just take $F(x)=x\cdot 1.05+200$ in the definition of recursiveness. Is there a *direct* formula? Yes, but it's too cumbersome to be of any use:
$$a_n=(...((a_0\cdot 1.05+200)\cdot 1.05+200)...)\cdot 1.05+200.$$
$\square$

**Example.** This time the multiple varies... Define a sequence recursively:
$$a_1=1,\ a_n=a_{n-1}\cdot n.$$
Then,
$$a_n=1\cdot 2 \cdot ... \cdot (n-1)\cdot n .$$
The result is called the *factorial* of $n$ and is denoted by
$$n!=1\cdot 2 \cdot ... \cdot (n-1)\cdot n.$$
It exhibits a very fast growth:

The factorial appears frequently in calculus and elsewhere. It suffices to point out for now that it represents the number of *permutations* of $n$ objects. To prove this fact we notice that it is about placing $n$ objects into $n$ slots, one by one: the first objects has $n$ options, the second $n-1$,... and the last has just one left. Since the choices are independent of each other, the total number of such placements is $n(n-1)\cdot ...2\cdot 1=n!$. $\square$

**Example.** Define a sequence recursively:
$$a_{n+1}=ra_n(1-a_n),$$
where $r>0$ is a parameter. For the spreadsheet, the formula is:
$$\texttt{=R2C2*R[-1]C*(1-R[-1]C)},$$
where $\texttt{R2C2}$ contains the value of $r$. For example, this is what we have for $r=3.9$ (here $a_1=.5$):

The sequence is called the *logistic sequence*. Its dynamics dramatically depends on $r$:

$\square$

If we have $n$ teams to play each other exactly once, how many game do we have to plan for? A table commonly use for such a tournament

The table reveals the following. The first team has to play $n-1$ games. The second also has to play $n-1$ games but one less is actually counted as it is already on the first list. The third has to play $n-1$ games but two less is actually counted as they are already on the first and second lists. And so on. The total is: $$(n-1)+(n-2)+...+2+1.$$ We can treat this as a recursive sequence: $$a_1=1,\ a_{n+1}=a_n+n.$$ How do we find an explicit, direct formula for the $n$th term of this sequence? The table tells us the answer. The total number of cells in the table is $n^2$. Without the diagonal ones, it's $n^2-n$. Finally we take only half of those: $(n^2-n)/2$. The result takes the following form.

**Theorem.** The sum of $m$ consecutive integers starting from $1$ is the following:
$$1+2+3+...+m=\frac{m(m+1)}{2}.$$

## 3 Monotonicity and extreme values

When we say that a function increases, we mean that the graph *rises* and we say it decreases when its graph *drops*:

This verbal definition is simple and the geometric meaning is very clear. However, both are imprecise. Even though we understand increasing functions as ones with graphs rising and decreasing functions as one with graphs falling, the precise definition has to rely on considering *one pair of points at a time*.

**Definition.** Given a function $y=f(x)$ and in interval $I$ within its domain. Then $y=f(x)$ is called *increasing on interval* $I$ if, for all $a,b$ in $I$, we have:
$$f(a)\le f(b);$$
It is called *decreasing on interval* $I$ if, for all $a,b$ in $I$, we have:
$$f(a)\ge f(b).$$
Together, these functions are called *monotonic*. The function is also called *strictly increasing*, *strictly decreasing*, and *strictly monotonic*, respectively, if these values cannot be equal to each other; i.e., we replace the non-strict inequality signs “$\le $” and “$\ge $” with strict “$<$” and “$>$”.

**Example.** Note that a constant function is both increasing and decreasing but neither decreasing nor increasing. $\square$

**Example.** An arithmetic progression is increasing when the increment is non-negative and decreasing when it's non-positive. A geometric progression is increasing when the increment is non-negative and the first element is positive. $\square$

How do we verify these conditions? Let's work out some examples algebraically.

**Example.** We utilize what we know about *the algebra of inequalities*.

First, we can multiply both sides of an inequality by a positive number: $$a<b\ \Longrightarrow\ 3a<3b.$$ Therefore, the function $f(x)=3x$ is increasing.

Second, if we multiply both sides of an inequality by a negative number, we have to reverse the sign: $$a<b\ \Longrightarrow\ (-2)a>(-2)b.$$ Therefore, the function $f(x)=-2x$ is decreasing.

Third, we can add any number to both sides of an inequality: $$a<b\ \Longrightarrow\ a+4<b+4.$$ Therefore, the function $f(x)=x+4$ is increasing. $\square$

Putting these facts together, we acquire the following.

**Theorem.** A linear polynomial
$$f(x)=mx+b$$

- is increasing if $m>0$, and
- is decreasing if $m<0$.

**Example.** This is how we can solve this problem one function at a time, from scratch. Let
$$ f(x) = 3x - 7. $$
If $x_{1} < x_{2}$ then
$$\begin{array}{rrclcc}
f(x_{1}) = &3 x_{1} - 7 & \overset{?}{<} &f(x_{2}) = 3 x_{2} - 7 \\
\Longrightarrow &3 x_{1} & \overset{?}{<}& 3 x_{2} \\
\Longrightarrow &x_{1} & < &x_{2}.
\end{array}$$
The computation suggests that $y=f(x)$ is increasing. For a complete proof, retrace these steps backwards. $\square$

Things get harder for quadratic, cubic,... polynomials they lead to quadratic, cubic, ... inequalities.

**Example.** Let's consider
$$f(x)=x^2.$$
First, we can multiply two inequalities, when they are aligned and their signs are positive:
$$\begin{array}{ll}0<a<b\\ 0<a<b\end{array}\ \Longrightarrow\ 0<a\cdot a <b\cdot b\ \Longrightarrow\ a^2<b^2.$$
Therefore, the function $f(x)=x^2$ is increasing for $x>0$. Second, if we multiply two inequalities when their signs are negative, we have to reverse the sign:
$$\begin{array}{ll}a<b<0\\ a<b<0\end{array}\ \Longrightarrow\ a\cdot a >b\cdot b>0 \ \Longrightarrow\ a^2>b^2.$$
Therefore, the function $f(x)=x^2$ is decreasing for $x<0$. $\square$

**Example.** Now, we let
$$f(x)=x^3,$$
and follow a similar procedure starting with two unknown $a,b$ with $a<b$. We can multiply *three* identical inequalities -- positive or negative -- and preserve the sign:
$$\begin{array}{ll}a<b\\ a<b\\ a<b\end{array}\ \Longrightarrow\ a\cdot a\cdot a <b\cdot b\cdot b\ \Longrightarrow\ a^3<b^3.$$
Therefore, the function $f(x)=x^3$ is increasing for all $x$. $\square$

**Notation:** We will use

- “$\nearrow$” for increasing, and
- “$\searrow$” for decreasing behavior.

In other words, we have: $$\begin{array}{l|cc} &a&<&b\\ \hline f\nearrow&f(a)& \le & f(b)\\ f\searrow&f(a) &\ge & f(b)\\ \end{array}$$

**Example.** In particular,

- if $f(x)=2x-3$, then $f \nearrow $ on $(-\infty, +\infty)$;
- if $g(x)=-5x+4$, then $g \searrow $ on $(-\infty, +\infty)$;
- if $h(x)=x^2$, then $h \searrow $ on $(-\infty, 0)$ and $\nearrow $ on $(0, +\infty)$;
- if $k(x)=x^3$, then $k \nearrow $ on $(-\infty, +\infty)$.

$\square$

**Definition.** When a function is either increasing on an interval or decreasing on it, we call it *monotonic* on the interval.

**Example (quadratic polynomials).** Things become much more complex if we need to analyze a quadratic function,
$$f(x)=ax^2+bx+c,\ a\ne 0.$$
We recall that all quadratic functions are represented by *parabolas* (Chapter 2). They are all result of transformations of *the* parabola $y=x^2$. What matters especially, is the location of the *vertex* of the parabola:
$$v=-\frac{b}{2a}.$$
The, we have:

- if $a>0$, then $f$ is strictly decreasing on $(-\infty, v)$ and strictly increasing on $(v,+\infty)$;
- if $a<0$, then $f$ is strictly increasing on $(-\infty, v)$ and strictly decreasing on $(v,+\infty)$;

For the first example, the vertex of the parabola is at $$ v = \frac{ 0 + 50 }{ 2 } = 25. $$ $\square$

**Theorem.** All strictly monotonic functions are one-to-one.

Thinking geometrically, the graph of an increasing function can't come back and cross a horizontal line for the second time:

Now, algebraically, this is the definition: $$ f\nearrow \text{ when: } \underbrace{x_{1} < x_{2}}_{\text{two different inputs}} \Longrightarrow \underbrace{f(x_{1}) < f(x_{2})}_{\text{two different outputs}} .$$ Hence $f$ is one-to-one.

What about the converse, are all one-to-one functions (strictly) monotonic? No, because some functions, such as sequences, might *skip values*:

Such a function cannot be invertible. The converse is true when the function is also “continuous”, to be discussed in Chapter 5.

**Theorem.** The odd powers are one-to-one. The even powers aren't one-to-one. The even powers with domains reduced to $[0,+\infty)$ or $(-\infty,0]$ are one-to-one.

The reason is that the former are monotonic and the latter aren't.

**Definition.** Given a function $y=f(x)$. Then $x=d$ is called a *global maximum point* of $f$ on interval $[a,b]$ if
$$f(d)\ge f(x) \text{ for all } a\le x \le b;$$
and $x=c$ is called a *global minimum point* of $f$ on interval $[a,b]$ if
$$f(c)\le f(x) \text{ for all } a\le x \le b.$$
(They are also called *absolute maximum and minimum points*.) Collectively they are all called *global extreme points*.

**Example.** Note that every point of a constant function is both a maximum and a minimum point. $\square$

## 4 Quadratic polynomials

In Chapter 1, we thoroughly studied the “square function” $f(x)=x^2$. We take the idea of squaring the input to the next level and combine it with other algebraic operations. A *quadratic polynomial* is a function:
$$ f(x) = ax^{2} + bx + c, \ a\ne 0. $$
We say that it is presented in the *standard form*. The numbers $a,b,c$ are the parameters that determine a lot about how the function behaves. We require the first coefficient $a$ to be non-zero to separate the quadratic polynomials from the linear polynomials.

As we saw in the last chapter, the graph of every quadratic polynomial is made from the “original parabola” of $y=x^2$ via shifting, flipping, and stretching. Some things about this polynomial will be easily deduced from those about the original that we learned in Chapter 1 but others will require some work.

The domain is the same, all reals, $(-\infty ,+\infty )$. But the values could positive or negative.

The graph shows that it avoids the undesirable features: gaps and breaks, corners and cusps.

Different inputs can produce, again, same outputs; quadratic polynomials aren't one-to-one! The pattern isn't as easy to see, but it's possible sometimes, for example: In fact, a pattern starts to emerge: $$\text{different inputs }\left\{\begin{array}{c} -2\ 10\\ \left\{\begin{array}{c} -1\ 5\\ \left\{\begin{array}{c} \ \ 0\ 2\\ \ \ 1\ 1\\ \ \ 2\ 2\\ \end{array}\right\}\\ \ \ 3\ 5\\ \end{array}\right\}\\ \ \ 4\ 10\\ \end{array}\right\}\text{ same outputs }$$ The inputs/outputs are paired up as they start to repeat themselves -- in reverse order -- after we pass $x=1$.

The slopes are different in different locations.

Furthermore, we know that

- if $a > 0$, parabola opens up and there is a minimum;
- if $a < 0$, parabola opens down and there is a maximum.

The graph has an axis of symmetry, so that the left branch is a mirror image of the right, but it's not the $y$-axis anymore. To find it we look at other facts first.

Recall that the $x$-intercepts of a function $y=f(x)$ are the real solutions of the equation $f(x)=0$. The following theorem provides the $x$-intercepts of a quadratic polynomial.

**Theorem (Quadratic Formula.)** The roots of a quadratic polynomial:
$$ f(x) = ax^{2} + bx + c, \ a\ne 0, $$
are given by
\begin{array}{|c|}\hline\quad x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}. \quad \\ \hline\end{array}

**Exercise.** Prove the theorem.

In other words, these numbers satisfy the equation: $$ax^{2} + bx + c=0.$$

The formula is frequently written as: $$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a},$$ which means that there are (up to) two solutions: $$x_1=\frac{-b-\sqrt{b^2-4ac}}{2a} \text{ and } x_2=\frac{-b+\sqrt{b^2-4ac}}{2a}.$$ As the solutions to the equation $$f(x) = ax^2 + bx + c=0,$$ these numbers may or may not exist or they might coincide. The formula only makes sense when what's inside the root is non-negative.

**Definition.** The *discriminant* of a quadratic polynomial:
$$ f(x) = ax^{2} + bx + c, \ a\ne 0, $$
is given by
$$D=b^2-4ac.$$

Now, decreasing the value of $D$ makes the graph of $y=f(x)$ shift upward and, eventually, pass the $x$-axis entirely. We can observe how its two $x$-intercepts start to get closer to each other, then merge, and finally disappear:

What happens to the graph? Starting with

- a positive value, $D$ decreases while the graph has two $x$-intercepts; then
- $D=0$ and graph touches the $x$-axis; then
- $D$ becomes negative and the $x$-intercepts disappear.

These $x$-intercepts are, respectively: $$\begin{array}{l|lcl} \text{discriminant }&x_1& \quad&x_2\\ \hline D>0&-\frac{b}{2a}-\frac{\sqrt{D}}{2a} &\ne & -\frac{b}{2a}+\frac{\sqrt{D}}{2a}\\ D=0&-\frac{b}{2a} &=& -\frac{b}{2a}\\ D<0& &NONE& \end{array}$$

As a summary, we have the following classification the roots of quadratic polynomials in terms of *the sign of the discriminant*.

**Theorem ($x$-intercepts).** The two $x$-intercepts of a quadratic polynomial are:

- distinct when its discriminant $D$ is positive;
- equal when its discriminant $D$ is zero;
- absent when its discriminant $D$ is negative.

We will see in Chapter 22 that the last case produces two *complex* roots.

When the discriminant is zero, we say that the quadratic polynomial is a *complete square*:
$$f(x)=a(x-x_1)^2.$$
It factors in this special way.

**Definition.** When a quadratic polynomial cannot be factored into linear factors, it is *irreducible*.

So, when the discriminant is negative, the polynomial is irreducible.

Now, we know that the axis of a parabola lies half-way between the two $x$-intercepts. Therefore, it is: $$ v =\frac{x_1+x_2}{2}=\frac{1}{2}\left(\frac{-b-\sqrt{b^2-4ac}}{2a} + \frac{-b+\sqrt{b^2-4ac}}{2a}\right)= - \frac{b}{2 a }. $$

The equation $$ y = - \frac{b}{2 a } $$ is the equation of the axis of the parabola.

The formula works even when $D<0$ and there are no $x$-intercepts!

**Theorem (Extrema).** If $f(x) = ax^{2} + bx + c,\ a\ne 0,$ is a quadratic polynomial and
$$v = - \frac{b}{2 a}, $$
then

- $f(v)$ is the global minimum of $f$ when $a>0$, and
- $f(v)$ is the global maximum of $f$ when $a<0$.

**Definition.** The *vertex* of a parabola is the point which is the maximum or minimum of the function.

**Theorem (Vertex).** The $x$-coordinate of the vertex of parabola is
$$ v = - \frac{b}{2 a }. $$

**Theorem (Range).** The range of a quadratic polynomial $y=ax^2+bx+c$ is a closed ray:

- $V=[m,+\infty)$ when $a>0$, and
- $V=(-\infty,M]$ when $a<0$,

where $m$ and $M$ are the minimum and the maximum values of the function respectively.

## 5 Polynomial functions

What do linear polynomials $f(x)=mx+b$ and quadratic polynomials $g(x)=ax^2+bx +c$ have in common? There is no division!

**Definition.** A *polynomial* is a (numerical) function computed via addition, subtraction, and multiplication only.

No division -- no chance of dividing by zero! We conclude the following.

**Theorem.** The domain of a polynomial is the set of all real numbers, ${\bf R}=(-\infty,+\infty)$.

Multiplication include multiplication by constant real numbers as well as by the input, $x$, itself. For example, we might have: $$\begin{array}{lllll} x&\mapsto &\begin{array}{|c|}\hline\quad \text{ add }2 \quad \\ \hline\end{array} & \mapsto & \begin{array}{|c|}\hline\quad \text{ multiply by }2 \quad \\ \hline\end{array} & \mapsto&\begin{array}{|c|}\hline\quad \text{ add } 3\quad \\ \hline\end{array}& \mapsto&\begin{array}{|c|}\hline\quad \text{ multiply by }x \quad \\ \hline\end{array}& \mapsto &...\\ \end{array}$$ This is the formula of this function: $$f(x)=\big[\big((x+2)\cdot 2\big)+3\big]\cdot x\ ...$$

It is possible that $x$ might not even appear! Then, in addition to linear and quadratic polynomials, we discover a new class: *constant polynomials*. Polynomials also include all power functions (if we just keep multiplying by $x$).

The way we attacked linear, $f(x)=mx+b$, and quadratic polynomials $g(x)=ax^2+bx +c$, was to derive many of their properties from the values of their parameters, or *coefficients*: $m,b$ and $a,b,c$. There is a *standard* way to represent a polynomial. For a linear polynomial, this is its “slope-intercept form”. For a quadratic polynomial, the formula $g(x)=ax^2+bx +c$ is the standard way to represent it, as opposed to, say, a factored form: $g(x)=a(x-x_1)(x-x_2)$. In order to attack all polynomials this way, we need to put them in a manageable form too. For example, this is how we simplify our formula:
$$f(x)=\big[\big((x+2)\cdot 2\big)+3\big]\cdot x=\big[(2x+4)+3\big]\cdot x=\big[2x+7\big]\cdot x=2x^2+7x.$$
We can do the same with any polynomial, no matter how many steps are involved.

What is the *standard* way to represent a polynomial? It follows that of the linear and quadratic polynomials. What do they have in common? Let's add a constant too:
$$\begin{array}{ll}
\text{constant:}&&&&&5\\
\text{linear:}&&&2x&+&5\\
\text{quadratic:}&3x^2&+&2x& +&5
\end{array}$$
Similar terms are aligned vertically! Accordingly, they have special names:
$$\begin{array}{ccc}
\text{terms:}&\text{quadratic}&&\text{linear}&&\text{constant}\\
&3x^2&+&2x& +&5
\end{array}$$

We add the cubic. We can see the pattern even clearer if we identify the powers of $x$: $$\begin{array}{ll} \text{constant:}&&&&&&&5x^0\\ \text{linear:}&&&&&2x^1&+&5x^0\\ \text{quadratic:}&&&3x^2&+&2x^1& +&5x^0\\ \text{cubic:}&-2x^3&+&3x^2&+&2x^1& +&5x^0\\ \end{array}$$ The powers of $x$ go down all the way to $0$. Furthermore, we progress to the next line by just adding an extra term -- a term of higher power!

One can see the extra degree of complexity -- in the shape of the graph -- in comparison to the quadratic polynomials that cubic polynomials have:

**Definition.** The *degree* of a polynomial is the number $n$ that is the highest power of $x$ present in the formula.

We then start to identify polynomials according their degrees instead of those names: $$\begin{array}{r|cccccccc|lll} \text{degrees}&\quad&3&&2&&1&&0&\\ \hline 0&&&&&&&&5x^0&1\text{ term}\\ 1&&&&&&2x^1&+&5x^0&2\text{ terms}\\ 2&&&&3x^2&+&2x^1& +&5x^0&3\text{ terms}\\ 3&&-2x^3&+&3x^2&+&2x^1& +&5x^0&4\text{ terms}\\ \vdots&&\vdots&&\vdots&&\vdots&&\vdots&\vdots \end{array}$$ As you can see, the terms are also assigned degrees.

So, the $n$th degree polynomial will be in the $(n+1)$st row of the table. It will have $n+1$ terms: $$f(x)=2x^n-11x^{n-1}+...-2x^3+3x^2+2x^1 +5x^0.$$ Here “...” indicates the continuation of the pattern: declining, by $1$, degrees of $x$.

For a general formula, we choose letters to represent the coefficients of the powers with subscripts indicating the power of the corresponding term. It's a finite *sequence*:
$$\{a_k:\ k=0,1,2,...,n\}=\{a_n,\ a_{n-1},...\ a_2,\ a_1,\ a_0\}.$$
For the above polynomial, we have:
$$\begin{array}{rrr}
\text{formula:}&2x^n&-11x^{n-1}&...&-2x^3&+3x^2&+2x^1&+5x^0\\
\text{terms:}&2x^n,&-11x^{n-1},&...&-2x^3,&3x^2,&2x^1,&5x^0\\
\text{coefficients:}&a_n=2,& a_{n-1}=-11,&...&a_3=-2,&a_2=3,&a_1=2,&a_0=5.
\end{array}$$

**Definition.** The *standard form* of a polynomial is given by a formula:
$$ f(x) = a_nx^n+a_{n-1}x^{n-1}+...+a_2x^2+a_1x+a_0, $$
where $a_n,\ a_{n-1},\ ...,\ a_2,\ a_1,\ a_0$ are real numbers called the *coefficients* of the polynomial. The $n$th term, $a_nx^n$ is called the *leading term* with the *leading coefficient* $a_n$. The $0$th term, $a_0$ is called the *constant term* (or a free term).

Of course, some of these coefficients can be zero but not the leading one $a_n$; indeed, the degree of a polynomial is the number $n$ that is the highest power of $x$ present in the formula, i.e., $a_n\ne 0$.

What is the meaning of the constant term $a_0$? It's the $y$-intercept: $$f(0)=a_nx^n+a_{n-1}x^{n-1}+...+a_2x^2+a_1x+a_0\bigg|_{x=0}=a_n0^n+a_{n-1}0^{n-1}+...+a_20^2+a_10+a_0=a_0.$$

So, polynomials are “made” of powers of $x$ (presented Chapter 1) via multiplication by the coefficients and then addition: $$f(x)=2x^{3}+4x^{2} -x^2+ 10. $$ $$\begin{array}{ccc} f:& x & \mapsto & \begin{array}{|c|}\hline &\begin{array}{lllll} x&\mapsto &\begin{array}{|c|}\hline\quad \text{ cube it } \quad \\ \hline\end{array} & \mapsto & \begin{array}{|c|}\hline\quad \text{ multiply by }2 \quad \\ \hline\end{array} & \mapsto\\ x&\mapsto &\begin{array}{|c|}\hline\quad \text{ square it } \quad \\ \hline\end{array} & \mapsto & \begin{array}{|c|}\hline\quad \text{ multiply by }3 \quad \\ \hline\end{array} & \mapsto\\ x&\mapsto &\begin{array}{|c|}\hline\quad \text{ pass it } \quad \\ \hline\end{array} & \mapsto & \begin{array}{|c|}\hline\quad \text{ multiply by }-1 \quad \\ \hline\end{array} & \mapsto\\ x&\mapsto &\begin{array}{|c|}\hline\quad \text{ choose }10 \quad \\ \hline\end{array} & \mapsto & \begin{array}{|c|}\hline\quad \text{ pass it } \quad \\ \hline\end{array} & \mapsto\\ \end{array}& \begin{array}{|c|}\hline\quad \text{ add } \quad \\ \quad \text{ them } \quad \\\hline\end{array}& \mapsto & y\\ \hline \end{array} & \mapsto & y \end{array}.$$ We will see that, when zoom out from, the graphs of polynomials resemble those of the power functions. Otherwise, there may be many $x$-intercepts.

We have learned from our experience with linear and, especially, quadratic polynomials that there is another, just as important form for a polynomial: the factored form. For example, a *linear polynomial* is factored:
$$f(x)=mx+b=m\left( x+\frac{b}{m}\right),\ m\ne 0.$$
The factor in parentheses is a generic linear factor. Why not the original, also linear, polynomial as a factor? The new factor has a special importance because we can *read* something important directly from it:

- $x=-\frac{b}{m}$ is the $x$-intercept of $f$.

Next, suppose a *quadratic polynomial* happens to have two real roots $x_1$ and $x_2$. They come from the *Quadratic Formula*. They give us two (or one if equal) $x$-intercepts and two (possible equal) factors:
$$f(x)=ax^2+bx+c=a(x-x_1)(x-x_2).$$
We see how the standard form is converted to the *factored form* with two linear terms. When the two roots are equal, $x_1=x_2$, we have a *complete square*:
$$f(x)=a(x-x_1)(x-x_1)=a(x-x_1)^2.$$
The $x$-intercepts coincide and so do the two factors. An irreducible quadratic polynomial, such as $x^2+1$, has no $x$-intercepts nor linear factors! We say that there is one -- irreducible quadratic -- factor.

Treating as polynomials,

- the linear factors have degree $1$, while
- the quadratic factors have degree $2$.

It is important to note that the sum of the degrees of the factors of a quadratic polynomial remains $2$.

We use the following *analogy* to better understand factoring polynomials.
$$\begin{array}{r|l}
\text{Integers}&\text{Polynomials}\\
\hline
\text{The sum and the product of two integers }&\text{The sum and the product of two polynomials }\\
\text{is an integer.}&\text{is a polynomial.}\\
\hline
\text{A prime number cannot be further }&\text{An irreducible polynomial cannot be further }\\
\text{factored into smaller integers }> 1. & \text{factored into lower degree polynomials.} \\
2,3,5,7,11,13,...&x-1,x+2,x^2+1,...\\
\hline
\text{Fundamental Theorem of Arithmetic:}&\text{Fundamental Theorem of Algebra:}\\
\text{Every integer can be represented as}&\text{Every polynomial can be represented as}\\
\text{the product of primes.}&\text{the product of irreducible factors.}\\
\hline
\text{This representation is unique,}&\text{This representation is unique,}\\
\text{up to the order of the factors.}&\text{up to the order of the factors.}\\
q=2^5\cdot 3^2\cdot 5^1\cdot...&Q=(x-1)^5\cdot (x+2)^2\cdot (x^2+1)\cdot...\\
\text{Its multiplicity is how many times it appears.}&\text{Its multiplicity is how many times it appears.}\\
\hline
&\text{Irreducible polynomials have degrees }1 \text{ and } 2.\\
&\text{The sums of the degrees of the factors of }\\
&\text{a polynomial of degree }n\text{ is }n.
\end{array}$$

It is the purpose of the factored form to display the $x$-intercepts. The fact that we can see them follows from this fundamental result about numbers.

**Theorem (Zero Factor Property).** If the product of two numbers is zero then either one of them or both is zero too. Conversely, if either one of two numbers is zero, then so is their product.

In other words, we have: $$a=0\ \texttt{ OR }\ b=0\ \Longleftrightarrow\ ab=0.$$ Then substituting $x=x_1$ into the linear polynomial $x-x_1$ makes it equal to zero -- as well as any polynomial that has it as a factor!

**Theorem (Linear Factor Theorem).** A linear factor $(x-x_1)$ is present in the factorization of a polynomial $P$ if and only if $x=x_1$ is an $x$-intercept of $P$.

Warning: the problem of *how* to factor a higher degree polynomial has no complete solution.

We have a correspondence: $$\begin{array}{|c|}\hline \quad \text{factor }(x-x_1)\ \longleftrightarrow\ x\text{-intercept } x=x_1. \quad \\ \hline\end{array}$$

**Example.** Consider the polynomial:
$$Q(x)=x(x-1)^5\cdot (x+2)^2\cdot (x-.5)\cdot(x^2+1)\cdot...$$
It has $x$-intercepts corresponding to each of its linear factors, as follows:
$$\begin{array}{rcccc}
x\text{-intercepts:}&0&1& -2&.5&...\\
\text{points on the graph:}&(0,0)&(1,0)&(-2,0)&(.5,0)&...\\
\end{array}$$
The quadratic factor doesn't contribute anything because it remains positive for all $x$. If we arrange the values of $x$, we can see what the $x$-axis looks like with the four points of the graph shown:
$$\begin{array}{rcccc}
x\text{-axis:}&-&\bullet&\bullet& \bullet&\bullet&...&\to\ x\\
&&-2&0&.5&1&...\\
\end{array}$$
$\square$

In other words, solving a polynomial equation $P(x)=0$ and factoring the polynomial $P$ is the same thing... except the former doesn't care about the *multiplicities*!

Recall what we know about the power functions, $x,\ x^2, x^3,\ ...$ (Chapter 1):

The graphs reveal that the *nature of the $x$-intercept* depends on its multiplicity:

- if the multiplicity of a linear factor is odd, the graph
*crosses*the $x$-axis (upward or downward); - if the multiplicity of a linear factor is even, the graph
*touches*the $x$-axis (from above or from below).

**Example.** We continue with the last example. We assume that the rest of the factors of our polynomial are irreducible and positive:
$$Q(x)=x(x-1)^5\cdot (x+2)^2\cdot (x-.5)\ \cdot(x^2+1)\cdot...$$
The polynomial has these $x$-intercepts and their multiplicities tell us how the graph interact with the $x$-axis:
$$\begin{array}{rccc}
x\text{-intercepts:}&0&1& -2&.5\\
\text{multiplicities:}&1&5& 2&1\\
\text{graph:}&\text{cross}&\text{cross}&\text{touch}&\text{cross}&\\
\text{options:}&\searrow&\searrow&\smile&\searrow\\
\text{options:}&\nearrow&\nearrow&\frown&\nearrow\\
\end{array}$$
There are two options for each $x$-intercept though... To find which one appears, we pick a *starting point* for the graph! How about $x=-10$? We substitute and discover that $Q(-10)<0$. Therefore, there is a point to the left of the first $x$-intercept, $x=-2$, that lies below the $x$-axis. It follows that we must cross *upward* at $x=-2$! And so on. We order the $x$-intercepts and go from left to right discovering how to cross each $x$-intercept as we reach it:
$$\begin{array}{rccc}
x\text{-values:}&-10&-2&0&.5&1& \\
y\text{-values:}&-&0&0& 0&0&\\
\text{graph:}&&\text{cross}&\text{cross}&\text{touch}&\text{cross}&...\\
&&\nearrow&\searrow&\frown&\nearrow\\
\end{array}$$
We have a rough sketch of the graph:

$\square$

**Example (plotting).** We can avoid using the multiplicities... Let's analyze this polynomial:
$$\begin{array}{lll}
f(x)&=(x^4-9x^2)(x^2-4)^2(3x^2+2)&\text{ ...we need to further factor it! }\\
&=x^2(x-3)(x+3)(x-2)^2(x+2)^2\ \cdot(3x^2+2).
\end{array}$$
With only linear factors listed, we can see the $x$-intercepts. They are simply read off the list of linear factors:
$$x=0,\ 3,\ -3,\ -2,\ 2.$$
At these points and at these points only the function may change its sign. We now list *all* the factors. They are simple enough for us to determine where and whether they change their signs:
$$\begin{array}{r|ccc}
\text{factors }& \text{ signs }\\
\hline
x^2&+&+&+&+&+&0&+&+&+&+&+\\
x-3&-&-&-&-&-&-&-&-&-&0&+\\
x+3&-&0&+&+&+&+&+&+&+&+&+\\
(x-2)^2&+&+&+&+&+&+&+&+&+&+&+\\
(x+2)^2&+&+&+&+&+&+&+&+&+&+&+\\
\hline
\text{domain }&\cdots&\bullet&\cdots&\bullet&\cdots&\bullet&\cdots&\bullet&\cdots&\bullet&\cdots&\to x\\
x=&&-3&&-2&&0&&2&&3\\
\hline
f(x)=&+&0&-&0&-&0&-&0&-&0&+\\
&\searrow&0&\smile&0&\smile&0&\smile&0&\smile&0&\nearrow
\end{array}$$
Here we went vertically in each column and determined the sign of the function using: $+\cdot-=-$, etc. An idea of what the graph of $f$ looks like is seen in the last row: it crosses the $x$-axis downward, then touches it three times from below, and then crosses it upward. We can sketch the graph based on the last row only:

The table solves for us this equation and these inequalities: $$f(x)=0,\ f(x)>0,\ f(x)\ge 0,\ f(x)<0,\ f(x)\le 0.$$ We confirm our analysis with a graphic utility:

$\square$

**Example.** This is how one solves a polynomial inequality when the polynomial is factored:

$\square$

## 6 Rational functions

We are already familiar with such a function as $$y=\frac{1}{x}.$$ Once division is introduced, the complexity of a function increases dramatically.

First, *holes in the domain* appear. As we see above, the hole in the domain corresponds to a vertical line on the $xy$-plane that the graph can't intersect! As the curve approaches this line, then, it starts to *climb*, faster and faster, up or down. The result is a virtually vertical graph close to this line. These lines are called *vertical asymptotes*. A similar behavior is seen along a certain horizontal line called a *horizontal asymptote*. If we zoom out, the ends of the graph merge with the asymptotes. They are discussed in Chapter 5.

Warning: a rational function doesn't have to have asymptotes.

**Example.** What is the domain of
$$f(x)=\dfrac{x - 1}{x + 1}?$$
Solution: We look at the denominator, set it equal to zero, $x + 1 = 0$, and solve. Then $x = -1 $ is not in the domain and the rest of the real numbers are.

$\square$

The algebra of polynomials mimics the algebra of integers. In fact, that's how the rational function appear from polynomials -- just like the rational number from integers -- from division! We continue with our *analogy* from the last section.
$$\begin{array}{r|l}
\text{Integers}&\text{Polynomials}\\
\hline
\text{The sum and the product of two integers }&\text{The sum and the product of two polynomials }\\
\text{is an integer.}&\text{is a polynomial.}\\
\hline
\text{The ratio of two integers} &\text{The ratio of two polynomials}\\
\text{is called a rational number.} & \text{is called a rational function.} \\
\hline
\text{The sum, the product, and the ratio}&\text{The sum, the product, and the ratio }\\
\text{ of two rational numbers is a rational number.}&\text{of two rational functions is a rational function.}\\
\frac{2}{3}+\frac{1}{2}=\frac{7}{3\cdot 2}&\frac{x}{x-1}+\frac{1}{x+1}=\frac{x^2+2x-1}{(x-1)(x+1)}\\
\hline
\text{The numerator and the denominator of every}&\text{The numerator and the denominator of every}\\
\text{rational number can be represented as}&\text{rational function can be represented as}\\
\text{the products of different primes.}&\text{the products of different irreducible factors.}\\
\frac{p}{q}=\frac{2^5\cdot 5^2\cdot 7^1\cdot...}{3^2\cdot 11^2\cdot ...}&\frac{P}{Q}=\frac{(x-1)^5\cdot (x+2)^2\cdot (x^2+1)\cdot...}{(x+1)^2\cdot (x-3)^1\cdot (2x^2+1)\cdot...}\\
\end{array}$$

Warning: cancelling factors will simplify the rational function, but it won't change its domain.

How do we find the $x$-intercepts of a rational function? We know all we need to know. Just as in the last section, we use the fact that substituting $x=x_1$ into the linear polynomial $x-x_1$ makes it equal to zero -- as well as any polynomial that has it as a factor (*Linear Factor Theorem*).

**Theorem.** A polynomial's $x$-intercepts are the $x$-intercepts of its numerator provided the corresponding factors don't reappear in the denominator.

Warning: All polynomials are rational functions too.

How do we find the implied domain of a rational function? We use the Linear Factor Theorem again.

**Example.** What is the domain of
$$ f(x) = \frac{x - 1}{x^{2} - 4}? $$
Set the denominator to $0$ and solve:
$$\begin{array}{rl}
x^{2} - 4 & = 0 \\
x^{2} & = 4 \\
x & = \pm 2
\end{array}$$
So the domain consists of all real numbers except $\pm 2$, or
$$\text{domain }=\{x:\ x\ne \pm 2\}=(-\infty,-2)\cup (-2,2)\cup (2,+\infty).$$
$\square$

The challenge of plotting rational functions is that the holes in the domain break the graph into separate branches.

**Example.** Consider the rational function:
$$f(x)=\frac{x^2\cdot (x+2)\cdot (x-1)\cdot(x^2+1)}{(x+1)\cdot(x-3)^2 \cdot(x^2+2)}.$$
We analyze these two polynomials separately and derive different information about the function:
$$\begin{array}{rccc}
x\text{-intercepts:}&-2&&0&1&\\
\text{asymptotes:}&&-1&&&3&\\
\end{array}$$
The quadratic factors don't contribute anything. This is what the $x$-axis looks like with the three points of the graph and two holes in the domain shown:
$$\begin{array}{rccc}
x\text{-axis:}&-&\bullet&\circ& \bullet&\bullet&\circ&...&\to\ x\\
&&-2&-1&0&1&3&\\
\end{array}$$
The numerator's roots and their multiplicities tell us whether the graph goes across the $x$-axis or stays on the same side:
$$\begin{array}{rccc}
x\text{-intercepts:}&-2&0&1\\
\text{multiplicities:}&1&2& 1\\
\text{graph:}&\text{cross}&\text{touch}&\text{cross}&\\
\end{array}$$
The denominator's roots and their multiplicities tell us whether the graph jumps across the $x$-axis or stays on the same side:
$$\begin{array}{rccc}
\text{asymptotes:}&-1&3\\
\text{multiplicities:}&1&2\\
\text{graph:}&\text{jump}&\text{stay}&\\
\end{array}$$
There are still two options for each of these points. Just as in the last section, we need a *starting point* and choose $x=-10$. Since $f(-10)<0$, we have a point to the left of the left-most $x$-intercept, $x=-2$, that lies below the $x$-axis. It follows that we must cross *upward* at $x=-2$, and so on:
$$\begin{array}{rccc}
x\text{-values:}&-10&-2&-1&0&1&3& \\
\text{graph:}&-&\bullet&\circ&\bullet&\bullet&\circ&\\
\text{graph:}&&\text{cross}&\text{jump}&\text{touch}&\text{cross}&\text{stay}\\
&&&\nearrow\quad&&&\nearrow\nwarrow\\
x-\text{axis:}&&\nearrow&\vdots&\frown&\nearrow&\vdots&\\
&&&\quad\swarrow&&&\\
\end{array}$$
We have a rough sketch of the graph:

$\square$

**Example.** We can avoid using multiplicities in this way. Let's analyze this rational function:
$$f(x) = \frac{x(3x^{2} + 1)}{(x-1)(x+1)}.$$
First, the domain is all reals except $x=\pm 1$. We now need find the signs of the factors and then the signs of the function. We take note of the domain and list all the factors present:
$$\begin{array}{r|ccc}
\text{factors }& \text{ signs }\\
\hline
x&-&-&-&0&+&+&+\\
3x^{2} + 1 &+&+&+&+&+&+&+\\
x-1 &-&-&-&-&-&0&+\\
x+1 &-&0&+&+&+&+&+\\
\hline
x\text{-axis}&&\circ&&\bullet&&\circ&& \longrightarrow x\\
x=&&-1&&0&&1&&\\
\hline
f(x)&-&\vdots&+&0&-&\vdots&+\\
\end{array}$$
We confirm the result by plotting:

$\square$

This is the summary of where the information about the graph of a rational function comes from:

**Example.** So, the domain is entirely determined by the roots of the denominator of the rational function, $f(x)=P(x)/Q(x)$. What about the *range*? The example of the negative powers indicates the range of possibilities:

So,

- if $n$ is odd, the range of $\frac{1}{x^n}$ is $(-\infty,0)\cup (0,+\infty)$;
- if $n$ is even, the range of $\frac{1}{x^n}$ is $(0,+\infty)$.

The example of $f(x)=\frac{1}{x^2+1}$ shows that the range doesn't have to be infinite:

$\square$

## 7 Algebraic functions

What if -- in addition to the arithmetic operations and the composition -- we also consider inverses of these functions?

The roots appear as the *inverses of the power functions*, i.e., $x^n$ for a positive integer $n$:

- $y=\sqrt{x}$ is the inverse of $x=y^2,\ y\ge 0$;
- $y=\sqrt[3]{x}$ is the inverse of $x=y^3$;
- $y=\sqrt[4]{x}$ is the inverse of $x=y^4,\ y\ge 0$;
- ...
- $y=\sqrt[n]{x}$ is the inverse of $x=y^n$ with domain $y\ge 0$ when $n>1$ is even.

**Example.** Consider the function
$$ \sqrt{ x - \sqrt{x}}. $$
This is its diagram:
$$\begin{array}{ccccccccccccccc}
f:& x & \mapsto & \begin{array}{|c|}\hline
&x&
\begin{array}{lcccl}
\nearrow &x &\mapsto &x & \mapsto & x & \searrow\\
\\
\searrow &x &\mapsto &\begin{array}{|c|}\hline\quad \sqrt{\quad} \quad \\ \hline\end{array} &
\mapsto & u & \nearrow\\
\end{array}&
\begin{array}{|c|}\hline\quad - \quad \\ \hline\end{array}
\mapsto & z \\ \hline \end{array}
& \mapsto & z
\end{array}$$

Find the domain. Whatever is inside the square root can't be negative. So, we need to find all $x$ for which

- first, $x \geq 0$, i.e., $x$ is positive; and
- second, $x - \sqrt{x} \geq 0$.

Solve it: $$ \begin{aligned}x & \geq \sqrt{x} \\ x^{2} & \geq x \\ x & \geq 1 \end{aligned}$$ The domain is $$D = [1, \infty). $$ $\square$

**Example.** Given
$$ y = \sqrt{u} + \sqrt{4 - u},$$
find the domain, i.e., find *all* $u$'s for which the formula makes sense.

Make sure that $\sqrt{\, ?\,}$ makes sense, i.e., what's inside cannot be negative.

- $\sqrt{u}\ \Longrightarrow\ u \geq 0$;
- $\sqrt{4 - u} \ \Longrightarrow\ 4 - u\ge 0$, solve: $ u \leq 4$.

Each $u$ in the domain must satisfy both inequalities, $$u \geq 0 \text{ AND } u \leq 4.$$ Hence, the domain is: $$ D = [0,4]. $$ $\square$

Once the roots are understood, a new **notation** is introduced:

- $x^{1/2}=\sqrt{x},$
- $x^{1/3}=\sqrt[3]{x},$
- $x^{1/4}=\sqrt[4]{x},$
- ...
- $x^{1/n}=\sqrt[n]{x}$ for any positive integer $n$.

Furthermore, we can have **notation** any *rational power*, $x^p$. Indeed, if $p=m/n$, where $m,n$ are integers with $n\ne 0$, then we define:
$$x^{m/n}=\sqrt[n]{x^m}.$$

## 8 Functions with symmetries

The graphs of some of the functions that we have seen have discernible features. For example, these power function have *symmetries* and which ones depend on the degree:

The pieces of paper with the graphs in the second row (even powers) can be folded along the $y$-axis and the left and the right branches will *merge*. This won't happen with the graphs in the first row (odd powers) even though the two branches seem identical...

A subset of the plane (or the line) have a symmetry if we can transform it into itself via some transformation of the plane. These transformation are familiar from using a graphics editor:

Here is an example. A circle is drawn on a piece of paper and then a piece of glass is put vertically through its center. But, is this a piece of transparent glass or a mirror?

The symmetry is such that we see a circle no matter what. We call it an *axis of symmetry*.

These are a few sets with the axis of symmetry indicated:

As we can see, some sets have more than one axis of symmetry. This is what happens if we put a second mirror (or a transparent glass) on top of a circle drawn on a piece of paper:

Now we are to find the transformations behind the symmetries of these sets on the plane. But, just as in Chapter 2, we start with a *line*. Remember, all functions are transformations of the line, but we will take only the three simplest:

- shift (translation),
- stretch, and
- flip (reflection).

Now the plane.

We will rely on the information about how transforming the axes transforms graphs of functions discussed in the last chapter. Recall that that the transformations of the axes are transformations of the *plane* -- vertical and horizontal respectively.

A vertical shift: the graph of a function will never be transformed into itself with this shift.

The *horizontal shift*:
$$\newcommand{\ra}[1]{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!}
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.}
\begin{array}{ccc}
(x,y)& \ra{ \text{ right } k}& (x+k,y).
\end{array}$$

Recall that if the graph of $G$ is the graph of $f$ shifted $k$ units to the right, then
$$ G(x) = f(x-k),$$
and vice versa. The new function has the exact same *shape* of the graph as the old one. So, the function *repeats* itself.

**Definition.** A function $f$ is called *periodic* if
$$f(x+T)=f(x)$$
for all $x$ in the domain of $f$. The smallest such $T$ is called the *period* of $f$.

The *vertical flip*:
$$\newcommand{\ra}[1]{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!}
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.}
\begin{array}{ccc}
(x,y)& \ra{ \text{ vertical flip } }& (x,-y).
\end{array}$$

If the graph of $H$ is the graph of $f$ flipped vertically then $$ H(x) = - f(x), $$ and vice versa.

The *horizontal flip*:
$$\newcommand{\ra}[1]{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!}
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.}
\begin{array}{ccc}
(x,y)& \ra{ \text{ horizontal flip } }& (-x,y).
\end{array}$$

If the graph of $y = G(x)$ is the graph of $y = f(x)$ flipped horizontally, then $$ G(x) = f(-x), $$ and vice versa.

The *combination of vertical and horizontal flips:*
$$\newcommand{\ra}[1]{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!}
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.}
\begin{array}{ccc}
(x,y)& \ra{ \text{ horizontal flip } }& (-x,-y).
\end{array}$$

If the graph of $y = G(x)$ is the graph of $y = f(x)$ flipped horizontally, then $$ G(x) = -f(-x), $$ and vice versa.

These flips can also be described “a mirror reflection about the $x$-axis” and “a mirror reflection about the $y$-axis” respectively.

Two of them combined don't give a mirror image anymore; it's a *rotation*.

To symmetry of graphs:

A vertical stretch will not preserve the function except for $f(x)=0$. A horizontal stretch will not preserve the function except for $f$ is constant.

**Exercise.** Is the composition of two functions that are both odd/even odd/even?

**Exercise.** Half of the graph of an even function is shown below; provide the other half:

**Exercise.** Half of the graph of an odd function is shown below; provide the other half:

**Exercise.** Plot the graph of a function that is both odd and even.

**Exercise.** Is the inverse of an odd/even function odd/even?

## 9 Trigonometric functions

One encounters numerous examples of repetitive phenomena.

However, none of the functions introduced so far exhibits such a behavior! We need a new class of functions.

The trigonometric functions initially come from plane geometry. Suppose we have a right triangle with sides $a,b,c$, with $c$ the longest one facing the right angle.

If $\alpha$ is the angle adjacent to side $a$, then $$\begin{array}{ll} \cos \alpha &=\frac{a}{c};\\ \sin \alpha &=\frac{b}{c};\\ \tan \alpha &=\frac{b}{a}. \end{array}$$

We think of $\cos \alpha$ as the length of the shadow of the stick of length $1$ turned the angle $\alpha$ in the ground when the sun is above it and $\sin x$ as the length of its shadow on the wall at sunset... Alternatively, the stick is still and it is the sun that is moving:

However, in a triangle, the value of angle $\alpha$ can only be from $0$ to $\pi/2$. We construct $y=\sin (x)$ and $y=\cos (x)$ as functions defined for all values of $x$.

**Definition.** Suppose a real number $x$ is given. We construct a line segment of length $1$ on the plane starting at $0$. Then

- the
*cosine*of $x$, denoted by $\cos x$, is the horizontal coordinate of the end of the segment, - the
*sine*of $x$, denoted by $\sin x$ is the vertical coordinate of the end of the segment.

The domains for $\sin$ and $\cos$ are all real numbers.

Neither function is one-to-one and, therefore, there are no inverses. However, what we did with $y=x^2$ vs. $x=\sqrt{x}$ we repeat here:

- restrict the domains of these functions to be able to define their inverses.

We choose the branch of $\sin$ over $-\pi/2 \le x \le \pi/2$.

**Theorem.** The $\sin$ function is one-to-one on $[-\pi/2,\pi/2]$.

**Definition.** The *arcsine* is defined to be the inverse of the sine function on $[-\pi/2,\pi/2]$.

Thus, we have a pair of inverse functions: $$y=\sin x,\ x\in [-\pi/2,\pi/2], \quad\text{ and }\quad x=\sin^{-1}y,\ y\in [-1,1].$$

The graphs are of course the same with just $x$ and $y$ interchanged.

Similarly, we choose the branch of $\cos$ over $0 \le x \le \pi$.

**Theorem.** The $\cos$ function is one-to-one on $[0,\pi]$.

**Definition.** The *arccosine* is defined to be the inverse of the cosine function on $[0,\pi]$.

Thus, we have a pair of inverse functions: $$y=\cos x,\ x\in [0,\pi], \text{ and } x=\cos^{-1}y,\ y\in [-1,1].$$

**Definition.** The tangent function is defined to be
$$\tan x =\frac{\sin x}{\cos x}.$$

To find the domain of a fraction, we set the denominator equal to $0$ and solve. Find all $x$'s: $$\cos x = 0 \ \Longrightarrow\ x = ...,\ \frac{\pi}{2},\ \frac{3\pi}{2},\ \frac{5\pi}{2},\ ...$$ Then we should choose the branch of $\tan$ over $-\pi/2< x< \pi/2$.

**Theorem.** The $\tan$ function is one-to-one on $(-\pi/2,\pi/2)$.

**Definition.** The *arctangent* is defined to be the inverse of the tangent function on $(-\pi/2,\pi/2)$.

Then, we again have a pair of inverse functions: $$y=\tan x,\ x\in (-\pi/2,\pi/2), \text{ and } x=\tan^{-1}y,\ y\in (-\infty,+\infty).$$

**Theorem.** The functions $\sin$ and $\cos$ are periodic with period $2\pi$, while the function $\tan$ is periodic with period $\pi$; i.e.,
$$ \begin{aligned}
\sin( x + 2 \pi ) & = \sin x, \\
\cos(x + 2\pi) & = \cos x, \\
\tan(x + \pi) & = \tan x, \\
\end{aligned}$$
for all $x$.

**Theorem.** The functions $\sin$ and $\tan$ are odd and the function $\cos$ is even.

There are important relations between trigonometric functions.

Suppose we have a right triangle with the longest one (facing the right angle) of length $1$.

First, a familiar result restated.

**Theorem (Pythagorean Theorem).**
$$\sin^2x=\cos^2x=1.$$

Second, for either of the two other angles of the triangle, we have $$\begin{array}{ll} \cos (\text{ angle } )&=\text{ adjacent side };\\ \sin (\text{ angle } )&=\text{ opposite side }. \end{array}$$ If we apply these formulas to either of the angles, we have the following.

**Theorem.**
$$\sin x =\cos (\pi/2-x) \text{ and } \cos x=\sin(\pi/2-x).$$

Combining this fact with the periodicity gives us the following.

**Corollary.**
$$\sin x =\cos (x+\pi/2) \text{ and } \cos x=\sin(x-3\pi/2).$$

Therefore the graphs of one function is just a horizontally shifted version of the other. That is why *sine and cosine have identical graphs*.

## 10 The exponent

Where does it come from? Remember this simple algebra:

- Addition: $2 + 2 + 2 = 2 \cdot 3 \leadsto$ multiplication.

That's how multiplication was “invented” -- as repeated addition. What about *repeated multiplication*?

- Multiplication: $2 \cdot 2 \cdot 2 = 2^{3} \leadsto$ exponent.

Here we have: $$\begin{array}{rl} &\text{exponent}\\ &\downarrow\\ &\small{3}\\ 2\\ \uparrow\\ \text{base} \end{array}$$

Now the *algebraic properties of the exponent*...

*Multiplication property:*
$$a^{m} \cdot a^{n} = a^{m + n}$$

As in: $$\begin{aligned} 2^{3} \cdot 2^{2} & = (2 \cdot 2 \cdot 2) \cdot (2 \cdot 2 ) \\ & = 2 \cdot 2 \cdot 2 \cdot 2 \cdot 2& = 2^{5}. \end{aligned}$$

*Division property:*
$$\dfrac{a^{m}}{a^{n}} = a^{m-n}$$

Just canceling, as in: $$\frac{2^{4}}{2^{2}} = \frac{2 \cdot 2 \cdot 2 \cdot 2}{2 \cdot 2} = 2 \cdot 2 = 2^{2}. $$

*Power property:*
$$(a^{m})^{n} = a^{mn} = (a^{n})^{m}.$$

As in: $$ \begin{aligned} (2^{3})^{2} & = 2^{3} \cdot 2^{3} \\ & = ( 2 \cdot 2 \cdot 2 ) ( 2 \cdot 2 \cdot 2 ) \\ & = 2^{6}. \end{aligned}$$

*Distributive property:*
$$(ab)^{n} = a^{n} b^{n}.$$

**Example.** Bacteria double in number every day. Then,
$$10 \text{ days: } 10 \cdot 2^{10} = 10.1024 = 10,240.$$
$\square$

Now the exponent *as a function*...

We would like to have a function defined for all $x$, i.e., domain = $(-\infty, \infty)$. So far, $a^{x}$ is defined only if $x$ is a positive integer (and $a>0$).

Let's try to fill in the blanks... What about $x = \frac{1}{2}$?

What is $$ 2^{\frac{1}{2}} = ? $$ As before, we interpret it as $\sqrt{2}$, which is a number $u$ such that $$ u^{2} = 2. $$ Similarly for $x = \dfrac{1}{3}$, we have $$ 2^{\frac{1}{3}} = \sqrt[3]{2}. $$

We get more and more but there are still gaps:

**Example.** Consider what happens to a $\$1000$ deposit with $10\%$ annual interest, compounded yearly:
$$ \begin{aligned}
\$ 1000, 1000 \cdot 1.10 & = 1000 + 10\% \textrm { of } 1000 \\
\textrm{begin, after 1 year } & = \textrm{ principal } + \textrm{ interest} \\
& = 1000 + 1000 \cdot .10 \\
& = 1000(1 + 0.1 ) \\
& = 1000 \cdot 1.1 .
\end{aligned}$$
After $x$ years: $1000\cdot 1.1^{x}$, where $x$ is a positive integer. $\square$

More generally, $$ 2^{\frac{p}{q}} = \sqrt[q]{2^{p}} $$ Here $\dfrac{p}{q}$ is a rational number, i.e., $p, q$ are integers with $p \neq 0$.

This is our interpretation of *rational* exponents.

Even though the points seem to form a curve, there are still “invisible” gaps! Indeed, irrational $x$'s are missing:
$$x= \sqrt{2},\ \sqrt{3},\ \pi .$$
What happens is, roughly, that we define the function for *irrational* exponents by “approximating” them with rational numbers. It is called the “limit” to be discussed later.

Furthermore, there is an exponential function for each real $a > 0$.

we nest consider the *properties of the exponential function*.

Let's collect some facts about the graph of this function:

- the domain is $(-\infty,+\infty)$;
- the range is $(0, \infty)$;
- the $y$-intercept is $(0, 1)$;
- there are no $x$-intercepts.

Indeed term “exponential growth” makes sense: the graph of $2 ^{x}$ is rising. The general result is the following.

**Theorem (Monotonicity of Exponent).**
$$ \begin{aligned}
a^{x} & \textrm{ is increasing if } a > 1, \\
a^{x} & \textrm{ is decreasing if } a < 1,
\end{aligned} $$
for $a > 0$ and $a \neq 1$.

**Proof.** Suppose $x_1$ and $x_2$ are integers and $x_1<x_2$. Then the following is derived from the rules of inequalities:
\begin{array}{lll}
a>1&\Longrightarrow& a^{x_1}>a^{x_2},\\
0<a<1&\Longrightarrow& a^{x_1}<a^{x_2}.
\end{array}
The non-integer exponents will be addressed later. $\blacksquare$

**Example.** A familiar exercise is to plot $2^{3x}$. Once we have, point by point, we realize that it looks very similar to the exponential functions we have seen:

A bit of algebra reveals the connection:
$$2^{3x} = (2^{3})^{x} = 8^{x}.$$
It *is* an exponential function (base $8$). So, turns out $8^{x}$ is $2^{x}$ shrunk horizontally by a factor of $3$. $\square$

**Example.** It is even easier to recognize $2^{-x}$ as a exponential function:
$$2^{-x}= \frac{1}{2^{x}}= \left(\frac{1}{2}\right)^{x}.$$

This is an exponential function (base $1/2$). So, turns out $2^{-x}$ is $2^{x}$ flipped about the $y$-axis. $\square$

*Lesson:* We can get all exponential functions by stretching and flipping one of them.

So, just as we need only one quadratic polynomial, $x^2$, we only need *one* exponential function!

Which one? It is $e^{x}$, the *natural base exponent*. It has a special property: it crosses the $y$-axis at $45$ degrees:

**Example.** Population growth: $50$ babies per $10,000$ of population.
$$ \frac{50}{10000} = 0.005. $$
Therefore,
$$ 1,000,000 \cdot 1.005^{x}. $$
What is the multiple? It's the base of exponent. $\square$

## 11 The logarithm

**Example.** Bacteria doubles every day. How long does it take to go $8$-fold? Start with equation and solve
$$ 2^{x} = 8, $$
where $x$ is the time in days. Then
$$ x = \log_{2} 8. $$
The *logarithm* base $2$ is the inverse of the exponential function base $2$. $\square$

**Example.** Solve the following for $x$.
$$ y = 2^{x-5} = 3. $$
To “kill” the exponent and get to $x$, apply its *inverse* -- to both sides of the equation: $\log_{2} y$ (same base!). Then
$$ \log_{2} (2^{x - 5}) = \log_{2} (3) $$
Use the property of the inverse and “cancel”:
$$ \begin{aligned}
x - 5 & = \log_{2} 3 \\
x & = \log_{2} 3 + 5.
\end{aligned} $$
If $a^{x} = y$ then $x = \log _{a} y$, and vice versa. Recall also this: if
$$ a \cdot a \cdot ... a = ax, $$
$x$ times, then
$$ \log_{a} \underbrace{a \cdot a \cdot ... a}_{x \textrm{ times}} = x. $$
$\square$

**Example.**
$$ \begin{alignat}{2}
\log_{10} 100 & = 2 & \quad \log_{5} 125 = 3 \\
\log_{2} \frac{1}{2} & = -1 & \quad \log_{2}\sqrt{2} &= \frac{1}{2}.
\end{alignat} $$
$\square$

**Definition.** The *logarithm* base $a$ of $y$, $\log_{a} y$, is the power to which you have to raise $a$ to get $y$.

Consider: $$ \begin{aligned} \log_{a} \underbrace{ ( a^{m}\cdot a^{n} ) }_{\textrm{multiplication}} & = \log_{a} (a^{m + n}) \\ & = m + n \\ & = \log_{a} a^{m} \underset{\textrm{addition}}{+} \log_{a} a^{n} \\ \Longrightarrow \log_{a} (a^{m}\cdot a^{n}) & = \log_{a} a^{m} + \log_{a} a^{n}. \end{aligned} $$

**Properties of logarithm**

- $$ \log_{a}(xy) = \log_{a} x + \log_{a} y ;$$
- $$ \log_{a} \left(\frac{x}{y}\right) = \log_{a} x - \log_{a} y; $$
- $$ \log_{a} (x^{y}) = y \log_{a} x .$$

**Proof.** Given $x = a^{n}$, compute:
$$ \begin{aligned}
\log_{a} (a^{n})^{y} & = \log_{a} a^{ny} \\
& = yn \\
& = y \log_{a} x.
\end{aligned}$$
$\blacksquare$

Thus, each property of $ \log $ corresponds to a property of $\exp$.

**Example.** Find a representation $y=Ca^{x}$ for this graph:

Pick two points on the graph and use them to write two equations for $f(x) = C a^{x}$:

- $(0, 2)$ on the graph $\Longrightarrow x = 0,\ y = 2 \Rightarrow Ca^{0} = 2 \Rightarrow C = 2 $;
- $(2, .25)$ on the graph $\Longrightarrow x = 2,\ y = .25 \Rightarrow 2a^{2} = .25 $

$\square$

We can solve a variety of problems about the exponential function with the logarithm using the fact that the two, $\ln ?$ and $e^{?}$, always cancel each other: $$ \left.\begin{aligned} \ln e^{x} & = x \text{ for any } x \\ e^{\ln x} & = x \text{ for any } x>0 \end{aligned} \right\}\qquad \text{ cancellation property }$$

Now about the logarithm *as a function*... We simply use what we know about the exponent and what we know about inverses:

- the domain of $y=\log_a x$ is $(0,\infty)$,
- the range of $y=\log_a x$ is $(-\infty,\infty)$,
- $y=\log_a x$ is increasing when $a>1$ and decreasing when $0<a<1$.

**Example (population loss).** City loses $7\%$ of population every year - *exponential decline*:
$$\overbrace{( \underbrace{\underbrace{(1,000 \cdot 0.93 )}_{\textrm{after 1 year}} \cdot 0.93}_{\textrm{after 2 years}} ) \cdot 0.93}^{\textrm{after 3 years}}.$$
Here the multiple is $< 1$, hence it is decreasing.

$\square$

**Example (population growth).** Population grows by $10\%$ a year. How long will it take to double?
$$ y = Ce^{kx}, \quad x \text{ time }, \quad k=? $$
look at the algebra: assume
$$y(0) = 1,$$
then
$$y(1) = 1.1$$
Substitute these into the model:
$$\begin{array}{lll}
Ce^{k\cdot 0} & = 1 &\Longrightarrow &C = 1 \\
Ce^{k\cdot 1} & = 1.1 &\Longrightarrow &e^{k} = 1\\
\to k &= \ln 1.1.
\end{array} $$

To answer the question, we are looking for $x$, time, satisfying: $$\begin{array}{lll} y(x) & = 2, &\text{ substitute} \\ e^{kx} & = 2, & \text{ solve } \\ kx & = \ln 2 \\ x &= \frac{\ln 2}{k} &= \frac{\ln 2}{\ln 1.1}. \end{array} $$ $\square$

**Example.** Find the inverse of
$$y = \frac{e^{x}}{1 + 2e^{x}}.$$
Plan: solve the equation for $x$ while checking that it is one-to-one:
$$ \begin{aligned}
y ( 1 + 2e^{x}) & = e^{x} \\
y + y2e^{x} & = e^{x} \\
2ye^{x} - e^{x} & = -y \\
(2y - 1 ) e^{x} & = - y \\
\Longrightarrow e^{x} & = -\frac{y}{2y - 1 }
\end{aligned}$$
Apply the inverse, which is $\ln$, to both sides of the equation:
$$ \underbrace{\ln e^{x}}_{x} = \ln\left(-\frac{y}{2y - 1}\right) \Longrightarrow\ x = \ln\left(-\frac{y}{2y - 1}\right) $$
To find the domain, solve:
$$ \left. \begin{aligned}
2y - 1 & \neq 0 \\
-\frac{y}{2y - 1} & > 0
\end{aligned} \right\}
\Longrightarrow\ D=(0,1/2).$$
$\square$

**Example.** Find the inverse of
$$ f(x) = e^{x^{3}}.$$
Warning: this is not $(e^{x})^{3}$.

Method: Equation: $y = e^{x^{3}}$, solve for $x$. To get to $x$, we need to get rid of the exponent. To cancel it, apply its inverse to both sides.

For $e^{x}$, it's $\ln$: $$ \begin{aligned} \ln y & = \ln e^{x^{3}} \\ \ln y & = x^{3} \end{aligned} $$ Apply the inverse to get to $x$ $$\begin{array}{rll} \sqrt[3]{\ln y} & = \sqrt[3]{x^{3}} \\ & = x \end{array}$$ Answer: $ f^{-1}(y) = \sqrt[3]{\ln y} $. $\square$

## 12 Change of variables

The variables of the functions we are considering are quantities we meet in real life. These quantities often have multiple ways to be measured:

- length and distance: inches, miles, kilometers, light years;
- time: minutes, seconds, hours, years;
- weight: pounds, kilograms, karats;
- temperature: degrees of Celsius, of Fahrenheit;
- currency: dollars, euros, pounds, yen;
- etc.

**Example.** Suppose we have a function $f$ that records the temperature -- in Fahrenheit -- as a function of time -- in minutes. Now, what $f$ should be replaced with if we want to records the temperature in Celsius as a function of time in seconds?

Let's name the variables:

- $s$ time in seconds;
- $m$ time in minutes;
- $F$ temperature in Fahrenheit;
- $C$ temperature in Celsius.

Then the original function is $$F=f(m),$$ and it is to be replaced with some $$C=g(s).$$

First, we need the *conversion formulas* for these units. First, the time. This is what we know:
$$1 \text{ minute } = 60 \text{ seconds }.$$
However, this is not the formula to be used to convert $s$ to $m$ because these are the *number* of seconds and the *number* of minutes respectively. Instead, we have:
$$m=s/60.$$

Second, the temperature: $$C=(F-32)/1.8.$$

These are the relations between the four quantities: $$g:\quad s \xrightarrow{\quad s/60 \quad} m \xrightarrow{\quad f\quad} F \xrightarrow{\quad (F-32)/1.8\quad} C.$$

The answer to our question is, we replace $f$ with $g$, the *composition* of the above functions:
$$F=g(s)=(f(s/60)-32)/1.8.$$

Note that both of the conversion formulas are one-to-one functions! That's what guarantees that the conversions are unambiguous and reversible. More precisely, we say that these functions are *invertible*. Indeed, for the time:
$$s=60m,$$
and for the temperature:
$$F=1.8C+32.$$
$\square$

Mathematically, we see such a transition as a *change of variables*. Usually, it is done one at a time: either the dependent or the independent variable.

Note: We can interpret every composition as a change of variables.

**Example.** Suppose $t$ is time and $x$ is the location. Suppose also that function $g$ represents the change of units of length, such as from miles to kilometers:
$$z=g(x)=1.6x.$$
Then, the change of the units will change very little; the coefficient, $m=1.6$, is the only adjustment necessary. If $f$ is the distance in miles, then $h$ is the distance in kilometers: $h(t)=1.6f(t)$. Thus, all the functions are replaced with their multiples.
$\square$

**Example.** Degrees and radians:
$$\pi \text{ radians } = 180 \text{ degrees }. $$
Therefore, the conversion of the number of degrees $d$ to the number of radians $r$ is:
$$r=\frac{\pi}{180}d.$$
$\square$

Note that all of the conversion formulas have been provided by *linear functions*. Then

- a linear change of variables will cause the $x$-axis or the $y$-axis to shift, stretch, or flip.

Therefore, from what we know about transformations of functions' graphs,

- a linear change of variables will cause the graph of the function to shift, stretch, or flip.

Some nonlinear changes of variables are also known.

**Example.** The loudness of sound (the decibel) and the magnitude of earthquakes (the Richter scale) are measured on a *logarithmic scale*. This scale is based on orders of magnitude rather than a linear scale, i.e., the next mark on the scale corresponds to the previous mark multiplied by a given value, such as $10$:

Spreadsheet has an option to switch the scale in just a couple of clicks. For example, we can see how the graph of an exponential function becomes *linear* over a logarithmic scale (the $y$-axis):

$\square$

**Exercise.** Establish algebraic relation between the quantities listed in the beginning of the section.

## 13 Systems of linear equations

**Problem 1:** Suppose we have coffee that costs $\$3$ per pound. How much do we get for $\$60$?

Solution: $$3x=60\ \Longrightarrow\ x=\frac{60}{3}.$$

**Problem 2:** Given: Kenyan coffee - $\$2$ per pound, Colombian coffee - $\$3$ per pound. How much of each do you need to have $6$ pounds of blend with the total price of $\$14$?

The setup is the following. Let $x$ be the weight of the Kenyan coffee and let $y$ be the weight of Colombian coffee. Then the total price of the blend is $\$ 14$. Therefore, we have a system: $$\begin{cases} x&+y &= 6 ,\\ 2x&+3y &= 14. \end{cases}$$

Solution: From the first equation, we derive: $y=6-x$. Then substitute into the second equation: $2x+3(6-x)=14$. Solve the new equation: $-x=-4$, or $x=4$. Substitute this back into the first equation: $(4)+y=6$, then $y=2$.

We can think of the two equations $$\begin{array}{ll} x&+y &= 6 ,\\ 2x&+3y &= 14, \end{array}$$ as representations of two lines on the plane. Then the solution $(x,y)=(4,2)$ is the point of their intersection:

Let's collect the data in tables as follows:
$$\begin{array}{|ccc|}
\hline
1\cdot x&+1\cdot y &= 6 \\
\hline
2\cdot x&+3\cdot y &= 14\\
\hline
\end{array}\leadsto
\begin{array}{|c|c|c|c|c|c|c|}
\hline
1&\cdot& x&+&1&\cdot& y &=& 6 \\
2&\cdot& x&+&3&\cdot&y &=& 14\\
\hline
\end{array}\leadsto\left[
\begin{array}{cc|c}
1&1&6 \\
2&3&14\\
\end{array}\right]$$
This table on left is made of the coefficients of $x$ and $y$. It is called an *matrix*. The whole table also includes the values in the right-hand sides of the equations. It is called an *augmented matrix*.

**Exercise.** Set up a system of linear equations -- but do not solve it -- for the following problem: “An investment portfolio worth $\$1,000,000$ is to be formed from the shares of: Microsoft - $\$5$ per share and Apple - $\$7$ per share. If you need to have twice as many shares of Microsoft than Apple, what are the numbers?”

**Exercise.** Set up, do not solve, the system of linear equations for the following problem: “One serving of tomato soup contains $100$ Cal and $18$ g of carbohydrates. One slice of whole bread contains $70$ Cal and $13$ g of carbohydrates. How many servings of each should be required to obtain $230$ Cal and $42$ g of carbohydrates?”

**Exercise.** Solve the system of linear equations:
$$\begin{cases}
x-y&=2,\\
x+2y&=1.
\end{cases}$$

**Exercise.** Solve the system of linear equations and geometrically represent its solution:
$$\begin{cases}
x-2y&=1,\\
x+2y&=-1.
\end{cases}$$

**Exercise.** Geometrically represent this system of linear equations:
$$\begin{cases}
x-2y&=1,\\
x+2y&=-1.
\end{cases}$$

## 14 The Euclidean spaces of dimensions $1$ and $2$

The idea of a coordinate system is to transition from

*geometry*: points, then lines, triangles, circles, then planes, cubes, spheres, etc., to*algebra*: numbers, then combinations of numbers, then functions, etc.

This will allow us to solve geometric problems *without measuring*. We will initially limit ourselves to the two simplest geometric tasks:

- 1. finding the distance between two points, and
- 2. finding the difference between the directions from a point to other points.

We start with *dimension* $1$.

Suppose we live on a *road* surrounded by nothingness.

The coordinate system intended to capture what happens on this road is devised to be superimposed on the road.

It is built in several stages:

- 1. a line is drawn, the $x$-
*axis*; - 2. one of the two direction on the line is chosen as
*positive*, then the other is*negative*; - 3. a point $O$ is chosen as the
*origin*; - 4. a segment of the line is chosen as the
*unit*of length; - 5. the segment is used to measure distances to locations from the origin $O$ -- positive in the positive direction and negative in the negative direction -- and add marks to the line, the
*coordinates*, later the segments are further subdivided to fractions of the unit, etc.

The result looks similar to a *ruler*:

Just as before, we have set up a correspondence:

- location $P\ \longleftrightarrow\ $ number $x$,

that works in *both directions*. For example, suppose $P$ is a *location* on the line. We then find the distance from the origin -- positive in the positive direction and negative in the negative direction -- and the result is the coordinate of $P$, some *number* $x$. We use the nearest mark to simplify the task.

Conversely, suppose $x$ is a *number*. We then measure $x$ as the distance to the origin -- positive in the positive direction and negative in the negative direction -- and the result is a *location* $P$ on the line. We use the nearest mark to simplify the task.

**Definition.** The *coordinate* $x$ of a point $P$ on the $x$-axis is the signed distance from $O$ to $P$, i.e., $x>0$ when $P$ is to the right of $O$ and $x<0$ when $P$ is to the left of $O$.

Once the coordinate system is in place, it is acceptable to think of location as numbers and vice versa. In fact, we can write: $P=x$.

Now that everything is *pre-measured* we can solve those geometric problems by algebraically manipulating the coordinates of points.

Let's consider the first geometric task, *distance*. We introduce two concepts describing how far apart locations $P$ and $Q$ are.

**Definition.** The *signed distance from location $P$ to location $Q$* is the difference of their coordinates; i.e., if $P$ and $Q$ are given by their coordinates $x$ and $x'$, then the distance from $P$ to $Q$ is
$$x'-x.$$

Thus, the order matters! The signed distance from $x$ to $x'$ is

- positive when $x<x'$,
- negative when $x>x'$.

The signed distance from $P$ to $Q$ is not the same as the signed distance from $Q$ to $P$. In fact, one is the negative of the other: $$x-x'=-(x'-x).$$

The next definition is meant to erase this difference.

**Definition.** The *unsigned distance between locations $P$ and $Q$* given by their coordinates $x$ and $x'$ is

- $x'-x$ when $x<x'$,
- $x-x'$ when $x>x'$.

Thus, the order *doesn't* matter! Furthermore, the unsigned distance between two locations is always positive unless the locations coincide.

The word “unsigned” is typically omitted.

Fortunately, we have the *absolute value* to provide us with a single formula.

**Theorem (Distance Formula for dimension $1$).** The distance between points with coordinates $x$ and $x'$ is the absolute values of the difference:
$$|x-x'|=|x'-x|.$$

A frequently used property of the absolute value function is the following.

**Theorem (Triangle Inequality).** For any two numbers $a,b$, we have:
$$|a+b|\le |a|+|b|.$$

**Proof.** $\blacksquare$

The name of the theorem comes from a similar property of the lengths of the sides of a triangle $a,b,c$: $$|c|<|a|+|b|.$$

When the triangle degenerates into a segment, we have the triangle inequality for numbers.

Now the second geometric task, *directions*. What is the difference between the directions from the origin $O$ toward locations $P$ and $Q$ (other than $O$) represented in terms of their coordinates $x$ and $x'$? There can be only two possibilities:

- if $P$ and $Q$ are on the same side of $O$ then the
*directions are the same*, - if $P$ and $Q$ are on the opposite sides of $O$ then the
*directions are the opposite*.

Now algebraically,

- if $x>0,\ x'>0$ or $x<0,\ x'<0$ then the directions are the same,
- if $x>0,\ x'<0$ or $x<0,\ x'>0$ then the directions are the opposite.

Fortunately, the *product* provides us with a single expression.

**Theorem (Directions for dimension $1$).** The directions from $O$ to $x\ne 0$ and $x'\ne 0$ are

- the same if $x\cdot x'>0$; and
- the opposite if $x\cdot x'<0$.

**Exercise.** Express the directions in terms of the signed distance.

This brings us to the idea of an *oriented interval* or segment. Any two points $P$ and $Q$ produce *two* intervals: $PQ$ and $QP$. They point in the opposite directions and we can say that they have opposite *orientations*. Furthermore, since the direction of the $x$-axis is fixed, we can match the directions of the intervals:

- if $P<Q$, then $PQ$ is
*positively oriented*and $QP$ is*negatively oriented*.

It's like watching a tape backwards...

Since the result is entirely about the *signs* of these numbers, it can be restated in terms of the *sign function*:
$$\operatorname{sign}(a)=\begin{cases}
-1&\text{ if } a<0,\\
0&\text{ if } a=0,\\
1&\text{ if } a>0. \end{cases}$$
For $a\ne 0$, this function can also be computed by the formula:
$$\operatorname{sign}(a)=\frac{a}{|a|}.$$
Thus, the directions from $O$ to $x\ne 0$ and $x'\ne 0$ are:

- the same when $\operatorname{sign}(x)= \operatorname{sign}(x')$; and
- the opposite when $\operatorname{sign}(x)\ne \operatorname{sign}(x')$.

Now the coordinate system for dimension $2$. There is much more going on:

Suppose we live on a *field* with two roads intersecting surrounded by nothing.

We can then treat either of the two roads as a $1$-dimensional Cartesian system, as above, and use the milestone to navigate. But what about the rest of the field? How do we navigate it? We build a city with a grid of streets:

We also number the streets.

A new coordinate system intended to capture what happens on this city or field is devised to be superimposed on the field. What does it look like?

It is built in several stages:

- 1. two coordinate axes are chosen, the $x$-
*axis*first and the $y$-axis second; - 2. the two axes are put together at their origins so that it is a $90$-degree turn from the positive direction of the $x$-axis to the positive direction of the $y$-axis;
- 3. use the marks on the axis to draw a grid.

We have a correspondence:

- location $P\ \longleftrightarrow\ $ a pair of numbers $(x,y)$.

that works in *both directions*. For example, suppose $P$ is a *location* on the plane. We then find the distances from either of the two axes to that location -- positive in the positive direction and negative in the negative direction -- and the result is the two coordinates of $P$, some *numbers* $x$ and $y$. We use the nearest mark to simplify the task.

Conversely, suppose $x$ and $y$ are *numbers*. First, we measure $x$ as the distance from the $y$-axis -- positive in the positive direction and negative in the negative direction -- and such locations together form a vertical line. Second, we measure $y$ as the distance from the $x$-axis -- positive in the positive direction and negative in the negative direction -- and such locations together form a horizontal line. The intersection of these two lines is a *location* $P$ on the plane. We use the nearest marks to simplify the task.

Once the coordinate system is in place, it is acceptable to think of location as pairs of numbers and vice versa. In fact, we can write: $P=(x,y)$.

**Example.** The $2$-dimensional Cartesian system isn't as widespread as that for dimension $1$. It is however common in the digital, computing environment.

For example, drawing applications, such as Microsoft Paint, allow you to make use of this system -- if you understand it. The location of your mouse is shown in the status bar on the lower left, constantly updated in real time. Then main difference is that the origin is in the left upper corner of the image and the $y$-axis is pointing down:

The choice is explained by the way we write: downward.

Similarly, spreadsheet applications, such Microsoft Excel, use the Cartesian system (also starting at the upper right corner) to provide a convenient way of representing locations of cells:

This idea is instrumental in helping us express a value located in one cell in terms of values located in other cells -- via formulas. $\square$

Now that everything is *pre-measured* we can solve the geometric problems by algebraically manipulating the coordinates of points.

Let's consider the first geometric task, *distance*. What is the distance between locations $P$ and $Q$ in terms of their coordinates $(x,y)$ and $(x',y')$? The idea is to use the distance formula from the $1$-dimensional case for either of the two axis!

The distance

- between $x$ and $x'$ on the $x$-axis is $|x-x'|$, and
- between $y$ and $y'$ on the $y$-axis is $|y-y'|$.

Then, the segment between the points $P(x,y)$ and $Q=(x',y')$ is the hypotenuse of the right triangle with sides: $|x-x'|$ and $|y-y'|$.

Then our conclusion below follows from the *Pythagorean Theorem*.

**Theorem (Distance Formula for dimension $2$).** The distance between points with coordinates $(x,y)$ and $(x',y')$ is
$$\sqrt{(x-x')^2+(y-y')^2}.$$

In particular we have the distance to the origin from $(x,y)$ **denoted** by:
$$||(x,y)||=\sqrt{x^2+y^2}.$$

**Theorem.** The circle of radius $r>0$ centered at point $(h,k)$, which is the set of points $r$ units away from $(h,k)$, is given by the relation:
$$(x-h)^2+(y-k)^2=r^2.$$

**Proof.** It follows from the *Distance Formula*. $\blacksquare$

Now the second geometric task, *directions*. What is the difference between the directions from the origin $O$ toward locations $P$ and $Q$ (other than $O$) represented in terms of their coordinates $(x,y)$ and $(x',y')$? We are talking about *angle* between the two directions.

Let's first consider a particular choice of $Q=(1,0)$. Then the angle the line $OP$ makes with the $x$-axis is fully determined from trigonometry by the coordinates of $P=(x,y)$.

**Theorem (Slope).** The angle $\alpha$ between the $x$-axis and the line from $O$ to $P=(x,y)\ne O$ is given by its *slope*:
$$\tan \alpha =\frac{y}{x}.$$

Similarly, in the general case we have the following for the two angles from the $x$-axis to $P$ and to $Q$ respectively: $$\begin{array}{lll} \cos \alpha =\frac{x}{\sqrt{x^2+y^2}},& \cos \beta =\frac{x'}{\sqrt{{x'}^2+{y'}^2}};\\ \sin \alpha =\frac{y}{\sqrt{x^2+y^2}},& \sin \beta =\frac{y'}{\sqrt{{x'}^2+{y'}^2}}. \end{array}$$

We then use this trigonometric identity:
$$\begin{array}{lll}
\cos(\alpha - \beta) &= \cos \alpha \cos \beta + \sin \alpha \sin \beta\ \\
&=\frac{x}{\sqrt{x^2+y^2}}\frac{x'}{\sqrt{{x'}^2+{y'}^2}}+\frac{y}{\sqrt{x^2+y^2}}\frac{y'}{\sqrt{{x'}^2+{y'}^2}}\\
&=\frac{xx'+yy'}{\sqrt{x^2+y^2}\sqrt{{x'}^2+{y'}^2}}.
\end{array}$$
This formula can be simplified with the following idea. The *dot product* of two points $(a,b)$ and $(c,d)$ is defined by:
$$(a,b)\cdot(c,d)=ac+bd,$$
Now we use the distance formula above.

**Theorem (Directions for dimension $2$).** The angle between the lines $OP$ and $OQ$, where $P=(x,y)\ne O$ and $Q=(x',y')\ne O$, is given by:
$$\cos \widehat{QOP}=\frac{(x,y)\cdot (x',y')}{||(x,y)||\,||(x',y')||}.$$

Note that when both points are on the $x$-axis, i.e., $y=y'=0$, the formula turns into: $$\cos \widehat{QOP}=\frac{xx'}{|x|\,|x'|}=\frac{x}{|x|}\frac{x'}{|x'|}=\operatorname{sign}(x)\cdot \operatorname{sign}(x').$$ There only two possibilities here, $1$ or $-1$, and, therefore, $\widehat{QOP}$ is either $0$ or $180$ degrees. We thus have recovered the theorem about the directions of lines in dimension $1$!

It is entirely possible to have the $x$-axis measured in different units than the $y$-axis. For example, it is typical to measure the distance to the airport in miles but the altitude in feet. Such a coordinate system would look like this:

When this is the case, the geometric formulas above won't be applicable anymore! However, one can still speak of a point located “$2$ miles east and $5$ kilometers north” from here. Furthermore, $x$ and $y$ will represent in this study *quantities of arbitrary nature*:

- time vs. location;
- location vs. weight;
- weight vs. temperature, etc.

The axes contain oriented segments. The result is *oriented rectangles* in the plane.

If a piece of fabric has sides, inside and outside, it can be placed on the table in two ways...

We postpone the $3$-*dimensional case* until later, but it should be obvious that the construction will start this way:

- 1. build three coordinate axes, ...

and the correspondence will be:

- location $P\ \longleftrightarrow\ $ a triple of numbers $(x,y,z)$.

One can already see how harder is to visualize things in the $3$-dimensional space, which further justifies the need for the algebraic treatment of geometry that we have presented.

Collectively, these are called $1$-, $2$-, and $3$-dimensional *Euclidean spaces*.

## 15 A very short history of functions

We summarize the hypothetical history of appearance of new classes of functions. $$\begin{array}{rll} \text{ phenomena: }&\text{ classes of functions: }\\ \hline \text{ free fall }\\ \longrightarrow&\text{ polynomials }\longrightarrow\text{ algebraic functions }\\ \hline \text{ gravity }&\text{ polynomials have no asymptotes }\\ \longrightarrow&\text{ rational functions }&\\ \hline \text{ population growth/decline, cooling/heating}&\text{ polynomials are too slow for geometric growth/decay }\\ \longrightarrow&\text{ exponential functions }\longrightarrow\text{ logarithms }\\ \hline \text{ waves, planetary motion }&\text{ polynomials, etc. aren't periodic }\\ \longrightarrow&\text{ trig functions }\longrightarrow\text{ inverse trig functions}\\ \hline \text {unknown phenomena }&\text{ no known functions match }\\ \longrightarrow&\text{ abstract functions} \end{array}$$