00:00

in this episode you’ll learn what functions are how to work with them and

how to use function notation let’s do some math [Music]

all right we’re going to begin by talking about what relations are

so well relations are um an important question and that’s the starting

question when you want to talk about functions so here’s an example i’ll use

a capital r to name our first relation and a relation is made up of some

ordered pairs so i’ll put in here 0 1 i’ll put in here 1 2

and i’ll put in here say minus 2 3. so for this relation right here r we’re

going to use the set notation right here so it’s a set of ordered pairs

so you know why we’re also talking about what a relation is we’re also going to

be talking about what what an ordered pair is right so we have three ordered

00:01

pairs one two and three there’s the three ordered pairs now why

is it ordered well what we have is a set of inputs

for this relation r for any relation so the inputs are 0 1 and -2

and so not only we’re talking about what a relation is what an ordered pair is

but also what are the inputs and outputs so for this function or sorry for this

relation r the outputs are 1 2 and three so

we have a set of inputs we have a set of outputs and we have a relationship

so how does this relationship work well think about uh talking to r

you input 0 into r and r will respond back with the output

so the output is 1. so you say r i’m giving you 0 and then r responds

back with a 1. now we can input 1 into r and then r will respond back with a 2.

00:02

we can input a minus 2 into r and r will respond back with a 3.

now let’s append r and let’s say we have another one here let’s say we have here

one four so this is also a relationship which i’ll call r

and now it has one two three four ordered pairs

and the inputs are zero one minus two and 1. so i have the same set of inputs

here and the outputs are 1 2 3 and 4 so we have one more

output added so these are the inputs of r and these are the outputs of r and

here’s how everything is related r tells us exactly how everything is related so

now if i input minus 2 into r r is plies back with a 3.

now if i input a 1 into r it will r will reply back with a two and

a four so it’ll reply back with two values well we could

add say even another one right here let’s say let’s go with one

00:03

um five and then let’s also go with zero two

so now what are the inputs so the inputs are 0 1 -2 1 1 and 0

so i still have the same inputs and what are the outputs 1 2 3 four

and then we have a five that’s uh new and then we have two but two is already

an output so here’s the set of all the inputs and here’s the set of all the

outputs so this is a relation and it has one two three four five six ordered

pairs in it and now we can start talking to r and we

can say r if i input one r will reply back with a two a four and a five so r

has three replies when you input a one and so this is uh how relations work

um now this is of course with when you have a finite number of ordered pairs

00:04

all right so um what is the function well a function is a very special kind of

relation so in order to have a function you need to have a set of ordered pairs

and you need to have the inputs and outputs but there’s an additional rule for a

function so this is example of something that’s not a function

so i’ll define t down here and i’ll say t is 0 1 and 1 2 and -2 3

and so as we’ve seen t is a relation so this is a relation is a relation

and this is a relation r is a relation so now you can ask the question now

which one of these is a function so r is not a function because to be a

function each input has to have a unique output and so if i input 1 into r

it does not give me unique output in fact it gives me three different outputs

00:05

output of two four and five if i input one so r is not a function so this is a

relation but not a function t on the other hand t is a function y let’s check

each input has to have only one output so zero has only one output it’s one

one has only output if you input one into t

t will only give you one response and that response is a two but it’s it’s the

fact that it only gives you one response if you input minus two into t then

it only gives you one output which is a three so this is a function so here’s

our first example is a function so you can see the difference between a

relationship and a function every function is automatically a relation it

has a set of ordered pairs it has the inputs and the outputs but a function

00:06

has additional rule now before i go on i want to talk about

the case between finite and infinite so in these two examples we’ve given so far

the set of ordered pairs here is finite and here’s a set of ordered pairs here

is finite so you know you can work with finite

sets of ordered pairs or you can work with infinite set of ordered pairs

however if you do have a function or a relation that has infinitely many

ordered pairs in them you’ll probably need a different way of representing

them than by listing their elements like

this so we’ll talk more about this as we

go along but i just want to start off by talking about the finite case here and

then we’ll move to the infinite case as we move along here

all right so let’s look at some other examples here now so let’s look at

right here let’s say here we have a domain we have range

and let’s say we have minus two minus one zero one and two

00:07

and then for the range we have a five and a six a 7 and an 8.

now we don’t have the relation yet the relation is going to be

provided by some arrows so the range is what we’re going to consider uh

call the all the outputs and the domain is what we’re going to call all the

inputs so here we have the domain of t is 0 1 and -2 and the range

the set of outputs is 0 1 and 3. so every relation

in in particular every function has a domain and range associated with it

so let’s look at this right here let’s say -2 goes to 5 this is the

relationship that we’re defining minus 1 goes to 8 and then 0 goes to 6 and then

00:08

1 goes to 6 and then 2 goes to 7. so the question is is this relationship

right here a function so for each input we have to check that it has an output

and also so that’s case number one each input has all has has an output

as an output each input has an output in other words

if two didn’t go to anything and this was our relationship right here this

would not be a function so each input has has an output so 2 has

to go somewhere so i’ll choose 2 goes to 7 okay

so that’s the first condition to check for function so the second case is

each input has exactly one output so let’s check minus two goes to five

that’s only one thing it went to minus one only goes to one thing

00:09

zero only goes to one thing one goes to only one thing and two goes

to only one thing so each thing number i checked over here it went to only one

number on the right so for example here’s something that

would not be a function two goes to seven what if i also made two go to eight

so that would be a relationship but that would not be a function

so once we check these two conditions here that each input has to have an output

and that each input only goes to one number over here only one output

so this right here is a function let’s look at a another example real quick

so let’s look at something like we have the domain we have range

and let’s say we have minus 2 1 0 1 2 and then for our range let’s have 3 4 5

so we’re going to send minus 2 to 3 we’re going to send minus 1 to

sorry minus 1 to 3 and 4 and we’re going to send 0 to 4

00:10

and we’re going to send 1 to 5 and 2 to 5. so the question is is this

a function so this is a function what about this one right here is this a

function or not so we check first that everything over here

went to at least one thing over here did

two go to something yes did minus one go to something zero went to something one

went to something two went to something now we check for the uniqueness

condition not only do they have to at least go to one thing but they can only

go to one thing did minus two go to only one thing yes

now minus one here it went to two different numbers it went to three and

four it doesn’t matter what they went to

it’s how many times it went to something so this right here is not a function

not a function it is a relation this is a relation right here but it’s

not a function so we can name this relation right here we can write it in

00:11

set notation we can say the ordered pair is minus 2 3 and it’s -1 3

and we also have -1 4 and then i’ll break down here on this

next line we have 0 4 and then we have another ordered pair 1 5

and then our last ordered pair is 2 5. so you can see how this relationship

right here is a set of ordered pairs but it’s not a function because we had one

input that went to two different outputs all right so very good let’s look and

see what’s next so um now let’s look at a um definition

of a function right here in the more precise terms

so this is how we would write up a definition of a function a function and

we often use lowercase f other common symbols are g and h

and sometimes you’ll use a capital f a capital g a capital h those are very

00:12

common letters to use for for functions but you can use technically any letter

you choose you can even use whole words but typically in a mathematics course

you’re going to use lowercase and sometimes we even use greek letters

like alpha and beta and gamma those could represent functions also

so but by far the most common letter for function is lowercase f

and then we’re going to go from a set a to a set b

and so a function like we said a minute ago a function is a relation

but it has some conditions so assigned to each element so that’s important

right there every element each element x in the set a has at least one

and in fact it has only one element associated with it in the set y

00:13

so the set a will be called the domain and the set b will be called the codomain

and the set us yeah and the set of outputs is called the range

so we have three different things here so the range is always in the set b and

the step b is called the co domain so typically we’ll say what the domain

and range are and this set b can be a little bit larger than you know

so let me give you an example we had an example a minute ago where we had domain

and range and we had minus two minus one zero one and two and this went to five

and minus one went to eight so we had six seven and eight and this went to eight

and we had zero go to six and we had 1 go to 7 and we had 2 go to 7

and we said this right here is a function

so this is a function we can check both these conditions

00:14

so everything has at least one right so um 2 went to 5 minus 1 went to 8. so

everything over here goes to something and it only goes to one thing

now what if i want to put some numbers down here so i put 9 and 10.

so this would be a function also but now we would say this is the codomain

the codomain here is possibly larger um but then the range

would be just the elements that are actually outputted

so this would be the range and then if i had other numbers in here i would call

that larger set the codomain so the so the codomain always contains

the range or so differently the range is always inside of the codomain so the

codomain could be larger so we can also illustrate it like this

we could have a set a we could have a set b here

00:15

and we have a function that maps elements in here to elements over here

and what we have over here are the outputs so everything got mapped into

something over here and so this right here is called the range

whereas the set b is the codomain b could be larger

so that’s our formal definition here and here’s some diagrams to help you

but you know let’s look at some more examples here so

let’s look at a here a is the set here 0 1 2 three [Music] and b here is to set

minus two minus one and let’s go with zero one and two

and so let’s look at example uh example one here the ordered pair zero one

00:16

one minus two and then two zero and then three two so the question is

is this a function right here so what we have is we have a set a we have a set b

and do we have a relation first of all if you don’t have a relation then you

don’t have a function so do we have a relation first of all well a relation is

a set of ordered pairs so this is a set we set notation right here and each

everything in here is an ordered pair so if we had something like i don’t know a

7 hanging out here then this would not be a relation it

would have ordered pair ordered pair ordered pair ordered pair number right

so that would not be a a relation all right so this is a relation right so

first off is a function is a relation and now we have to check that is just

assign every element in the set a so here’s a set a so you know zero

00:17

has to have an output one has to have an output zero has an output

one it has an output two it has an output and three has an output

so each of these in a right so each element in a

has at least one so we got this one checked

we check that part right there and now we have to check it has only one output

so when i go here and i look at zero and one is there any other zeros where the

inputs are right so for example if i had a zero

four here this would not be a function because the input zero would have two

different outputs right so we check this zero it has only one

output we check this one it only has one

output we check this two it has only one output and we check three it has only

one output so for example if i have a three five

this is not a function because this three the input three has two

00:18

outputs all right so we have literally gone through the list

and check that each one has only one output all right and so

this is a function right here so let’s um

maybe look at one more here where we got um

yeah let’s look at this one right here so example two

we’re going to look at 0 minus 1 and then 2 2 and then 1 minus 2 and then 3 0

and then 1 1. so is this a function so first i have to check that everything

in a has an output so zero has an output and

then i check one one has an output right here and then i check two

two has an output and i check three three has an output

00:19

now i check for the second condition does each one have only one output

so zero has only one output namely minus one two has only one output namely two

ah here’s a problem the input one has two different outputs so these right

here say not a function and let’s look at a third example here

so this example will be zero two and then three zero and then one one

so is this relation right here a function

i check zero zero has an output i check one remember we gotta check every

element in a so one has an output yes here it is two does two have an output no

this is not a function you may say y so there is an input there is an input

00:20

and i’ll say namely two i know exactly what it is there is an input with no

output and this violates the definition right here because it says every input

has to have an output and so here’s um uh let me move out of the way or get

smaller so namely two so two is the problem right here

all right now if we throw in a 2 to 5 that would make it a function right

there but we don’t have it so this is not a function all right so

i hope that gets you a better understanding of what functions

are let’s see what’s next so the next thing we’re going to look at

is how to represent a function so there are a lot of ways of

representing functions and the first way is going to be using diagrams and so

this is pretty much what what i’ve been doing so far

00:21

when i had the inputs over here and we have the outputs over here and we drew

arrows between the two so so here’s an example of a function right here

with a diagram so i’m just telling you exactly what the inputs are what the

outputs are so you can have it in diagram form or we can have it in set form

so we could say this function right here let’s call it f

and it consists of one three it’s a very small boring function because it’s just

consisting of two points so we can represent it as a diagram or

we can represent it in set notation we can also represent it using tables so

we would say something like this we could say um the x and the y we could say

1 3 right 1 goes to 3 and 4 goes to 2 so we could say 4 2. so sometimes you’ll

00:22

see in an x y table like that where the x’s represent the inputs and the y

represents the outputs um and so the arrows are explicit here

that they that they go to each other like across like that horizontally or we

could use just words um you know that’s how math was done

um before you know this all this notation came along we could just use

words for example we’ll see that there’s a function called

the square root function so we could just say

y is the square root of x and we could just write that out in words

um or we could use algebra like this is an example of algebra right

here because this is an algebraic equation and so you know you could use

um x square plus x plus one here’s another equation

um but just because you can write down an equation doesn’t mean you have a

function so we’re going to practice this here what if you have x squared plus y

squared equals one so this is the unit circle and this is not a function of x

00:23

and we’ll talk about that in a minute um so and then the other way is to use

geometry and that is a very powerful way right there we’re going to have a whole

episode coming up here uh called a vertical line test and

that’s where we’ll talk about um if if we’re given a graph of a function

or if we’re given the graph of a relation and then we could ask the

question is this a function or not and so we’ll see how to use the vertical

line test coming up here so i just wanted to mention though that

there’s there’s lots of ways and here’s five of the most popular ways probably

of of um or even six if you want to count uh using

uh set notation right here so there’s very six very popular ways of looking at

functions so let’s look at um this one right here a little bit right now so i’m

going to write some equations down and we want to

figure out if it’s a function or not so i’ll start off with something like x

00:24

squared plus y squared equals four so is this right here a function

so you know if you have the inputs represented by the x and the y

representing the outputs you have to ask the question does every

input have a unique output so if i input say a 1 in here

and then i ask the question how many outputs are there or let’s say i’ll input a

um yeah um yeah one all right so what would the y

be could there be more than one y and so we’ll just say that this is

four minus one or you know it’s just three right and so there are actually

three uh sorry two values for y that satisfy this equation

so you could say y is the square root of 3 or y is the negative square root of 3

because both of them solve this equation

right here square root of 3 squared is 3 and the negative square root of 3

00:25

is also three so in other words one square root of three

and one minus square root of three both of these points right here both of

these ordered pairs satisfy this equation right here so i’ve given an

example where one is the input and we have two different outputs so this right

here does not represent a function does not represent a function

this equation right here does not represent a function because i have an

input that has two different outputs now notice that this equation right here

there’s infinitely many points on it so in our first couple of examples that we

did we talked about uh sets of ordered pairs that had a finite number

of ordered pairs in them if you know we’ve seen in previous videos how to

graph this this is a circle radius 2 and you know there’s infinitely many

00:26

points on this circle there’s infinitely many ordered pairs on the circle so you

would never be able to go through and list them and write them all down but

i’ve given you an example right here so this is a 1 and this height is about

square root of 3. and this one and this height is about minus square root of

three and so you can see right here that for this input of one

that there’s going to be two different outputs right here so this right here

does not represent a function so if you know what the equation looks like

then you can see from a graph how you can come up with something’s not

a function and we’re going to go into this a lot

more detail when we study this right here we talk about the vertical line test

but can you go from right here just like looking at the equation and

can you come up with these two points to

give a counter example so this is saying it’s not a function and here’s exactly

why i’ve come up with an input that had two different outputs let’s look at

00:27

another example so let’s say we have 2x plus 3y equals 4.

and the question is is this a function it’s certainly algebra there’s as an

equation and you know does it represent a function can we can

we define a function using this equation so i’m going to move the 2x over

and i’m going to divide both sides by 3 and then we’re going to write this

looking like a line y equals mx plus b and we can see that this is an example

that we’ve studied before in this series linear functions so this is a

linear function in other words if you give me an input i

calculate this right hand side up and i’ll get only one output so this is why

we call this linear function because in fact it’s a function and it’s just a

line if you go graph this it’s just a line we know what the y-intercept is we

00:28

know what the slope is and so you know we can graph this and we can see that

this is just a line but starting with this equation right here

we’re able to solve for y and we solve for y in such a way that if

you’re given any input you get out calculate all this up and you get only

one output so here this is a function this this

equation right here does represent a function

all right so um before we go on though i want to mention that this episode is

part of the series functions and their graphs step-by-step tutorials for

beginners so if you’re not understanding

something like what a linear function is you might want to go back and check out

the previous episodes alright so let’s look at one more example

so let’s look at x plus y squared equals four or yeah so here we’re asking

00:29

um does each input have a unique output so we’re thinking about the x’s as the

inputs and y is the outputs so if i move the x over

now when i look at this equation right here um what we what we have here is that

there are if you’re given an input for x then you could have possibly two

different outputs and the reason why is because of the square so for example

when x is zero what will the y’s be so this will be four now

and we know that plus or minus two either one is four

so we have two different points here and so we’re going to say not a function

in other words 0 has two different outputs not a function okay so um

now if you if you want to go look at this right here and say why don’t we

00:30

just take square root of both sides well we can but we’ll end up with two

different branches so we’ll end up with a square root and a negative square root

and you will see that we have two different branches when we look at

something like this so when x is 0 we end up with square root of 4 which is 2

and when x is 0 we end up with negative square root of 4 which is minus 2 right

there so we still get the same two points right there okay so

what about if we have a horizontal or a vertical line what if

what if we have x equals 14 and what if we have y equals minus 75 so

this is an example of a vertical line if we were to go graph this it would just

be you know x is 14 so we’ll say 14 is right here and this is the

vertical line right here and you know if you were to go graph on the

00:31

x y axis x is 14 there it is so this is not a function

and you can see that because if you have 14 is the input you could have 0 that’s

that point right there or 14 and then you could have a 2 and that would be

that point right there right so 14 could have two outputs in fact you know when

you input x is 14 since this does not specify what the y is y could be

anything so we’re going to get this vertical line here and we’re going to

say this right here is not a function right here

now contrast that with y equals minus 75 so that looks something like this

so minus 75 is about right there and so we have this line right here

plotted on the x y axis it’s just a horizontal uh line right there

so this is a function this this right here represents a function

and the reason why is because no matter what the input is three the output is

00:32

only one and it’s minus 75. this is telling you that the y is fixed the what

see the y here is changing it’s two and minus two it’s not a function this right

here is always fixed at minus 75. no matter what the input is even if the

input is -2 the output is still minus 75 it’s unique

so this right here is a function so this is a vertical line they’re not

functions horizontal lines they are functions right there okay so um

that’s it for uh oh wait um nope it’s not we’re gonna talk about function

notation yes let’s talk about function notation okay

so um we have something you know we have the inputs and we have the outputs and

this is function notation right here and this is an equation now sometimes

we’ll use a y right here we’ll say y equals x squared plus x plus 1.

if we’re able to take this and solve it for y

00:33

then we know we have a function we have unique output right here given any x

right here now if you see something like this

though you may not be solved for y so what if we move the one over the x over

and the x squared over or maybe we move the y over so maybe it

has something like this x squared plus x

plus one minus y equals zero so then you could just go and solve it for y

and once you realize you have a function then you can use function notation

so this is much nicer notation right here so

when you have an equation like this you can ask the question is this a function

well once you use this notation here you’re already answering that question

you’re saying yes this equation is a function and i’ve already given it a

name the function is called f now as i mentioned before we could use

any letters we want now we can say the output is g of x and now we can say the

00:34

function is oh i don’t know let’s say minus x to the third plus x to the fifth

plus two so there’s an example of another function right here

if you input an x you calculate all that up you get one output so

we we’re going to call this function substitution so g of 0

that would be g of zero is equal to minus zero to the third plus zero to the

fifth plus two and then if we calculate all that up

we’re just going to get here two so the x is 0 and the g of 0 which is a 2

so we have 0 2 and then here’s how we figured out the 2 by using the rule so

let’s see some more examples so here we go so let’s look at this function right

00:35

here f of x equals 2x plus three so you know if someone were to give you

the equation y equals 2x plus 3 and they could ask you is this equation

representing a function and then you go and figure it out you say oh yes every

input has unique output then you can give it a name and we’re going to call

this function f of x so now we know it’s a function

and what can we do with functions well we can evaluate them um or

sometimes we say um plugging in right so what is f of one

let’s plug in one so we get two times one minus three

which is two minus three which is minus one

and what happens when we plug in minus three

so two times minus three minus three which is minus six minus three which is

minus nine and what happens if we plug in now sometimes you’ll plug in positive

numbers sometimes you’ll plug in negative numbers sometimes you’ll plug

00:36

in other variables i’m going to plug in an x minus 1.

so this is plugging in x minus 1 into the function

so whatever you put in whatever the x is you’re going to multiply it by 2 all of

that x so this will be 2 times x minus 1 and

