What is a Function?
function/mapping: a mapping (also called a function) is a rule that assigns to every element x of a set X a single element of a set Y. It is written as:
where the arrow indicates mapping, and the letter f symbolically specifies a rule of mapping. When we write:
we are mapping from argument x in domain X to value y in co-domain Y.
Definitions:
- domain: big X is the domain of f
- argument: little x is an element in big X, an argument of the function f.
- co-domain: big Y is the co-domain of f.
- image/value: when
, we refer to y as the image or value of x under f. - range:

- graph: "The graph of a function of one variables consists of all points in the Cartesian plane whose coordinates (x,y) satisfy the equation y = f(x)" (SB)
In some textbooks, x is called independent or exogenous variables, and y is called dependent or endogenous variables. We will avoid using those words to avoid confusion.
This is a function:
This is NOT a function:
A Linear Function
A linear function, polynomial of degreee 1, has slope m and intercept b. Linear functions have a constant slope.
ar_x = linspace(-5, 10, 100);
title({['Linear function with slope m=' num2str(m) ' and y-intercept=' num2str(b)]});
xline0.HandleVisibility = 'off';
yline0.HandleVisibility = 'off';