# CLEP College Algebra/Functions

In math, it is often important to describe how a certain set of input from some certain operation can at some point represent the output of such operations. The tool math has created for this regard is called the function. The formal definition of a function can perhaps be a very tricky obstacle to grasp fully, and the best way to understand it is to perhaps use the intuitive concepts in practicum (as a preliminary step towards the goal, understanding). Therefore, we will begin this chapter by giving an intuition behind the processing.

## The Intuitive Uses and Definition of Functions

You can think of a function as a kind of machine. You feed the machine raw materials (as an input), and the machine changes the raw materials into a finished product (the output). Let us describe a cook as a function. Handing a piece of lettuce to the cook would result in chopped lettuces as the output. The output is minced lettuces. A function in mathematics is somewhat equivalent. This viewpoint can get us far enough to at least understand its real-life applications.

 Example 1.1(a): A function in everyday life 1 Think about dropping a ball from a bridge. At each moment in time, the ball has a velocity, ${\displaystyle \mathbf {v} }$ . The velocity of the ball is a function of time. This type of function is called real-valued since the "finished product" is a number (or, more specifically, a real number).
 Example 1.1(b): A function in everyday life 2 Imagine the mean temperature of a river deviates everyday by ${\displaystyle 4^{\circ }{\text{ F}}}$ . If the temperature of the river is sampled everyday, with ${\displaystyle n=30}$  samples per day, and the population mean of all the samples collected is ${\displaystyle \mu }$  while the deviation ${\displaystyle \sigma =4^{\circ }{\text{ F}}}$ , then one way we can reflect the distribution of the temperature of the river is by using the Normal (or "Gaussian") function, which is written here below: ${\displaystyle \varphi (x)={\frac {1}{\sigma {\sqrt {2\pi }}}}e^{-{\frac {1}{2}}\left({\frac {x-\mu }{\sigma }}\right)^{2}}}$  If instead, the river only ever deviates ${\displaystyle 4^{\circ }{\text{ F}}}$  from the mean, then one could write it in terms of absolute values: ${\displaystyle |x-\mu |=4=T(x)}$  Either way, a function is used in everyday life.

Think of a real-valued function as an input-output machine; you give the function an input, and it gives you an output which is a number (more specifically, a real number). For example, the squaring function takes the input ${\displaystyle 4}$  and gives the output value ${\displaystyle 16}$ . The same squaring function takes the input ${\displaystyle -1}$  and gives the output value ${\displaystyle 1}$ .

There are many ways which people describe functions. In the first example, a verbal descriptions is given (the height of the ball above the earth as a function of time). In the second example, some different operations of certain functions are given. The specifics of using operations to describe functions are given below:

1. A function is given a name (such as ${\displaystyle f}$ ) and a formula for the function is also given. For example, ${\displaystyle f(x)=3x+2}$  describes a function. We refer to the input as the argument of the function (or the independent variable), and to the output as the value of the function at the given argument. (Note: more on this notation is described in the next section.)
2. A function is described using an equation and two variables. One variable is for the input of the function and one is for the output of the function. The variable for the input is called the independent variable. The variable for the output is called the dependent variable. For example, ${\displaystyle y=3x+2}$  describes a function. The dependent variable appears by itself on the left hand side of equal sign.

