Sign In
Ask Question
Thalia Copeland
Mathematics
22 July, 21:37
How do you write a function
+2
Answers (
1
)
Paige Reeves
22 July, 21:45
0
What is a Function?
A function relates an input to an output.
function cogs
It is like a machine that has an input and an output.
And the output is related somehow to the input.
f (x)
"f (x) = ... " is the classic way of writing a function.
And there are other ways, as you will see!
Input, Relationship, Output
We will see many ways to think about functions, but there are always three main parts:
The input
The relationship
The output
Example: "Multiply by 2" is a very simple function.
Here are the three parts:
Input Relationship Output
0 * 2 0
1 * 2 2
7 * 2 14
10 * 2 20
...
For an input of 50, what is the output?
Some Examples of Functions
x2 (squaring) is a function
x3+1 is also a function
Sine, Cosine and Tangent are functions used in trigonometry
and there are lots more!
But we are not going to look at specific functions ...
... instead we will look at the general idea of a function.
Names
First, it is useful to give a function a name.
The most common name is "f", but we can have other names like "g" ... or even "marmalade" if we want.
But let's use "f":
f (x) = x^2
We say "f of x equals x squared"
what goes into the function is put inside parentheses () after the name of the function:
So f (x) shows us the function is called "f", and "x" goes in
And we usually see what a function does with the input:
f (x) = x2 shows us that function "f" takes "x" and squares it.
Example: with f (x) = x2:
an input of 4
becomes an output of 16.
In fact we can write f (4) = 16.
The "x" is Just a Place-Holder!
Don't get too concerned about "x", it is just there to show us where the input goes and what happens to it.
It could be anything!
So this function:
f (x) = 1 - x + x2
Is the same function as:
f (q) = 1 - q + q2
h (A) = 1 - A + A2
w (θ) = 1 - θ + θ2
The variable (x, q, A, etc) is just there so we know where to put the values:
f (2) = 1 - 2 + 22 = 3
Sometimes There is No Function Name
Sometimes a function has no name, and we see something like:
y = x2
But there is still:
an input (x)
a relationship (squaring)
and an output (y)
Relating
At the top we said that a function was like a machine. But a function doesn't really have belts or cogs or any moving parts - and it doesn't actually destroy what we put into it!
A function relates an input to an output.
Saying "f (4) = 16" is like saying 4 is somehow related to 16. Or 4 → 16
tree
Example: this tree grows 20 cm every year, so the height of the tree is related to its age using the function h:
h (age) = age * 20
So, if the age is 10 years, the height is:
h (10) = 10 * 20 = 200 cm
Here are some example values:
age h (age) = age * 20
0 0
1 20
3.2 64
15 300
...
What Types of Things Do Functions Process?
"Numbers" seems an obvious answer, but ...
calculator
... which numbers?
For example, the tree-height function h (age) = age*20 makes no sense for an age less than zero.
codes ... it could also be letters ("A"→"B"), or ID codes ("A6309"→"Pass") or stranger things.
So we need something more powerful, and that is where sets come in:
various real numbers
A set is a collection of things.
Here are some examples:
Set of even numbers: { ..., - 4, - 2, 0, 2, 4, ... }
Set of clothes: {"hat","shirt", ... }
Set of prime numbers: {2, 3, 5, 7, 11, 13, 17, ... }
Positive multiples of 3 that are less than 10: {3, 6, 9}
Each individual thing in the set (such as "4" or "hat") is called a member, or element.
So, a function takes elements of a set, and gives back elements of a set.
A Function is Special
But a function has special rules:
It must work for every possible input value
And it has only one relationship for each input value
This can be said in one definition:
function sets X to Y
Formal Definition of a Function
A function relates each element of a set
with exactly one element of another set
(possibly the same set).
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Find an answer to your question 👍
“How do you write a function ...”
in 📗 Mathematics if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
You Might be Interested in
Jade uses 8 8 cups of flour to make 24 24 muffins. At that rate, how much flour will it take to make 30 30 muffins?
Answers (1)
3x+2y=0 9x-24=2y How can you order a ladder?
Answers (1)
What is the volume of a cube with a side length of 7 in?
Answers (1)
Ma ajuta si pe mine cineva va rog? a-5+6=12
Answers (1)
The set of all numbers in the form a+bi is called the set of
Answers (1)
New Questions in Mathematics
A newspaper reporter wants to know how popular the hobby of bird watching is in the city. He asked people at the local bird refuge if they watched birds as a hobby. Which of the following best explains whether the reporters data is valid or not?
Answers (1)
I am very confused on how to figure out if y = 3/4x is proportional?
Answers (2)
Alison wants to buy a mountain bike for $339.12. If she saves $28.26 each month, in how many months will she be able to buy the bike?
Answers (2)
At 12 o'clock the temperature was 7°C. The temperature decreased by - 20°C. What is the new temperature?
Answers (1)
Ashleys rentals charges $27.50 per hour to rent a surfboard and a wetsuit. Darlas surf shop charges $23.25 per hour to rent a surfboard plus $17 extra for a wetsuit.
Answers (1)
Home
»
Mathematics
» How do you write a function
Sign In
Sign Up
Forgot Password?