# Functions

A function from a set A to a set B is simply a rule which assigns to each element in the set A some unique element in the set B. The set A is called the domain of the function and the set B is called the range of the function.

When talking about real valued functions of real numbers (that is, when both the domain A and the range B of the function are the set of real numbers), the rule of assignment is usually expressed as a formula. For example, the function that assigns each real number x to 5 more than twice of x is expressed as

y =  2x + 5

So the function assigns 1 to 7 because

2(1)+5 = 7

Similarly

2(3)+5 = 11

2(6)+5 = 17

which says 3 and 6 are assigned to 11 and 17, respectively.

The letters such as x and y that appear in the definition of a function are called variables. The variable x is called the independent variable and the variable y is called the dependent variable. More often a more descriptive notation is used to show the dependency of the value of y on the value of x by writing

y(x) = 2x + 5

When using this notation we usually use the letter f (or g, h, etc) instead of y and write

f(x) = 2x + 5

With this notation we have a more descriptive way of expressing the above calculation

f(1) = 2(1)+5 = 7

f(3) = 2(3)+5 = 11

f(6) = 2(6)+5 = 17

If b = f(a), b is said to be the value of f at a. By evaluating the function f at a we mean finding f(a).

We may also write y = f(x) when we want to say, in general, that y is a function of x. In this case f(x) is understood to be an expression in x.

## Graph of a Function

The graphing of functions requires a coordinate system

The graph of a function y = f (x) is the set of all points (a, b) where a is in the domain of the function and b = f (a).

## XY Cartesian Coordinate System

An xy Cartesian coordinate system (or xy plane) is a plane formed by (usually) two perpendicular axes, the x-axis and the y-axis. The intersection of these axes is called the origin.

On each axis and on one side of the origin, the positive side, a point is chosen and marked as 1 and is taken as the unit. Now every point on the axis can be represented by a real number indicating its distance from the origin with relative to the unit chosen. It is positive if it lies on the positive side of the axis and negative if it lies on the negative side of the axis.

Note The x-unit and the y-unit need not be equal.

Now, for the orthogonal coordinate system, every point P in the xy plane can be located by a pair of real numbers (c, d), where c is the signed horizontal distance and d is the signed vertical distance of the point P from the origin. These two signed distances are called the x coordinate and y coordinate of the point P, respectively.

Once we have a coordinate system, we can plot points (a,b) and therefore draw the graph of a given function.