Mada za sehemu hiiUse geometry, approximations, relations, and functions in various contextsMada 4
- Describe the concepts of relations and functions (linear and quadratic) — types of relations, domain and range of relations, graphs of relations and functions, inverse of relations and functions
- Find the domain and range of relations and functions
- Find the inverses of relations and functions
- Draw graphs of relations and functions
Relations and Functions
A relation is a set of ordered pairs that connects elements from one set to another, while a function is a special type of relation where each input has exactly one output. This distinction is fundamental to understanding how mathematics describes relationships between quantities.

A relation can be classified based on how elements map between two sets:
- One-to-one relation: Each element in the first set is related to exactly one element in the second set, and vice versa. Example: {(1, a), (2, b), (3, c)}
- One-to-many relation: One element in the first set relates to multiple elements in the second set. Example: {(1, a), (1, b), (2, c)}
- Many-to-one relation: Multiple elements in the first set relate to the same element in the second set. Example: {(1, a), (2, a), (3, a)}
- Many-to-many relation: Multiple elements in the first set relate to multiple elements in the second set. Example: {(1, a), (1, b), (2, a), (2, b)}
Representing Relations
Relations are often represented using:
- Arrow diagrams - arrows connecting elements from the domain to the range
- Set of ordered pairs - R = {(x, y): condition}
- Tables - showing x and y values
- Graphs - plotting points on the Cartesian plane
Example: Let A = {1, 2, 3, 4} and B = {1, 4, 9, 16}. The relation "maps to its square" from A to B is represented as:

A function is a relation where every element in the domain has exactly one corresponding element in the range. This is called the vertical line test — if a vertical line drawn through the graph touches it at more than one point, the relation is not a function.
Example: Which of these arrow diagrams represents a function?
- Diagram A: 1 → a, 2 → b, 3 → a (This IS a function — each input has one output)
- Diagram B: 1 → a, 1 → b, 2 → c (This is NOT a function — input 1 has two outputs)
All functions are relations, but not all relations are functions.
The domain is the set of all possible input values (x-values) in a relation or function. The range (or codomain) is the set of all possible output values (y-values).
Example: Consider the relation R = {(x, y): y = 2x} defined for x = {-1, 0, 1, 2, 3}.
Finding the domain: The domain is simply the set of x-values given: {-1, 0, 1, 2, 3}
Finding the range: Calculate y for each x:
- x = -1 → y = 2(-1) = -2
- x = 0 → y = 2(0) = 0
- x = 1 → y = 2(1) = 2
- x = 2 → y = 2(2) = 4
- x = 3 → y = 2(3) = 6
So the range is {-2, 0, 2, 4, 6}.
Example 2: For the function f(x) = x² with domain {-2, -1, 0, 1, 2}:
- f(-2) = 4, f(-1) = 1, f(0) = 0, f(1) = 1, f(2) = 4
- Domain = {-2, -1, 0, 1, 2}
- Range = {0, 1, 4}

A linear function has the form y = mx + c, where m is the gradient (slope) and c is the y-intercept. Its graph is a straight line.
Example: Graph the function f(x) = 2x - 1
Step 1: Create a table of values
| x | f(x) = 2x - 1 |
|---|---|
| -2 | -5 |
| -1 | -3 |
| 0 | -1 |
| 1 | 1 |
| 2 | 3 |
Step 2: Plot the points and draw a straight line through them.
Key features:
- Gradient (m = 2): The line rises 2 units for every 1 unit it runs to the right
- y-intercept (c = -1): The line crosses the y-axis at (0, -1)

A quadratic function has the form y = ax² + bx + c, where a ≠ 0. Its graph is a parabola — a U-shaped curve.
Example: Graph the function f(x) = x² - 4x + 3
Step 1: Create a table of values
| x | f(x) = x² - 4x + 3 |
|---|---|
| 0 | 3 |
| 1 | 0 |
| 2 | -1 |
| 3 | 0 |
| 4 | 3 |
Step 2: Plot the points and draw a smooth curve through them.
Key features of quadratic graphs:
- The parabola opens upward if a > 0, downward if a < 0
- The vertex is the highest or lowest point
- The parabola is symmetrical about a vertical line called the axis of symmetry
The inverse of a relation reverses the direction of the mapping — if (a, b) is in the original relation, then (b, a) is in the inverse.
Example: Given the relation R = {(1, 2), (2, 4), (3, 6)}, find the inverse.
The inverse relation R⁻¹ = {(2, 1), (4, 2), (6, 3)}
For a function, the inverse f⁻¹ exists only if the function is one-to-one (each y-value corresponds to only one x-value).
Finding the inverse of a function:
Given f(x) = 3x + 2:
- Write y = 3x + 2
- Swap x and y: x = 3y + 2
- Solve for y: x - 2 = 3y, so y = (x - 2)/3
- Write as f⁻¹(x) = (x - 2)/3
Example: If f(x) = 5x - 10, then f⁻¹(x) = (x + 10)/5
Checking: f(2) = 0, and f⁻¹(0) = (0 + 10)/5 = 2 ✓
In everyday life, functions help us model relationships between quantities. For example, when a dalali (middleman) buys tomatoes from farmers in Mbeya and sells them at a fixed profit of 500 TZS per kilogram, the selling price can be expressed as a linear function: price = purchase price + 500. If a farmer sells at 2,000 TZS per kg, the function becomes f(x) = x + 500, giving 2,500 TZS per kg. Understanding domain and range helps the dalali know the minimum and maximum prices they can expect, while inverse functions can calculate how much to pay farmers to achieve a desired selling price.
Swali
Which of the following best describes a function?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuuliza