# One-to-one Functions (and the Horizontal Line Test)

(D4M) — Here is the video transcript for this video.

00:00
in this episode you’ll learn what a one-to-one function is and we’ll
practice using the horizontal line test yes that’s right there is a horizontal
line test and it will help us determine if an inverse relation is a function
let’s do some math [Music] hi everyone welcome back i’m dave
so we’re going to begin by talking about
what a one-to-one function is and i also
want to remind you about what a function is
so if you’re really really clear on what a function is
this will be somewhat of a review but i’m going to spend most of our time
talking about what a one-to-one function is so let’s start off with
the definition here a function is one-to-one if every element in the range
corresponds to only one element of the domain
so this is what a one-to-one function is

00:01
now i’m hoping that this kind of rings a bell because it’s very similar to the
definition of what a function is so a function definition can be said to be
a function a relation is a function if every element in the domain
corresponds to only one element in the range and so you can kind of see how
these how this has been switched so let me give you a graphical uh way of
looking at all this before we go on with more words
so if i start off here with a collection of objects let’s call this here set a
and we have over here another collection of objects let’s call this set here b
and so we have a bunch of things in here and so these are called the inputs
and f is going to have some way of associating a
relationship between all of these elements right here and some of the
elements over here and so we’ll collect all these elements

00:02
over here that are the outputs right here and we’ll collect them all together
and this will be called the range so that’s called the range of f the range of f
that’s these set these elements right here hey i’ll just shade it in red
this is the range these are the outputs so if you collect together a bunch of
things right here maybe the function f doesn’t care about
all of them so these are the outputs right here so i’ll just say outputs
all right and so what does a function do what does a function make sure because
we have there’s lots of ways to to to relate things so i’ll say right
here that each input everything over here has a unique output so there’s only
one thing over here that it can go to so
if i start looking at this element right here and i ask hey f

00:03
where does this guy go to right here so if this guy right here let’s call him
let’s call this one right here x1 and this one here x2
and let’s say f1 x1 goes to this output right here there it is right there
and then i’ll ask the question f hey f where does x2 go right because f is the
one making the assignment so x2 where where where does it go well
f can say it can go to anything but in order for f to be a function x2 cannot
go here can it yes in fact it can but what f cannot say
is that x1 can go to another one over here if x1 goes to this one right here
then it cannot go to any of the other ones in other words i cannot draw an arrow
let’s call this here one x1 i cannot call make another arrow and go to a
different one over here that would not be a function if f went x1 to here and f

00:04
took x1 to over here also and those are different then that would violate being
a function so that’s what a function is right
x1 can only go to one thing over here now what about
what does it mean to say one to one function so that’s more than just being a
function a function says every input has only one output
but what now we’re going to do is reverse it and say that each output
every element in the range right each output can only come from one element in
the domain so can we now say that x2 can go here
so if we say x2 goes to this guy the same one that x1 did then that would
violate being a one-to-one function so one-to-one function says this cannot
happen that every element in the range even this one right here every element
in the range can only have come from one element in the domain so this is not

00:05
allowed this would be example of two different things went to one thing so
that would be a two to one assignment right there but a one-to-one assignment
means everything over here in the range comes from only one to one
element over here and because it’s a function
every element over here goes to only one over here so it’s a one to one
back and forth but one two one all right so um yeah the words here
really matter and i want you to see not only by diagram
um you know what the definition means but also the words um because sometimes
you get tripped up in the words and then you have to go make a diagram to help
you remember what’s going on which is certainly fine especially when you’re
learning it i would definitely rely more on upon diagrams to help you
remember it but you also need to be able to look at the words so what’s another

00:06
way of saying these words right here perhaps using symbols so if we look at
something like this right here a function is one to one means if
and now i’m going to try to erase this so we can see the picture and the words
so if a function is one to one so this is the set a i’ll just put it over here
so this is a set a here a function is one to one means that
if x1 and x2 are different then their outputs have to be different
in other words i cannot have this this happening right here
we cannot take both of these they’re different
to the same one over here if they’re different over here then they have to be
different over here and that’s what this right here says in symbols
so this would be one to one here if everything over here no matter what
it is not just these two but any two that i pick over here if they’re