When a function is given a name (like in number 1 above), the name of the function is usually a single letter of the alphabet (such as ${\displaystyle f}$  or ${\displaystyle g}$ ). Some functions have names that are multiple letters (like the sine function ${\displaystyle y=\sin(x)}$ .

Let us practice assigning a function using the second method described above by revisiting the first example again:

 Example 1.1(c): The Ball's Velocity as a Function of Height Imagine, as a physicist, you were asked to describe the velocity as a function of height. Here is what may be best described (using energy equations): At time ${\displaystyle t=0}$ , the position of the ball is at a maximal height, ${\displaystyle h=H>0}$ . At time ${\displaystyle t=T}$  (the impact time), the ball is at a minimal height, ${\displaystyle h=0}$  (by assumption). In between, the ball's velocity is changing. Assume an initial horizontal and vertical velocity of ${\displaystyle v_{0x}=0}$  and ${\displaystyle v_{0y}=0}$ , respectively (this is true because we dropped the ball). The horizontal velocity does not change (assuming no air resistance), but the vertical velocity decreases. The final vertical velocity therefore is ${\displaystyle v_{y}<0}$ . As such, we need to only look at the vertical velocity. The above information allows us to approximate the ball's velocity as a function of height: ${\displaystyle \mathbf {v} (h)=-{\sqrt {2gh}}}$ , where ${\displaystyle g=9.81{\frac {\text{m}}{{\text{s}}^{2}}}}$ .

The above equation is an example of a special type of function called a composite function. This function will be explained in much more detail later. For now, an intuition is all that is needed.

Hopefully, an intuition has begun forming inside the mind of the student. Let us see how to evaluate functions at certain inputs now.

 Example 1.1(d): Inputs Given an Output. What is it? (Part 1) If we write ${\displaystyle f(x)=3x+2}$  , then we know that ${\displaystyle f}$  is a function of ${\displaystyle x}$ . To evaluate the function at a certain number, simply substitute the ${\displaystyle x}$  with that number. Replacing ${\displaystyle x}$  with that number in the right side of the function will produce the function's output for that certain input. In English, the definition of ${\displaystyle f}$  is interpreted, "Given a number, ${\displaystyle f}$  will return two more than thrice the input." Based on the above bullet points, the way to evaluate a function at a certain point is {\displaystyle {\begin{aligned}f(3)&=3\cdot (3)+2\\&=9+2\\&=11\end{aligned}}}  Therefore, the value of ${\displaystyle f(3)}$  is ${\displaystyle f(3)=11}$ . The value of ${\displaystyle f}$  at 3 is 11. Note that ${\displaystyle f(3)}$  means the value of the dependent variable when ${\displaystyle x}$  (the independent variable) takes on the value of 3. So we see that the number 11 is the output of the function when we give the number 3 as the input. People often summarize the work above by writing "the value of ${\displaystyle f}$  at three is eleven", or simply "${\displaystyle f}$  of three equals eleven".
 Example 1.1(e): Inputs Given an Output. What is it? (Part 2) Let us return to the function we derived in Example 1.1(c). With the function ${\displaystyle \mathbf {v} (h)=-{\sqrt {2gh}}}$ , where ${\displaystyle g=9.81{\frac {\text{m}}{{\text{s}}^{2}}}}$ , we know the following is true: Velocity ${\displaystyle \mathbf {v} }$  is a function of height, ${\displaystyle h}$ . In English, the definition of ${\displaystyle \mathbf {v} }$  is interpreted, "Given a height above the ground, ${\displaystyle \mathbf {v} }$  will return the velocity of the ball based on the square root of the product of twice the gravitational constant and the height." When working with functions that is founded in real-life applications, it is important to also keep in mind units. Since SI units are used, and the gravitation constant ${\displaystyle g}$  is in meters per second-squared, the height will be in meters. We want to know what the velocity is if the ball is halfway between the bridge and the ground, ${\displaystyle h={\frac {H}{2}}}$ . Assume ${\displaystyle H=9.0{\text{ m}}}$ . Let us begin evaluating the function: {\displaystyle {\begin{aligned}\mathbf {v} \left({\frac {9}{2}}\right)&=-{\sqrt {2g\left({\frac {9.0}{2}}\right)}}\\&=-{\sqrt {g\cdot 9.0}}\\&=-3.0{\sqrt {9.81}}\approx -9.4{\frac {\text{m}}{\text{s}}}\end{aligned}}}  Therefore, the value of ${\displaystyle \mathbf {v} (4.5)}$  is ${\displaystyle \mathbf {v} (4.5)\approx -9.4{\frac {\text{m}}{\text{s}}}}$ . The value of ${\displaystyle \mathbf {v} }$  at ${\displaystyle 4.5}$  is ${\displaystyle -9.4{\frac {\text{m}}{\text{s}}}}$ . Quite the large increase in speed from ${\displaystyle 0}$  meters per second!

### A Note on Notation

Functions are used so much that there is a special notation for them. The notation is somewhat ambiguous, so familiarity with it is important in order to understand the intention of an equation or formula.

Though there are no strict rules for naming a function, it is standard practice to use the letters ${\displaystyle f}$  , ${\displaystyle g}$  , and ${\displaystyle h}$  to denote functions, and the variable ${\displaystyle x}$  to denote an independent variable. ${\displaystyle y}$  is used for both dependent and independent variables.

When discussing or working with a function ${\displaystyle f}$  , it's important to know not only the function, but also its independent variable ${\displaystyle x}$  . Thus, when referring to a function ${\displaystyle f}$ , you usually do not write ${\displaystyle f}$ , but instead ${\displaystyle f(x)}$  . The function is now referred to as "${\displaystyle f}$  of ${\displaystyle x}$ ". The name of the function is adjacent to the independent variable (in parentheses). This is useful for indicating the value of the function at a particular value of the independent variable. For instance, if

${\displaystyle f(x)=7x+1}$ ,

and if we want to use the value of ${\displaystyle f}$  for ${\displaystyle x}$  when ${\displaystyle x}$  is equal to ${\displaystyle 2}$ , then we would substitute ${\displaystyle 2}$  for ${\displaystyle x}$  on both sides of the definition above and write

${\displaystyle f(2)=7(2)+1=14+1=15}$

This notation is more informative than leaving off the independent variable and writing simply ${\displaystyle f}$ , but can be ambiguous since the parentheses next to ${\displaystyle f}$  can be misinterpreted as multiplication, ${\displaystyle 2f}$ . To make sure no person is confused by notation accidentally, follow this procedure:

1. Define the function ${\displaystyle f}$  by equating it to some expression.
2. Give a sentence like the following: "At ${\displaystyle x=c}$ , the function ${\displaystyle f}$  is..."
3. Evaluate the function.

This procedure can change if the student is doing a multiple choice exam since communication is not important in that context.

## Formalizing the Intuition

As of now, the definition below should not make too much sense. Read the definition so that you may see where the we gain the understanding of the mapping.

Function

a mapping associating the elements of one set called the domain, ${\displaystyle A}$ , with the elements of another set called the range, ${\displaystyle B}$ , is a function. For each value we select from the domain of the function, there exists exactly one corresponding element in the range of the function.

For now, analyze the definition. Take notice at the implication of an element in the range being found through the correspondence of the element mapping from the domain. An example of how is given below.

 Let function ${\displaystyle f(x)=5x+{\frac {5x}{2}}}$  for all ${\displaystyle x}$ . For what value of ${\displaystyle x}$  gives ${\displaystyle f(x)=225{\frac {1}{2}}}$ ? In mathematics, it is important to notice any repetition. If something seems to repeat, keep a note of that in the back of your mind somewhere. Here, notice that ${\displaystyle f(x)=5x+{\frac {5x}{2}}}$  and ${\displaystyle f(x)=225{\frac {1}{2}}}$ . Because ${\displaystyle f(x)}$  is equal to two different things, it must be the case that the other side of the equal sign to ${\displaystyle f(x)}$  is equal to the other. This property is known as the transitive property (always remember the Properties of Real Numbers): ${\displaystyle 225{\frac {1}{2}}=5x+{\frac {5x}{2}}}$  Next, simplify — make your life easier rather than harder. In this instance, since ${\displaystyle 5x+{\frac {5x}{2}}}$  has ${\displaystyle x}$  as a like-term, and the two terms are fractions added to the other, put it over a common denominator and simplify. Similar, since ${\displaystyle 225{\frac {1}{2}}}$  is a mixed fraction, ${\displaystyle 225{\frac {1}{2}}=225+{\frac {1}{2}}}$ . ${\displaystyle 225{\frac {1}{2}}=5x+{\frac {5x}{2}}}$  ${\displaystyle \Rightarrow {\frac {225}{1}}+{\frac {1}{2}}={\frac {5x}{1}}+{\frac {5x}{2}}}$  ${\displaystyle \Rightarrow {\frac {450}{2}}+{\frac {1}{2}}={\frac {10x}{2}}+{\frac {5x}{2}}}$  ${\displaystyle \Rightarrow {\frac {451}{2}}={\frac {15x}{2}}}$  Multiply both sides by the reciprocal of the coefficient of ${\displaystyle x}$ , ${\displaystyle {\frac {2}{15}}}$  from both sides by multiplying by it. ${\displaystyle {\frac {2}{15}}\cdot {\frac {451}{2}}=x}$  ${\displaystyle {\frac {451}{15}}=x}$  or ${\displaystyle x={\frac {451}{15}}}$ . The value of ${\displaystyle x}$  that makes ${\displaystyle f(x)=225{\frac {1}{2}}}$  is ${\displaystyle x={\frac {451}{15}}}$ .${\displaystyle \blacksquare }$ .

Classically, the element "picked" from the domain is pictured as something that is fed into the function (the input) and the corresponding element in the range is pictured as the output. Notice the specificity of the language herein: an input is selected from the domain, meaning the domain is the set of all inputs; an output results from that specific input, meaning the range is the set of all possible outputs.

Since we "pick" the element in the domain whose corresponding element in the range we want to find, we have control over what element we pick and hence this element is also known as the "independent variable". The element in the range is beyond our control and is "mapped to" by the function. This element is hence also known as the "dependent variable", for it depends on which independent variable we pick. Since it is an element, the input is also known as the independent variable. Similar, the output is also known as the dependent variable.

The intuition of functions is better to grasp at first (for most students). However, the importance by which the formal definition of functions are to the foundations of algebra as we know it means that the formal definition should be viewed in high regards. Nevertheless, this does not mean that an intuition is unnecessary or even detrimental. Rather, students should be able to understand both viewpoints, and be able to relate them. As such, we argue that students should hold on to both viewpoints.

To recap, a function ${\displaystyle f}$  is a mapping of some element ${\displaystyle x\in A}$ , called the domain, to exactly one element ${\displaystyle y\in B}$ , called the range, such that ${\displaystyle f:A\to B}$ . The image below should help explain the modern definition of a function:

### The Foundations of Functions: The Mapping, the Cartesian Cross Product, and Ordered Pairs

Now that we understand the set, we will begin understanding the fundamental property of the function (the mapping). However, how do elements "map" to another set? It would be when the combination is "tied" to another element. Defining "tied" would be tricky without the help of sets. However, the set nicely defines tying, and it is through ordered pairs.

Ordered Pair through Kuratowski Formalization

An order pair is defined to be a set written in the form of ${\displaystyle (a,b)}$  as:

${\displaystyle (a,b){\overset {\underset {\mathrm {def} }{}}{=}}\left\{\left\{a\right\},\,\left\{a,b\right\}\right\}}$ .

The logic in this is that the sets contained within are an element that is dependent on the order of the written pairs. Because ${\displaystyle \{a,b\}}$  uses both elements, the set gives the second coordinate based on the order of written pairs. However, this definition does not hold for ${\displaystyle b=a}$ , since it evaluates to give ${\displaystyle (a,a)=\left\{a\right\}}$ , which does not give an accurate reading of the second coordinate. However, this definition is good enough for the purposes of this textbook. Plus, the knowledge described herein is typically not taught in a College Algebra course.

Cartesian Cross Product

Let ${\displaystyle A}$  and ${\displaystyle B}$  be two distinct sets. If we were to combine these two sets, it would be defined as the cartesian cross product ${\displaystyle A\times B}$  (read aloud as ${\displaystyle A}$  cross ${\displaystyle B}$ ). ${\displaystyle A\times B}$  is the set of ordered pairs ${\displaystyle (x,y)}$  whereby ${\displaystyle x\in A}$  and ${\displaystyle y\in B}$ :

${\displaystyle A\times B=\left\{(x,y)|x\in A\wedge y\in B\right\}}$  (read aloud as ${\displaystyle A}$  cross ${\displaystyle B}$  is the set that contains the ordered pair ${\displaystyle x,y}$  such that ${\displaystyle x}$  is in ${\displaystyle A}$  and ${\displaystyle y}$  is in ${\displaystyle B}$ . The wedge, ${\displaystyle \wedge }$  is the logical symbol for "and").

The nature of the Cartesian Cross Product is hopefully self-evident. When two sets are combined as such, the ordered pair results. This is very close to the definition of the function. After all, the subset of this product is the function (for the most part).

Mapping

Let ${\displaystyle A}$  and ${\displaystyle B}$  be two distinct sets. A mapping ${\displaystyle f}$  from ${\displaystyle A}$  to ${\displaystyle B}$  is a relation such that a subset ${\displaystyle S}$  of the cross product ${\displaystyle A\times B}$  results in ${\displaystyle f=(A,B,S)}$  under the following conditions:

• For all ${\displaystyle x\in A}$  and for all ${\displaystyle y_{1},y_{2}\in B}$ ,
• The ordered pairs ${\displaystyle (x,y_{1})}$  and ${\displaystyle (x,y_{2})}$  both in the subset ${\displaystyle S}$
• Imply ${\displaystyle y_{1}=y_{2}}$ , and
• For all ${\displaystyle x\in A}$ , there exists a ${\displaystyle y\in B}$  such that ${\displaystyle (x,y)\in S}$ .

The notation ${\displaystyle f:A\to B}$  or ${\displaystyle A\xrightarrow {f} B}$  is a condensed formatting of the definition (read aloud as ${\displaystyle f}$  maps ${\displaystyle A}$  into ${\displaystyle B}$ ).

All the above definition is saying is that given the cartesian cross product of the sets, called the domain and range, there exists a relation of the ordered pair ${\displaystyle (x,y)}$  that relates the domain to the range. For this book, the first notation (${\displaystyle f:A\to B}$ ) is preferred.

### Finding New Properties of Functions Using Sets

From the definitions above, new questions now arise. Here are the three main ones: can a function be (1) one-to-one? (2) many-to-one? (3) one-to-many? Consider each case.

1. A function is considered one-to-one if an element ${\displaystyle a\in A}$  from domain ${\displaystyle A}$  of function ${\displaystyle f}$ , leads to exactly one element ${\displaystyle b\in B}$  from range ${\displaystyle B}$  of the function. By definition, since only one element ${\displaystyle b}$  is mapped by function ${\displaystyle f}$  from some element ${\displaystyle a}$ , ${\displaystyle f:A\to B}$  implies that there exists only one element ${\displaystyle b}$  from the mapping. Therefore, there exists a one-to-one function because it complies with the definition of a function. This definition is similar to Figure 1.
2. A function is considered many-to-one if some elements ${\displaystyle a_{1},a_{2},\ldots a_{n}\in A}$  from domain ${\displaystyle A}$  of function ${\displaystyle f}$  maps to exactly one element ${\displaystyle b\in B}$  from range ${\displaystyle B}$  of the function. Since some elements ${\displaystyle \left(a_{1},a_{2},\ldots a_{n}\right)\in A}$  must map onto exactly one element ${\displaystyle b\in B}$ , ${\displaystyle f:A\to B}$  must be compliant with the definition of a function. Therefore, there exists a many-to-one function.
3. A function is considered one-to-many if exactly one element ${\displaystyle a\in A}$  from domain ${\displaystyle A}$  of function ${\displaystyle f}$  maps to some elements ${\displaystyle \left(b_{1},b_{2},\ldots b_{n}\right)\in B}$  from range ${\displaystyle B}$  of the function. If some element ${\displaystyle a}$  maps onto many distinct elements ${\displaystyle b}$ , then ${\displaystyle f:A\to B}$  is non-functional since there exists many distinct elements ${\displaystyle b}$ . Given many-to-one is non-compliant to the definition of a function, there exists no function that is one-to-many.

The modern definition describes a function sufficiently such that it helps us determine whether some new type of "function" is indeed one. Now that each case is defined above, you can now prove whether functions are one of these function cases. Here is an example problem:

 Given: ${\displaystyle f(x)=ax+b}$ , where ${\displaystyle a}$  and ${\displaystyle b}$  are constant and ${\displaystyle a\neq 0}$ . Prove: function ${\displaystyle f}$  is one-to-one. Notice that the only changing element in the function ${\displaystyle f}$  is ${\displaystyle x}$ . To prove a function is one-to-one by applying the definition may be impossible because although two random elements of domain set ${\displaystyle A}$  may not be many-to-one, there may be some elements ${\displaystyle \left(a_{1},a_{2},\ldots a_{n}\right)\in A}$  that may make the function many-to-one. To account for this possibility, we must prove that it is impossible to have some result like that. Assume there exists two distinct elements ${\displaystyle x_{1}}$  and ${\displaystyle x_{2}}$  that will result in ${\displaystyle f\left(x_{1}\right)=f\left(x_{2}\right)}$ . This would make the function many-to-one. In consequence, ${\displaystyle ax_{1}+b=ax_{2}+b}$  Subtract ${\displaystyle b}$  from both sides of the equation. ${\displaystyle \Rightarrow ax_{1}=ax_{2}}$  Subtract ${\displaystyle ax_{2}}$  from both sides of the equation. ${\displaystyle \Rightarrow ax_{1}-ax_{2}=0}$  Factor ${\displaystyle a}$  from both terms to the left of the equation. ${\displaystyle \Rightarrow a\left(x_{1}-x_{2}\right)=0}$  Multiply ${\displaystyle {\frac {1}{a}}}$  to both sides of the equation. ${\displaystyle \Rightarrow \left(x_{1}-x_{2}\right)=0}$  Add ${\displaystyle x_{2}}$  to both sides of the equation. ${\displaystyle \Rightarrow x_{1}=x_{2}}$  Notice that ${\displaystyle x_{1}=x_{2}}$ . However, this is impossible because ${\displaystyle x_{1}}$  and ${\displaystyle x_{2}}$  are distinct. Ergo, ${\displaystyle f\left(x_{1}\right)\neq f\left(x_{2}\right)}$ . No two distinct inputs can give the same output. Therefore, the function must be one-to-one.

There are a few more important ideas to learn from the modern definition of the function, and it comes from knowing the difference between domain, range, and codomain. We already discussed some of these, yet knowing about sets adds a new definition for each of the following ideas. Therefore, let us discuss these based on these new ideas. The below definitions are a little confusing. The best way to interpret these is to draw an image. To the right of these definitions is the image that corresponds to it (including a formal definition of the corresponding definitions).

• The domain is defined to be a set ${\displaystyle A}$  with all elements ${\displaystyle a\in A}$  mapping to at least one unique ${\displaystyle b\in B}$ .
• The set of elements in ${\displaystyle B=R\cup \{r\}}$  and ${\displaystyle R=\{b\}}$  implies ${\displaystyle R}$  is the range of the function ${\displaystyle f}$  in the cartesian cross product, whereby the set of all elements ${\displaystyle a\in A}$  maps to at least one unique element ${\displaystyle b\in B}$ . That is, the range is the set of all elements that was mapped by some ${\displaystyle a\in A}$  to one corresponding ${\displaystyle b\in R}$ .
• The codomain is the set ${\displaystyle B}$ , where it is not necessarily the case that all elements ${\displaystyle b\in B}$  was mapped by some ${\displaystyle a\in A}$ . That is, the set of all elements found in ${\displaystyle B}$  is the codomain.

The abstract concepts can also be made less confusing by using a function that can put these concepts into more concrete terms. Assume there is a function ${\displaystyle f}$  whereby ${\displaystyle x\neq 2}$ . Let this function be ${\displaystyle f(x)=2x-1}$  where ${\displaystyle y=f(x)}$ . Let us write down what the domain, range, and codomain is for this particular function:

• Domain: ${\displaystyle x\in (-\infty ,2)\cup (2,\infty )}$  or ${\displaystyle \left\{x|x\in \mathbb {R} \wedge x\neq 2\right\}}$  or simply ${\displaystyle x\neq 2}$ . In this instance, the domain is the set of all elements of ${\displaystyle A}$  except ${\displaystyle x=2}$ , since this one cannot be mapped to some element in ${\displaystyle B}$ .
• Range: ${\displaystyle y\in (-\infty ,3)\cup (3,\infty )}$  or ${\displaystyle \left\{y|y\in \mathbb {R} \wedge y\neq f(2)\right\}}$  or simply ${\displaystyle y\neq f(2)}$ . In this instance, the range is the set of all elements of ${\displaystyle B}$  except ${\displaystyle y=f(2)}$ , since this one cannot be mapped by some element in ${\displaystyle A}$ .
• Codomain: ${\displaystyle y\in (-\infty ,\infty )}$  or ${\displaystyle \left\{y|y\in \mathbb {R} \right\}}$  or ${\displaystyle y\in \mathbb {R} }$ . This includes the one element that we were not allowed to map.

There is one more final aspect that needs to be defined. We already have a good idea of what makes a mapping a function (e.g. it cannot be one-to-many). However, three more definitions that you will often hear will be necessary to talk about: injective, surjective, bijective.

• A function is injective if it is one-to-one. That is, for ${\displaystyle a_{1}\in A}$  and ${\displaystyle a_{2}\in A}$ , if ${\displaystyle f(a_{1})=f(a_{2})}$ , then ${\displaystyle a_{1}=a_{2}}$ . Otherwise, it cannot be one-to-one. The same definition from before applies for one-to-one (realize that the definition of injective and one-to-one are the same).
• A function is surjective if it is "onto." That is, the mapping ${\displaystyle f:A\to B}$  has ${\displaystyle B}$  as the range of the function, where the codomain and the range of the function are the same.
• A function is bijective if it is both surjective and injective.

Again, the above definitions are often very confusing. Again, another image is provided to the right of the bullet points. Along with that, another example is also provided. Let us analyze the function ${\displaystyle g(x)=ax^{2}}$ .

 Given: ${\displaystyle g(x)=ax^{2}}$ , where ${\displaystyle a}$  is constant and ${\displaystyle a\neq 0}$ . Prove: function ${\displaystyle g}$  is non-surjective and non-injective. Notice that the only changing element in the function ${\displaystyle g}$  is ${\displaystyle x}$ . Let us check to see the conditions of this function. Is it injective? Let ${\displaystyle g(x)=y}$ , and solve for ${\displaystyle x}$ . First, divide by ${\displaystyle a}$ . ${\displaystyle y=ax^{2}}$  ${\displaystyle \Rightarrow {\frac {y}{a}}=x^{2}}$  Then take the square root of ${\displaystyle x^{2}}$ . By definition, ${\displaystyle {\sqrt {x^{2}}}=\left\vert x\right\vert =\pm x}$ , so ${\displaystyle \Rightarrow {\sqrt {\frac {y}{a}}}=\pm x}$  Notice, however, what we learned from the above manipulation. As a result of solving for ${\displaystyle x}$ , we found that there are two inputs, ${\displaystyle \pm x}$ , that give the same output,${\displaystyle {\sqrt {\frac {y}{a}}}}$ . This means that for some individual ${\displaystyle x}$  that gives ${\displaystyle y}$ , there are two different inputs that result in the same value. Because ${\displaystyle f(x_{1})=f(x_{2})}$  when ${\displaystyle x_{1}\neq x_{2}}$ , this is by definition non-injective. Is it surjective? As a natural consequence of what we learned about inputs, let us determine the range of the function. After all, the only way to determine if something is surjective is to see if the range applies to all real numbers. A good way to determine this is by finding a pattern involving our domains. Let us say we input a negative number for the domain: ${\displaystyle f(-x)=a(-x)^{2}=a\cdot (-x)\cdot (-x)=ax^{2}}$ . This seemingly trivial exercise tells us that negative numbers give us non-negative numbers for our range. This is huge information! For ${\displaystyle x\in \mathbb {R} }$ , the function always results ${\displaystyle y>0}$  for our range. For the set ${\displaystyle B}$ , we have elements in that set that have no mappings from the set ${\displaystyle A}$ . As such, ${\displaystyle y\leq 0}$  is the codomain of set ${\displaystyle B}$ . Therefore, this function is non-surjective!

Functions are an important foundation of mathematics. This modern interpretation is a result of the hard work of the mathematicians of history. It was not until recently that the definition of the relation was introduced by René Descartes in Geometry (1637). Nearly a century later, the standard notation (${\displaystyle f(x)=y}$ ) was first introduced by Leonhard Euler in Introductio in Analysin Infinitorum and Institutiones Calculi Differentialis. The term function was also an innovation during Euler's time as well, being introduced Gottfried Wilhelm Leibniz in a 1673 letter "to describe a quantity related to points of a curve, such as a coordinate or curve's slope." Finally, the modern definition of the function being the relation among sets was first introduced in 1908 by Godfrey Harold Hardy where there is a relation between two variables ${\displaystyle x}$  and ${\displaystyle y}$  such that "to some values of ${\displaystyle x}$  at any rate correspond values of ${\displaystyle y}$ ." For the person that wants to learn more about the history of the function, this page has been provided for you.

### Summary of the Set Definitions of Functions

This section is perhaps the hardest to understand. A summary is provided before the end of the chapter to help students further their understanding.

• A cartesian cross product is the operation ${\displaystyle A\times B=\{(x,y)|x\in A,\,y\in B\}}$ , where ${\displaystyle A}$  and ${\displaystyle B}$  are two distinct sets.
• A mapping is a relation denoted by ${\displaystyle f:A\to B}$ , where ${\displaystyle A}$  and ${\displaystyle B}$  are two distinct sets, such that the cartesian cross product ${\displaystyle A\times B}$  results in the ordered pair ${\displaystyle (x,y)}$  for any given ${\displaystyle x\in A}$  to some unique ${\displaystyle y\in B}$ .
• A function is a mapping of the set of all inputs, the domain, ${\displaystyle A}$ , to the set of all corresponding outputs, the range, ${\displaystyle B}$  such that for any ${\displaystyle x\in A}$ , the cross product is true for one and only one ${\displaystyle y\in B}$ .
• The element ${\displaystyle a\in A}$  is an input. The entire set ${\displaystyle A}$  is the domain (since it comprises all inputs). For any ${\displaystyle r\in B}$  but ${\displaystyle r\notin R}$  and ${\displaystyle b\in R}$  gives ${\displaystyle R=\{b\}}$ . ${\displaystyle R\subseteq B}$  implies ${\displaystyle R}$  is the range if the cartesian cross product ${\displaystyle A\times B}$  results in ${\displaystyle (a,b)}$ . The set ${\displaystyle B=R\cup \{r\}}$  is the codomain.
• Let ${\displaystyle f:A\to B}$ . A function is injective when for all ${\displaystyle a_{1}\in A}$  and ${\displaystyle a_{2}\in A}$ , if ${\displaystyle f(a_{1})=f(a_{2})}$ , then ${\displaystyle a_{1}=a_{2}}$ . Symbolically, ${\displaystyle \forall a_{1},a_{2}\in A\left(f\left(a_{1}\right)=f\left(a_{2}\right)\Rightarrow a_{1}=a_{2}\right)}$ .
• A function is surjective if the mapping ${\displaystyle f:A\to B}$  has ${\displaystyle B}$  as the range and codomain of the function. Put another way, if ${\displaystyle f:A\to B}$ , then ${\displaystyle f}$  is said to be surjective if ${\displaystyle \forall y\in B\;\exists x\in A\left(f(x)=y\right)}$ .
• A function is bijective if it is both injective and surjective.

The summary only uses jargon terms. For the student that was able to understand and translate the jargon, they are ready to move on to the "Check your understanding." It is in the student's best interest to understand this section because the terms will come back again so that students may fully appreciate the intuition behind composite functions and inverse functions, which we will define in due time. Plus, these definitions are sometimes necessary for proofs. Having a good understanding of these basic foundations of functions will be helpful for the student throughout math, even for students who are not math majors.

## Remarks

The following arise as a direct consequence of the definition of functions:

1. By definition, for each "input" a function returns only one "output", corresponding to that input. While the same output may correspond to more than one input, one input cannot correspond to more than one output. This is expressed graphically as the vertical line test: a line drawn parallel to the axis of the dependent variable (normally vertical) will intersect the graph of a function only once. However, a line drawn parallel to the axis of the independent variable (normally horizontal) may intersect the graph of a function as many times as it likes. Equivalently, this has an algebraic (or formula-based) interpretation. We can always say if ${\displaystyle a=b}$  , then ${\displaystyle f(a)=f(b)}$  , but if we only know that ${\displaystyle f(a)=f(b)}$  then we can't be sure that ${\displaystyle a=b}$  .
2. Each function has a set of values, the function's domain, which it can accept as input. Perhaps this set is all positive real numbers; perhaps it is the set {pork, mutton, beef}. This set must be implicitly/explicitly defined in the definition of the function. You cannot feed the function an element that isn't in the domain, as the function is not defined for that input element.
3. Each function has a set of values, the function's range, which it can output. This may be the set of real numbers. It may be the set of positive integers or even the set {0,1}. This set, too, must be implicitly/explicitly defined in the definition of the function.

## The vertical line test

The vertical line test, mentioned in the preceding paragraph, is a systematic test to find out if an equation involving ${\displaystyle x}$  and ${\displaystyle y}$  can serve as a function (with ${\displaystyle x}$  the independent variable and ${\displaystyle y}$  the dependent variable). Simply graph the equation and draw a vertical line through each point of the ${\displaystyle x}$ -axis. If any vertical line ever touches the graph at more than one point, then the equation is not a function; if the line always touches at most one point of the graph, then the equation is a function.

(There are a lot of useful curves, like circles, that aren't functions (see picture). Some people call these graphs with multiple intercepts, like our circle, "multi-valued functions"; they would refer to our "functions" as "single-valued functions".)