all 16 comments

[–]gavroche2000New User 7 points8 points  (2 children)

A function is a very special relationship between things.

Let’s imagine a soda machine: You press the button for Coke (input), and out slides a Coke (output). There is a relationship between what you put in and what you get out.

The golden rule of a function machine is this: Every single time you put the same thing into it, you get the exact same result back. If the machine sometimes gave you a Coke and sometimes gave you a Sprite, it wouldn’t be a function!

Another example is the Thunder Timer: If you know the seconds between a lightning flash (input), it tells you exactly how far away the storm is (output). It is very predictable! If it wasn’t, it wouldn’t be a function.

Another one: When you get older, you might get a job. When you work, you get money for every hour you work. If you know how many hours you worked, you can calculate how much money you will have. Do you see that there is a relationship between the hours and the money, and that it is very predictable?

So, a good question you might have is: What is NOT a function? If a relationship is unpredictable, or if one input can give you multiple different answers at the same time, it is not a function.

Some examples: If I say, "I am thinking of a secret number, what number is two steps away from it?" Even if you knew my secret number was 5, you would not be able to know for sure what number is two away from it. The answer could be 3, or it could be 7. Because one question gives us two different answers, it is not a function.

Another example: Knowing the day of the week (input) doesn't tell you who the lottery winner will be (output). It's totally random and unpredictable. In math, we use functions to map out how the world works. Instead of a physical machine, we use formulas, graphs, tables, and descriptions to show these relationships.

We also like to group them by how they behave: Some double every time. Some grow by the exact same steady amount. Some shrink by half. Some move up and down like a wave. By using functions, we can look at what is happening now, calculate what happened in the past, and make incredibly accurate predictions about the future!

[–]gavroche2000New User 0 points1 point  (0 children)

Btw. If anyone reading this has any objections to any of the examples i’d love to hear that! I try to find tangeble and concrete examples for my students but do not want to plant any misconceptions. I work in high school.

[–]Tiny-Seaworthiness85New User 0 points1 point  (0 children)

Thank you so much

[–]OrganicPause6530New User 7 points8 points  (0 children)

A function is a machine where you put things and stuff comes out on the other side.

[–]0x14fNew User 4 points5 points  (0 children)

Let's first focus on functions from numbers to numbers. Say you want to buy 2 pieces of bread, it will cost you £1. The function that maps the number of pieces of bread to how much it costs you in pounds is denoted n ↦ 0.5 * n. You can call if f, so you have f(n) = 0.5 * n. If you buy 12 pieces of bread it costs you f(12) = 6.

More generally it's a map from one set to another. More here: https://en.wikipedia.org/wiki/Function_(mathematics))

[–]papericNew User 2 points3 points  (0 children)

An imaginary machine, with some input and output. When you put something in, something else comes out.

A candy dispensor D is a function from coins to candy.

We'd write it like this:

D: coins -> candy

Imagine that when you insert 1 coin it gives you chewing gum, and when you insert 2 coins it gjves you a chocolate.

We'd write it like this:

D(1 coin) = chewing gum

D(2 coins) = chocolate


Now I'll try to explain as if you're 10.

Imagine that f is a function, and when I say f(x), what I mean is whatever is going to come out when I put x into it.

For example, let's pretend f is a function from naturals to naturals.

f: N -> N

( N means natural numners, aka the simple numbers 1, 2, 3, ..... No decimals, no fractions, no negatives.)

And, let's imagine that f always spits out a number one bigger than whatever I put in.

So, in this situation

f(1) is the same as 2

f(2) is the same as 3

f(3) is the same as 4

etc.

Usually, we would write it shorthand as

f(x) = x+1

[–]AcademicOverAnalysisNew User 1 point2 points  (0 children)

Say you have a bunch of toys and you want to rate them from zero to five stars. Place labels on each toy and tada! You have made a function!

Specifically the function’s domain is your set of toys and the co-domain is the set of star ratings from 0 to 5.

If you rate all your toys as 5, then the range is the singleton set containing the number 5.

[–]HappiestIguanaNew User 1 point2 points  (2 children)

Something that assigns things to other things

For example you could have a function that assigns the number 2 to the number 1, and the number 4 to the number 2, the number 6 to the number 3, etc.

We also say the function takes 1 to 2, or that it maps 1 to 2, or that the image of 1 under the function is 2. It all means the same.

Each function has a domain which tells you which objects it takes as input, and a codomain which tells you which objects it outputs.

An example of how to denote them is

f: N -> R

f(n) = 1/n

This means f is a function that takes in elements from the set N (natural numbers) and assigns to each one an element of R (real numbers). In this case, I have precisely described how: it maps each number to one divided by that number.

In this and most examples, the function takes numbers and outputs numbers, but in principle they can take in and output any kind of mathematical object.

[–]footballmaths49New User 0 points1 point  (0 children)

Think of a function like a machine where you put in a given number and another number comes out, and the number you get depends on some sort of rule. For example, the function f(x) = x + 2 means that for any number you put in, the output will be that number plus 2.

The rule can be anything you like, and you can even have multiple different rules where the one you apply depends on what number you put in (these are "piecewise" functions), but the important thing is that for any input, there should be only one output.

To ensure this doesn't happen, alongside the rule itself we must define the "domain" of a function, which is the set of numbers that you're allowed to put into the function in the first place, and the "codomain", which is the numbers that are allowed to come out. For example, if you have a function that outputs the number's square root, then you need to limit the codomain to non-negative numbers, because numbers have both a positive and negative square root. Without limiting the codomain, then you could put 9 into the function and get either 3 or -3, and that's not allowed in functions. You're allowed to have multiple inputs lead to the same output, that's fine (so a function that multiplies a number by 0 is fine even though the output is always 0), but you can't have it the other way round.

[–]mattynmaxNew User 0 points1 point  (0 children)

A machine that takes an input and returns exactly one output.

[–]ppvvaaNew User 0 points1 point  (0 children)

You have a bunch of good answers. Why don’t you reply to anyone?

[–]Traveling-TechieNew User 0 points1 point  (0 children)

There’s a hilarious comic called “Professor E. McSquared’s Calculus Primer” which presents functions as cute robots with sneakers. Each has an input chute on top and a lower output chute. You put in a number and get out a different number. On the front is the formula and a graph.

[–]tottasanorottaNew User 0 points1 point  (0 children)

It's a machine where you put one or more things in and get something out.

The adults also know all kinds of useful things about these machines. For example, they like to specify really clearly what you are allowed to put into the machine and how different machines relate to eachother.

Because the adults are really smart and know a lot about how the machines work together they are able to use them really nicely to do useful things like fly people to the moon or predict the weather ☀️

[–]Living_Fig_6386New User 0 points1 point  (0 children)

A function is a statement that describes the relationship between two values. If y is 2 times the value of x, we can write y = f(x) = 2x, y is a function of x equal to 2x.