>> In this segment, we'll talk about two important properties of functions, specifically one to one and on two. First, let's formally define what a function is. A function is a relation that assigns each element in a set of inputs X, called the domain, to exactly one element in a set of outputs Y, called the codomain or the range. A function is one to one, or injective, if for all a and b in the domain X, if f of a equals f of b, then a equals b. In other words, no two inputs from the domain will map to the same output in the codomain. A function is onto, or surjective, if for any Y in the codomain, there is an X in the domain such that f of x equals y. In other words, every output in the codomain has an input in the domain that maps to it. We'll see these ideas more clearly through the following examples. Consider the function f of x equals 2x plus 1 whose domain and codomain are both the entire space of real numbers, r. This function is one to one. No two values of x will result in the same output. We can see this by observing the graph of the function. We can test if a function is one to one using the horizontal line test. If all imaginary lines parallel to the x axis intersect the graph at most once, then the function is one to one. We can see this function will clearly pass this test. Now, consider the function f of x equals x squared. Again, with domain and co-domain r. This function is not one-to-one. Consider the graph of f of x equals x squared. We can see that the horizontal line y equals 1 will intersect the graph at two points. We can confirm this by observing that f of 1 and f of negative 1 both equal 1. In fact, f of x and f of negative x will evaluate to the same value for any value of x. As a result, this function is not one to one since there are multiple inputs that map to the same output. However, suppose we change the domain to only include values from 0 to positive infinity including 0. Then, this function would be one to one. Consider the graph of f of x equals x squared over only x values from 0 to positive infinity. We can imagine that this graph will pass a horizontal line test. By changing the domain of this function, we have essentially removed the redundant values of x, making f of x one to one. We see from this example that one to one and onto are properties that depend not only on the function definition but also on the domain and codomain over which the function is defined. Finally, consider the function f of x equals ln of x with domain and codomain r. This function is not onto. This is because for any y less than or equals to 0, there is no x such that ln of x equals y. This time, supposed we change the codomain to only include values from 0 to infinity, not including 0. Defined this way, this function is onto. This is because the codomain no longer includes the values y less than or equal to 0 for which there are no corresponding inputs.