Theory:

We can represent a function in four ways, namely:
 
1. Set of ordered pairs
 
2. Table form
 
3. Arrow diagram
 
4. Graph
1. Set of ordered pairs
In a function \(f : A \rightarrow B\), the set of ordered pairs \(f =\) \(\{(x, y) | y = f(x), x \in A\}\) is a function.
Example:
The number and its square can be represented using ordered pairs as:
 
\(\{(1, 1), (2, 4), (3, 9), (4, 16),...\}\)
2. Table form
We can also represent the functions in the table form. Again, the preimages are on one side, while the images are on the other side.
Example:
Let us look at the same example of number and their squares in the table form.
 
The number
Its square
\(1\)
\(1\)
\(2\)
\(4\)
\(3\)
\(9\)
\(4\)
\(16\)
3. Arrow diagram
The arrow diagram has the elements of the domain \(f\) and their corresponding images connected by arrows.
Example:
Let us look at the numbers and their squares in the form of an arrow diagram.
 
1.svg
4. Graph
We can also plot the elements of \(f\) and their corresponding images on the graph.
Example:
Let us look at the example of numbers and their squares on a graph.
 
2.svg
 
An equation given on the graph is also called a curve.