# What is a function in algebra

## General information on functions

Here we deal with the question of what functions actually are and which spellings you have to pay attention to.

A function is an assignment of two values, so you assign one value to another because they are in some way related, where:

An example from our everyday life is the price of objects, since a price is assigned to the number of objects purchased. Then the more you buy, the more it costs. This would then be a so-called linear function.

You go to a supermarket and want to buy pieces of watermelon. There is a relationship between the price and the pieces of watermelon, because the more you buy, the more it costs. So the number of watermelon pieces (x) is assigned a price (y). A piece of watermelon costs 2 euros. This is how these equations result:

Now you can enter how many pieces of watermelon you buy and receive the price that you then have to pay. That is exactly what a function does. You insert a value and get the corresponding y-value. The function in this example would be y = 2x. Where x is the number of watermelon pieces and y is the price.

You can then also enter this in a coordinate system, the blue one below is then called a function graph:

The x-value is always plotted to the right (x-axis) and the y-value upwards (y-axis). The functional equation of this example would be:

y = 2x

A question you will probably ask a lot in math, but as is so often the case, this is really important, because functions are needed very often and they come up a lot. For example in the case that was described above, but also in other areas, for example when a car accelerates, this is then also a function that describes how far the car has come in what time, so you can easily do that calculate when the car is at a certain point. Everything you throw, drive or if you move anything else, it can be represented as a function. Functions are therefore extremely important in physics, but also in business, for example, to calculate how much of something one has to sell in order to make a profit.

• Functions are given names, but these only consist of one lowercase letter.
• e.g. f or g
• f: y = 2x -> that means the function called f looks like this: y = 2x
• The x in the function is the so-called variable, there you can insert all numbers that are in the definition set.
• f (x) is the function equation, this is often written down instead of y, for example f (x) = 2x instead of f: y = 2x. If instead of x there is a number in brackets, it means that the result for y is meant, which comes out if you insert this number instead of x and calculate it.
• f (x) = y
• f (2) means that the 2 was inserted into the function f for the x.

### Example: Determine a function

You go shopping and see watermelons and think: "wow great, perfect for maths";). 1kg of watermelons costs 1 €. Now you can set up a function that we call f and it looks like this: f (x) = 1 x (1 euro per kilogram times the weight, gives the price). This now describes the price (f (x)) at a certain weight x. If you now insert a weight for x, you get the price for that many kg of watermelons. The function equation is:

f (x) = x

You can then draw that by entering the weight on the x-axis and then the price on the y-axis:

Now you can also read directly how much, for example, 2kg watermelons cost by going up on the x-axis at 2 and looking which value is there at y. As you can see, there is also a negative area that has no meaning in this task, so it could be left out. This would be practically the opposite of buying, i.e. if you sell the watermelon to the store and the negative price would then be what you get for it.