I apologize if these are starting to become annoying. I'd like to know if these notes I've written on what functions are so far are correct. I'm aware they might get repetitive in some places, but what I mainly want to know is if they're correct/adequate enough explanations. I mostly took what I wrote down from mathisfun and a bit from what @jsreed5 told me. (I'm not writing this to show to anyone, I just write notes I take as if I'm writing a lesson for myself.) This is a longer one.
In mathematics, a function is a form of expression, law, or rule that defines a relationship between two variables (that is, showing how they're related or associated). The two variables are named the input and output. A function can be thought of like a machine of sorts that has an input and an output. The input is "processed" into the output, which is related to the input in some way or another. (It may not be a very good comparison, but consider a woodchipper. Your input is like the log you toss in. The woodchips are like the output. There's something different now, but the woodchips are still related to that log, i.e. you need the log to get the woodchips. Based on what the input is, it will produce a given output.)
ƒ(x) = (output here) is a common way functions are written, but there are many other ways of writing them. Out of the all the ways we can think of functions there are always three main parts, the input, "relationship," and output. For example, divide by 3 is a simple function. Take 27 ÷ 3 = 9. 27 is the input, ÷ 3 is the relationship, and 9 is the output. We'll see that we have been dealing with functions even before knowing what they were. Some other examples of a function would be: x³, x⁴ + 1, the functions sine, cosine, and tangent which are used in trigonometry, and even more kinds, but we're looking at the general concept of a function.
It is useful for a function to have a name. The most common is ƒ, but you could use something such as k, "magnus," or anything else you want for a name. We will use ƒ. ƒ(x) = x³ + 3 is read as f of (of can also be "at") x equals x cubed plus three. What goes into a function is put inside parentheses to the right of the function's name. ƒ(x) tells us that the function is named ƒ and that x "goes in." You typically see what a function does with its input. ƒ(x) = x³ + 3 shows us that the function f takes x, cubes it, then adds 3 to it. With this, an input of 3 becomes an output of 30. This could be written as ƒ(3) = 30.
The x in a function simply tells you what happens to the input and where it goes. A function remains the same regardless of the variable used. The function ƒ(x) = x + x⁴ - x² is the same function as f(d) = d + d⁴ - d², f(G) = G + G⁴ - G², or f($) = $ + $⁴ - $².
A function doesn't necessarily always have a name. You may see something like y = x³ or x³ = y. This is still a function because there is still an input (x), a relationship (cubing), and an output (y). It's also because it can be written as y = ƒ(x) = x³. We have done things like this before, such as with tables, like this: if x is 0 y is 1, if x is 2 y is 8, if x is 3 y is 27, etc. You don't have to use function notation here, but this helps demonstrate that the function takes the input, x, "processes" it, and cubes it, as well as the fact ƒ(x) is notation for the y value of the function.
Earlier we said a function was LIKE a machine, giving a woodchipper as an example, but it obviously doesn't "destroy" or "chip" anything we put into it. A function associates an input with an output, so ƒ(3) = 30 is like saying 3 is associated with 30 in some way (or 3 → 30, this would be read as if three then thirty), e.g. a man is stocking shelves with water bottles at a rate of 4 per minute, so the number of bottles stocked is associated with how many minutes have passed. Let's call this function W. It could be represented like this: W(minutes) = minutes • 4. Therefore if the number of minutes passed is 5, this would be W(minutes) = minutes • 4 = 20 or W(5) = 5 • 4 = 20.
Now, what kinds of things do functions process? Numbers appear to be an obvious answer, but WHICH numbers? For example, the bottles-stocked function W(minutes) = minutes • 4 doesn't make any sense for a number of bottles less than zero. It can also be other things like letters ("D" → "E"), passwords, ("6H9A4S" → "Access"), and other things. We need something more "powerful", and that is where sets come in. While they can't be fully explained here, a set is at it's core a collection of things. They can be anything and have a finite or infinite number of things, e.g. a set of odd numbers {3, 5, 7, 9, ...}, set of weapons {"pistol", "rifle", "knife", ...}, set of vehicles, {"car", "van", "truck", "motorcycle", ...} and so on. Each individual thing like the "3" or "pistol" is referred to as an "element" or a "member" of the set.
We can say a function is a "mapping" between two sets. That is, a function is like a rule where if it is given a specific item from an input set, you are given a specific item from the output set that is related to it. This definition can easily be expanded into areas other than math, like making a function that "maps" an ID code to a certain user on a website (given a code, tell me which user it's for) as easily as "mapping" a dividend to a divisor (if given a dividend, tell me what divides it). Alternatively, you can say a function takes elements of a set and gives back elements of a set. Functions also have two rules: they must work for every possible input value and have only one relationship with each output value.
A formal definition of all of this would be "a function relates each element of a set with exactly one element of another set, possibly being the same set." "Each element" means that every element in x is related to some element in y. It is said that the function covers x (relates every element of it). Some elements of y may not have a relation at all, and that is fine. "Exactly one" means that the function is single valued. It will not give back two or more results for the same input. One to many is forbidden in a function, but many to one is allowed. That means a function can have multiple inputs, but each input must have exactly one output. Functions can also affect different inputs differently, e.g. ƒ(x) = x³ if x is even, x² if x is odd. When a relationship doesn't follow these rules, it's still a relationship, but not a function. A function has every element in x related to y and no element in x has two or more relationships.
On a graph, single valued means that no verticle line ever crosses more than one value. The verticle line test is the method of graphing out a possible function and putting a verticle line through it to see if it is a function or not. If the line crosses a value more than once, it is still a "valid curve," but not a function. Some types of functions have stricter rules, being injective, surjective, and bijective functions. We'll learn more about them later.
It is important to know what the terms domain, codomain, and range are. Put simply, the domain is all of the values that go into a function and the range is all the values that come out. They are very important parts of defining a function. Not all values always work. Using the previous bottles-stocked function as an example, the function might not work if we give it the wrong values, such as a negative number of bottles stocked, and knowing the values that can come out (such as always positive) can help as well. Therefore, we need to say what all of the possible values that can go into and come out of a function are, and that is best done using sets.
What is able to go into a function is the domain, what may possibly come out of a function is the codomain, and the range (also known as the image) is what actually comes out. We may say that the set "A" is the domain, the set "B" is the codomain, and the set of elements that get pointed to in "B" (the actual values the function produces) are the range. Here are a couple ways you could think about it: imagine a vending machine. You can try to input the code for any slot you want, but only the codes for slots that actually have a drink in them will give you a drink. The set of slot codes is the domain, the set of all slots in the machine is the codomain, and the subset of slots that have drinks is the rangeGoing back to the woodchipper analogy, the domain is like the set "all the different types of wood," the codomain is the set "all possible sizes of woodchips in the world," and the range is the set of woodchip sizes you actually get.
What comes out (the range) of a function depends on what goes in (the domain) a function. However, we can define the domain. The domain is an essential part of a function because you have a different function if you change it. For example: a basic function such as f(x) = x² can have the domain of only the counting numbers {1, 2, 3,...}, and then the range will be the set {1, 4, 9,...}. Another function like q(x) = x² can have the domain of integers {...-3, -2, -1, 0, 1, 2, 3,...}, in which case the range is the set {0, 1, 4, 9,...}. Even though both functions take the input and square it, they have a different set of inputs, and therefore give a different set of outputs. In this case q(x) also includes 0.
They will also have different properies, e.g. f(x) always gives a unique answer, but q(x) can give the same answer with two different inputs (like q(-3) = 9 and q(3) = 9 as well).
Mar 11 · 8 weeks ago · 👍 jsreed5
1 Comment
Good summary! Eventually you'll come across extensions to the ideas you have here, like functions that have more than one input and the polar coordinate system (to which the vertical line test doesn't apply), but the fundamental properties of a function will remain the same.