00:07
different over here then their outputs over here have to be different so that’s
what it means to be one to one so here i worded it in terms of range and domain
and here i worded it in terms of inputs and outputs
using you know the function notation here
so we can say one more way because this is an implication statement here
it’s an if p then q and um and there’s another way of saying
saying this right here we can use the contrapositive so not q implies not p
so if i take the negation of this that will imply the negation of this right
here and so that’s the next way that you might see the definition of one to one
the function is one to one and now i have to get rid of this means
the negation of this if the negation of that right there then
the negation of this one right here so in other words if these are equal over

00:08
here then these have to be equal over here so any one of these three statements
right here can be taken as the definition of one to one
all these three statements right here mean the same thing here and so now i
also want to contrast and compare them to the original definition that you’re
given in terms of what is a function so a relation
is a function if every element in the domain
corresponds to only one element in the range in other words every input has a
unique output and so then the to change this from right here we would
say a relation is a function means if they’re not equal here
then they’re if they’re different here then that has to imply that they’re
different here and the last one is a relation is a
function and then we can just use contrapositive again if x1 is equal to
x2 then f of x1 has to be equal to x two so these three right here have the same
meaning as of uh as what it means to be a

00:09
function and these three right here have the same meaning in terms of what it
means to be a one-to-one function so really um it takes a little bit of time
um especially but if you want to go beyond you know pre-calculus and
calculus that you really want to have these three statements all in your mind
right here um very fluid uh meaning uh understanding of these and it takes a
little bit of time to get used to rearranging all the words and knowing
the difference between the between them so let’s practice that um
in terms of getting some intuition and by working out some exercises alright so
first thing we’re going to do is play the game
is this relation one to one function or not right so i’m going to give you a
relation and we have to ask the question
is it one is it a one-to-one function so for our first example right here let’s
call this example a and let’s look at the set right here a minus seven four

00:10
and then we’re going to look at minus one nine and then zero five
and then minus two one and then 5 minus minus 5.
all right so this is a relation in other words it’s a set i use set notation and
it’s a set of ordered pairs all right so now we can ask is it a one-to-one
function but notice that that’s two questions first is is it a function
and then the second question is is it a one-to-one function
all right so let’s first ask the question is it a function so function
one to one function so those are the two questions so is it a function
so to check if it’s a function every input has to have a unique output so i’m
really worried about the number of outputs not exactly what the output is
so minus seven has only one output minus five only has one output

00:11
zero only has one output minus two has only one output and five
has only one output if we had another point in here something like zero seven
then this would not be a function because i would have two different outputs
for for zero right if i input zero i’m going to get two different outputs
but this is what we have so this right here is a function so i’ll put check
so it is a function so now the question is is they function
a one-to-one function in other words and now i’m looking
backwards now i’m looking at the four if i input four or if the output is four
how many inputs will i have going to it well if i look at the last condition
right here or the last second entry and all the ordered pairs
uh this is the only one that has a four here so i check them all
they only have one right here so now i check the nine

00:12
and this is the only one where the second entry is in a nine
and then minus five that’s the only one with what sorry five and then one
and then minus five so this one here is one to one function right here
now if we had something like three minus five
so this would be a function right here because every input would have a unique
output but this would not be a one to one function because for the output of
minus five there isn’t a unique input i have two different inputs so this one
would not be a function but this one right here is a function is a one-to-one
function all right so now let’s look at our next example here let’s look at 9 1
and then -2 7 and then 7-4 and then 3-9 and then 2 7.
okay so pause the video and see if you can figure it out is this a function

00:13
and is this a one-to-one function which one is correct
right so in order to have this one you have to first check this one
if this one fails right here then you don’t have a one to one function because
you don’t even have a function so let’s check function first nine has only one
output minus two has only one seven only has one three only has one and two only
has one so this is a function so now i’m just going to check the
outputs one only has one uh and one input seven only had oh
nope if i look right here and right here the output 7 does not have a unique
input so this is not a one-to-one function right there
all right let’s look at one more example how about let’s look at -6 1
and then four minus nine and then zero eleven and then minus two seven

00:14
and then four five and then eight one now i want to show you how to do this
one right here two different ways so the first way is the same way we did the
other two so pause the video and see if you can get it right
all right so let’s check for function first six minus six has only one output
four has only one output zero has only one output minus two has only one output
minus four has only and eight has only one output so this is definitely a
function now is it a one-to-one function so now i’m going to check the outputs
here i have a one and nope nope here’s another one so the output of one
does not have a unique input so this one’s not a one-to-one function so
here’s an example of a function that is not one-to-one function now

00:15
i said i would solve this two different ways so once you check that it is a
function i can then go find the inverse relation
so this is something that you can do if you want but you don’t have to it’s just
a slightly different way so i’m finding the inverse relation
right here in other words i’m just switching all the x’s and y’s
i’m switching all the outputs to inputs and i ran out of room um so 7 minus 2
and then comma and then five minus four so i’m
switching all the inputs to outputs and all the outputs to inputs
and i didn’t do that last one right this should be one eight
all right so let me just check in real quick all right so good so
this one we check that it is a function so then i’m going to find the inverse
relation and i’m going to check if this is a function
so i check one and i have to say nope it’s not a function because it’s got two

00:16
different outputs for this one input so that’s not a function
not a function so either way you’re going to get the same conclusion
the inverse is not a function which means it’s not one to one
so i’d like to like just kind of clarify that
um in a in a lit in a second but first i’m going to go on to what is the
horizontal line test let’s practice using the horizontal line test because
not always are you going to be given a finite number of
ordered pairs what if you’re given an infinite number of ordered pairs
so what is the horizontal line test so also you know what is the vertical
line test we covered that in a previous episode
so let’s just draw a line through here let’s call it y equals i don’t know say
something like uh 2x or something so does this graph right here pass the
vertical line test and the answer is yes let’s remember

00:17
what the vertical line test is the vertical line test means if you draw
a vertical line no matter where you draw it if it only crosses one or less
then it passes the vertical line test if
you could in other words if you can find at least one vertical line where it
crosses twice or more then it fails and so this graph right here passes the
vertical line test no matter where i draw a vertical line it will only cross
once so it passes the vertical line test and
remember what that means is that this is the graph that that can represent a
function and so i’ll go ahead and name that function f
so this is a function right here now this graph represents a function so
now we can ask the question is it a one-to-one function
and we have infinitely many ordered pairs on here so we can’t sit there and
look at inputs and outputs and go through a list
now we need a graphical way of saying is is this a one-to-one function and the
graphical way is the horizontal line test it’s very similar to the vertical

00:18
line test except now i’m drawing horizontal lines so if you can find a
horizontal line that crosses the graph twice or more then it fails so look at
this graph right here no matter where we draw a horizontal line it’s only going
to cross once so this passes the horizontal line test
and what that means is this function is one to one
and what we’re also going to see is that this function that means that this
function right here has an inverse function
so let’s look at another one how about something that looks like this
y equals x squared we can ask does it pass the vertical line test
does this graph right here pass the vertical line test no matter where i
draw a vertical line it only crosses once or less
so yes this passes the vertical line test that means we have a function
that means this graph can represent a function

00:19
now does it pass the horizontal line test so if we can find a horizontal line
that crosses twice or more then it will fail the horizontal line test and look
that’s easy there it failed i cross twice or more it just takes twice to fail
right so that fails so this is not a one-to-one function and the reason why
we can see that it’s not one-to-one is look at this height right here let’s say
the height here is four and the inputs are two and minus two
two squared is four and minus two squared is also four
so here is an output that doesn’t have a unique input
so this right here is not a one-to-one function
not a one-to-one yes it is a function but it is not a one-to-one function here
all right and so in fact let’s just write down here um you know

00:20
how long does it take to be not a one-to-one function right here so i’m
drawing a function i’m drawing a function and as soon as i start to cut back on
itself right there it fails it’s not a one-to-one function anymore all right so
yeah let me draw a couple more examples here let me get rid of this real quick
so let me draw a couple of graphs for you and you tell me is it um
one to one or not all right so i’ll draw this right here it’s gonna go up here
like this is it one to one or not it just keeps going up is it one to one
so no matter where i draw a horizontal line it only crosses once or if i draw a
horizontal line down here it doesn’t even cross at all so this passes the
horizontal line test what about if i draw something that looks like this
just keeps going up so this looks like it’s going to bottom

00:21
out or or become horizontal but it doesn’t it gets infinitely close but
it’s still always it’s just always increasing right there so it’s just always
increasing so i dash it with a horizontal isotope to to show that it’s
always increasing and so this one also passes what about if i do something like
an upside down absolute value function so does this pass the horizontal line
test and the answer is no we found a horizontal line crosses twice
so this one fails what if we have something that looks like a cubic
well some cubics might go like that so that would pass the horizontal line test
what if our cubic looks like something like this though
so then that would fail the horizontal line test that crosses twice or more so
it fails fails the horizontal line test all right so now

00:22
let’s make the connection between one to one and inverse functions right now
so if a function is one to one in other words if it passes the
horizontal line test that’s another way of saying that then the
inverse function exists and this composition right here holds
now in a previous episodes we talked about what the composition is and we
talked about verifying uh whether something was an inverse function so
those are previous episodes that i highly recommend you check out if you
haven’t seen them yet so this is making the connection though
between one to one and inverse functions if it is one to one
then the inverse has to exist and the inverse satisfies these right here
so what about if we consider this function right here is this one to one
function does it pass the horizontal line test
if it does we’ll know the inverse exists and this is important for the next
episode because in the next episode i’m going to show you that if you know the

00:23
inverse exists then i’ll show you a way to actually find it
so let’s look at this function right here now also from previous episodes we
talked about parent functions and how to apply transformations so we know the
parent function here is to the third power so we can graph something like
this right here we have it memorized so in terms of what it looks like so it’s
just gonna go through here like this and now we also know what the
transformations are here we’re going to shift left to and we’re going to shift
down one so i recommend checking out those videos
also so i’m going to shift left to so we’re taking this point right here and
shifting it left and so now it’s going to look like this
but it’s also being shifted down one so let’s move it down one so minus two
minus one and then it’s gonna have the same
shape right here where it’s increasing and then it’s still increasing so i’m
gonna keep the same shape right there and then now where’s across the
x-axis right here let’s be a little bit precise where is it cross-x axis so

00:24
[Music] where is this whole thing zero right here
or where does it cross the y axis also so when this is 0 that’s going to be a 7
right so that would be when this is 0 that would be 8 minus 1 so 7.
so it’s going to cross somewhere like that and just go up
so there’s about a 7 right there all right so yeah it’s going to curve
like that and then go up like that all right in any case this passes the
horizontal line test no matter where you draw a horizontal line no matter where
it only crosses once so right here it does not look like this just want to
make this clear it does not look like that where there’s some arc to it right
there that’s going to make it fail so it just keeps increasing and then it
keeps increasing like that right there so this passes a horizontal line test

00:25
passes the horizontal line test so one to one it is so one to one
and so what this is saying is that the f inverse exists
now from what we’ve seen before i even showed you a step-by-step method on how
to find the inverse but we’ve talked about it informally what would we think
the inverse is informally just you know trying to undo everything
that’s being done and remember the way that you want to think about that is
what happens when you input what are the steps that you do
and you try to undo those steps so first when i input something i’m going
to add 2. that’s the first thing i’m going to do is add 2.
so the inverse the last thing it will do will be to subtract 2. so i’m going to
put a minus 2 all the way out here because that’s the last thing it’s going
to do and that’s because f the first thing you do is add 2. so now the last
thing so i’m going to do a bunch of stuff but then the last thing i’m going
to do is -2 all right and then what do we do after

00:26
that here then we’re going to cube it and then i’m going to subtract 1. so i’m
subtracting one does the last thing over
here so over here it should be the first thing is to undo subtracting 1. so i’m
going to say x plus 1 and then i’m going to say cube root of that
and then the last thing will be minus 2. so this would be my guess for the
inverse function now how do we know that that’s right how
do we know that this is the function and that this is the inverse function it’s
because both of these compositions will hold
if i check this one right here and this one right here and i combine them
together using composition it turns out to be the identity function in other
words whatever you put in is what you get out so again we did a whole episode on
verifying when this function right here and this inverse function right here if
they actually satisfy these two things i highly recommend checking that out
all right so that’s what this right here is saying if you know it passes the

00:27
horizontal line test then you know it’s one to one and then you know the f
inverse exists all right so now let’s look at
kind of putting all this together all this um language here and all these
ideas put them putting them together so here we go so the graph of a function
passes horizontal line test then the function is one to one if a function is
one to one then the f inverse exists if the domain of f is uh okay so this is
just making the connection between these two what does it mean to be inverse
right so the domain of this one is the range because that’s what inverse means
it means switch x’s and y’s so if the domain of f
and then you switch x’s and y’s so that’s the range of the inverse and the
range of f is the domain of f inverse and then the next one is for a function f
and it’s inverse you can always verify that these are two are inverses of each
other by checking these two composition equations making sure that this function

00:28
and this function there both are the identity function
and then now for the last one here the graphs of f and f inverse are
symmetric with respect to the line y equals x and that was the previous
episode we went over how to show that by hand and also by using python so let’s
looks like it’s been shifted to and then down and so it looks something
like this right here where this point right here was minus 2 minus 1
and it passes the horizontal line test so that means this function is 1 to 1
which means this function has an inverse which means
that the domain of this function will be the range of the inverse
and the range of this function the outputs will be equal to the domain of
the inverse and we can verify that this is the
inverse by checking these two equations and then last but not least is if you

00:29
graph the inverse function and the original function you’ll get symmetry
with respect to the line y equals x all right so there’s all five of those
put together right there all right so now one last thing
um in this episode which is hugely important is because sometimes
people don’t want to give up they don’t want to say hey that doesn’t pass the
horizontal line test it doesn’t have an inverse well we’re going to make an
inverse anyways so let’s look at something like this
we’re going to say here is x minus 4 and then we’re going to square it so x
minus 4 squared now what does this look like well
we have a minus four here so it’s been shifted right four units and it just
looks like our squared a regular square function right here so it’s just going
to come through here like that and then go back up here like that and there’s
our graph right there and as you can see this does not pass the horizontal line
test if i throw in a horizontal line there it fails

00:30
so this does not pass the horizontal line test which means it’s not one to
one f is not one to one f fails the horizontal line test
f does not have an inverse function f does not have and inverse function
let’s just put little little bullet points here right if it’s not one to one
f fails horizontal line test f does not have an inverse function so
those three things mean the same thing so we’re going to be hard-headed though
we’re going to look at this function which i’ll call capital f
just to distinguish it from this one so i’m going to keep the same thing
but now i’m going to put a restriction on the domain

00:31
so this is chopped right here at 4 so let’s just look at the right branch
or perhaps you’d like to look at the left branch
so i could actually take either the left or the right or in fact we could
restrict it any other way if we want we could restrict it five or greater but i
think it’s pretty natural to just look at the right half at four so
i’m going to say here’s my restriction right here so this
is going to be a new function which i’m calling capital f it looks just like
this function right here except we’re only taking the right branch so i’m
saying x is greater than or equal to 4. so capital f is just this part right
here i’ll go and put this in blue well no blues for those dots so there so
i’ll say this one right here is red here so this part right here is just the
right branch that’s the graph of capital left right there
yeah so there’s the graph of capital f right there now if i just look at
capital f the one in part in red that does pass the horizontal line test

00:32
it it will always pass the line test so this function right here f is one to one
f passes the horizontal line test f does have an inverse oops sorry
those should all should be capital fs f capital f is one to one capital f does
pass horizontal line test and then capital f inverse exists
and so this is a great time to mention that in the very next episode i’m going
to show you how to find the inverse and we can stop guessing informally about
how what the inverse is i think that’s valuable though because if you can
informally figure out what the inverse is that
gives you a lot of intuition in terms about what the inverse is how it undoes
it and and not but we really want a formal method step-by-step instructions
that you can follow to get to the inverse and that’s we’re going to cover
in the next episode so i look forward to seeing you then

00:33
love to read them and have a great day see you next time
if you enjoyed this video please like and subscribe to my channel
and click the bell icon to get new video updates