# What is a Function?

A function relates an input to an output.

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

**x**(squaring) is a function^{2}**x**is also a function^{3}+1- Sine, Cosine and Tangent are functions used in trigonometry
- and there are lots more!

## Names

First, it is useful to give a function a **name**.

The most common name is “* f*“, but we can have other names like “

*” … or even “*

**g***” if we want.*

**marmalade**But let’s use “f”:

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 “

**“, and “**

*f***” goes**

*x***in**

And we usually see what a function does with the input:

** f(x) = x^{2}** shows us that function “

*” takes “*

**f***” and squares it.*

**x**

Example: with **f(x) = x ^{2}**:

- 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 + x^{2}

Is the same function as:

- f(q) = 1 – q + q
^{2} - h(A) = 1 – A + A
^{2} - w(θ) = 1 – θ + θ
^{2}

The variable (x, q, A, etc.) is just there so we know where to put the values:

f(**2**) = 1 – **2** + **2**^{2} = 3

## Sometimes There is No Function Name

Sometimes a function has no name, and we see something like:

y = x^{2}

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

to get more information, kindly Subscribe……….!!

or, Add me on Skype:- Prof. Rajeev Tripathi