then after we do the 2x then we’re going to do -3 so then minus 3.

and now we can simplify this sometimes you can sometimes you cannot so i’m

going to distribute the 2 so 2x minus 2 minus 3

so 2x minus 2 and then minus 3 right so we’re getting 2x minus 5.

all right very good so let’s change functions now let’s look at a say of g of y

so this right here is telling us that y is now what we’re considering to be the

input so y the inputs are going into the function g

and here’s our formula right here 7 minus 3y

00:37

so for part a i’m going to say what is g of 0 so this would be 7 minus 3 times 0

or just 7. and then for b i’m going to say what is g of seven thirds

so now i’m going to plug seven thirds into my function right here so my

function says seven minus three times the input whatever the input is it goes

right here and now the threes cancel we get seven

minus seven so in fact we get zero from that

all right so now let’s look at what is g of s plus two

so you can think about this as a change of variables the original variable here

is in y but i want to say s plus two let’s plug in s plus two so we

we look at the same exact pattern whatever goes here goes right here so it

starts off with a seven minus three so seven minus three

times whatever is in between these br uh parenthesis here whatever’s in between

00:38

is called the y and it goes right here so this time it’s s plus two s plus 2.

so this will be 7 minus 3s and then minus 6 and then we can just say

that this is 7 minus 6 which is 1 minus 3s all right so let’s do one more here

let’s say g of t is g of t is four t squared minus three t plus five

and let’s say here that we’re going to be looking at g of two

so this will be four times 2 squared minus 3 times 2 plus 5

and if we calculate all these numbers up so that’s 4 times 4 that’s 16 minus 6

00:39

plus 5 so that’s 15 right that’s 10 plus 5 15. and then for part b

let’s look at g of t minus 2 if we can g of t minus 2. so now i’m substituting

in t minus 2 into the for the t right here so i’m going to put t minus 2 here

and t minus 2 here so here we go it starts off with 4 and then the input

the input is squared so t minus two squared

and then minus three times the input t minus two and then plus five

so it’s important to keep the exact same form four minus three five so we got

four minus three five but instead of the t’s

we’re going to have t minus two t minus two t minus two

and now we’re going to simplify this so here we have to do t minus two squared

so i’m gonna say four and then i’m gonna refresh our memory

00:40

here t minus two is t minus two times t minus two that’s the squared here

and then now minus three t and then minus three times minus two

that’s a plus six and then a plus five so we distributed the minus three here

and now let’s multiply this out let’s just expand this

out so it’s t squared minus four t plus four minus three t and then plus eleven

just combining those right so we said t times t and then

we’re gonna have minus two and another minus two and then a minus 2 times a

minus 2. all right so here we go we have 4t squared and then minus 16t

and then plus 16 minus 3t plus 11. and now if we can we can combine like

00:41

terms so we have 4t squared uh t squared and then we have a minus 16 t minus 3 t

so that would be what minus 19 t and then we have a 16 and 11

so together that’s 27 um yeah so plus 27. all right so that’s g of t minus 2

is 4t squared minus 19t plus 27 there so let’s do one more part here let’s do

it over here so let’s do um for part c let’s do g of t minus g of two

g of t minus g of two let’s see how that’s different from g of t minus two

00:42

so this is only substituting one thing into g this is doing two things

taking t into g and taking two into g and subtracting them right there

so what is g of t let’s just do that part right there first

g of t is all of this that’s exactly what g of t is

so for this underlying part right here i’m just going to substitute all this in

so four t squared minus three t plus five so that’s all there and then we have a

minus sign now because we’re going to have so much here i’m going to put minus

sign in brackets right there just to help me so that underlying part

is right there and then we sub the minus sign and now we have g of 2.

now we’ve already found what g of 2 is it’s actually 15 right so i’m just going

to say minus 15. all right so now we can simplify 4t squared minus 3t

00:43

and then 5 minus 15 will give us a minus 10. so you can see that these are very

different uh right here plus 27. so you can see that these are very two

two different things here so g of t minus g of 2 is very different

than g of t minus 2. all right there we go that’s it for this episode

thank you for watching and i’ll see you in the next episode

if you enjoyed this video please like and subscribe to my channel and click

the bell icon to get new video updates