An ordered pair, denoted \((x, y)\), is a pair of elements \(x\) and \(y\) in which \(x\) is considered to be the first coordinate and \(y\) the second coordinate.
A relation is a set of ordered pairs. The following are examples of relations:
a) \(S = \{(1, 1), (1, 2), (3, 4), (5, 6)\}\)
b) \(T = \{(-3, 5), (4, 12), (5, 12), (7, -6)\}\)
Every relation determines two sets:
For the above examples:
a) domain of \(S = \{1, 3, 5\}\), range of \(S = \{1, 2, 4, 6\}\)
b) domain of \(T = \{-3, 4, 5, 7\}\), range of \(T = \{5, 12, -6\}\)
Some relations may be defined by a rule relating the elements in the domain to their corresponding elements in the range. In order to define the relation fully, we need to specify both the rule and the domain. For example, the set
\[ \{(x, y) : y = x + 1, x \in \{1, 2, 3, 4\}\} \]
is the relation
\[ \{(1, 2),(2, 3), (3, 4), (4, 5)\} \]
The domain is the set \(X = \{1, 2, 3, 4\}\) and the range is the set \(Y = \{2, 3, 4, 5\}\).
When the domain of a relation is not explicitly stated, it is understood to consist of all real numbers for which the defining rule has meaning. For example:
A function is a rule that assigns each input from a set (domain) to exactly one output from another set (codomain). Functions are widely used in mathematics to model relationships between quantities, transformations, and various other phenomena.
One way to identify whether a relation is a function is to draw a graph of the relation and then apply the following test:
If a vertical line can be drawn anywhere on the graph and it only ever intersects the graph a maximum of once, then the relation is a function.
For example:
A function is said to be one-to-one if different \( x \)-values map to different \( y \)-values. That is, a function \( f \) is one-to-one if \( a \neq b \) implies \( f(a) \neq f(b) \), for all \( a, b \in \text{dom} \, f \).
An equivalent way to say this is that a function \( f \) is one-to-one if \( f(a) = f(b) \) implies \( a = b \), for all \( a, b \in \text{dom} \, f \).
The function \( f(x) = 2x + 1 \) is one-to-one because:
\( f(a) = f(b) \implies 2a + 1 = 2b + 1 \)
\( \implies 2a = 2b \)
\( \implies a = b \)
The function \( f(x) = x^2 \) is not one-to-one as, for example, \( f(3) = 9 = f(-3) \).
The vertical-line test can be used to determine whether a relation is a function or not. Similarly, there is a geometric test that determines whether a function is one-to-one or not.
If a horizontal line can be drawn anywhere on the graph of a function and it only ever intersects the graph a maximum of once, then the function is one-to-one.
Definition: A function \( f \) is onto if for every element \( b \) in the codomain, there exists an element \( a \) in the domain such that \( f(a) = b \).
Example: \( f(x) = x^3 \), where the codomain is all real numbers.
Definition: A function \( f \) is bijective if it is both one-to-one and onto. This means each element in the codomain is mapped by exactly one element in the domain.
Example: \( f(x) = 2x + 3 \) (if the codomain is also all real numbers).
If the domain of a function is not specified, then the domain is the largest subset of \(\mathbb{R}\) for which the rule is defined; this is called the implied domain or the maximal domain.
Thus, for the function \( f(x) = \sqrt{x} \), the implied domain is \([0, \infty)\). We write:
\( f : [0, \infty) \to \mathbb{R}, \, f(x) = \sqrt{x} \)
Functions which have different rules for different subsets of their domain are called piecewise-defined functions. They are also known as hybrid functions.
An odd function has the property that \( f(-x) = -f(x) \). The graph of an odd function has rotational symmetry with respect to the origin: the graph remains unchanged after rotation of 180° about the origin.
For example, \( f(x) = x^3 - x \) is an odd function, since
\( f(-x) = (-x)^3 - (-x) \)
\( = -x^3 + x \)
\( = -f(x) \)
An even function has the property that \( f(-x) = f(x) \). The graph of an even function is symmetrical about the y-axis.
For example, \( f(x) = x^2 - 1 \) is an even function, since
\( f(-x) = (-x)^2 - 1 \)
\( = x^2 - 1 \)
\( = f(x) \)