Whew, it is so hot today!! I am going to go down and get a drink from the vending machine
Somewhere near Bob's house ...
Bob pays $1.50 for a bottle of coke
As seen in the the previous slide, to get a drink, Bob first inserts 1.50 into the machine. The $1.50 inserted is the input, which will be processed by the vending machine.
In exchange for his money, Bob gets a drink. Hence, the drink that he receives is the output.
Since the vending machine takes in money and churns out drinks, it is a function.
$1.50
A function is a rule/relation which assigns each and every element of x∈X to one and only one element in y∈Y
What is a Function ?
When Bob inserts $1.50, he can only buy one drink. the vending machine is said to be a one-one function, where a certain amount of money inserted can only buy one specific type of drink.
Bob's friend, Bobarina comes along and inserts $1.90
For $1.90, Bobarina is able to choose from several drinks. In this case, the vending machine is not a one-one function, where for the same input of $1.90, Bobarina can buy several different drinks.
In another scenario, The two find out that somebody is giving out free drinks, so Bob doesn’t want to waste his money on the drink. He presses the button for a refund.
In this case, Bob forgoes his drink and takes back his $1.50. He is able to exchange his output for his input through an inverse functionAny horizontal line cuts the graph at most once, f is a one-one function. Hence, the inverse of f, denoted by f-1 exists.
x
However, when Bobarina tries to forgo her drink, she is unable to get a refund.
Bobarina is unable to get a refund because the machine is not a one-one function
Image Attributions: (https://pixabay.com/vectors/bottle-coke-drink-soda-1300161/) - OpenClipart-Vectors - License: Free for Most Commercial Use / No Attribution Required / See https://pixabay.com/service/license/ for what is not allowed