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
A graph is a visual representation of all the ordered pairs (x, y) that satisfy a relation or function. When you draw a graph correctly, you show the complete picture of how the dependent variable (y) changes with the independent variable (x). This skill helps you understand the behavior of mathematical relationships and apply them to real problems.
- Identify the type of relation or function — linear, quadratic, cubic, or piecewise.
- Determine the domain — the set of x-values you will use.
- Create a table of values — choose several x-values within the domain and calculate the corresponding y-values.
- Plot the points — mark each (x, y) pair on the Cartesian plane.
- Join the points — connect them with a straight line (for linear) or a smooth curve (for quadratic and cubic).
- Label the graph — write the equation and mark key features like the y-intercept and vertex.
A linear function has the form f(x) = mx + c or y = mx + c, where m is the slope and c is the y-intercept. Its graph is a straight line. Since a line is determined by just two points, you need only two values of x to draw it, though using more points helps verify accuracy.
Example: Draw the graph of f(x) = 3x − 1
Step 1: Create a table of values
| x | f(x) = 3x − 1 |
|---|---|
| −2 | −7 |
| −1 | −4 |
| 0 | −1 |
| 1 | 2 |
| 2 | 5 |
Step 2: Plot the points (−2, −7), (−1, −4), (0, −1), (1, 2), (2, 5)
Step 3: Join with a straight line
The graph is a straight line crossing the y-axis at −1, with slope 3 (rising 3 units for every 1 unit moved right). The domain and range are both all real numbers.

A quadratic function has the form f(x) = ax² + bx + c where a ≠ 0. Its graph is a parabola — a smooth curved shape that opens upward (if a > 0) or downward (if a < 0). To draw an accurate parabola, you need at least 5–7 points including the vertex.
Example: Draw the graph of f(x) = −1 + 6x − x²
Step 1: Create a table of values
| x | f(x) = −1 + 6x − x² |
|---|---|
| −1 | −8 |
| 0 | −1 |
| 1 | 4 |
| 2 | 7 |
| 3 | 8 |
| 4 | 7 |
| 5 | 4 |
| 6 | −1 |
Step 2: Plot the points and join with a smooth curve
The vertex (highest point) is at (3, 8). The parabola opens downward because the coefficient of x² is −1.

A cubic function has the form f(x) = ax³ + bx² + cx + d. Its graph is an S-shaped curve that passes through the origin if there is no constant term. Use at least 5 points to capture the shape accurately.
Example: Draw the graph of h(x) = x³
| x | h(x) = x³ |
|---|---|
| −2 | −8 |
| −1 | −1 |
| 0 | 0 |
| 1 | 1 |
| 2 | 8 |
The graph passes through (−2, −8), (−1, −1), (0, 0), (1, 1), and (2, 8), forming a smooth S-curve that is increasing throughout.
When a relation is defined only for certain x-values, you must respect those limits. Use a solid dot (●) when the endpoint is included (≤) and a hollow dot (○) when it is not included (<).
Example: Sketch f(x) = x + 1 for x > 0 and f(x) = x + 1 for x ≤ 0
- For x ≤ 0: draw the line extending left from (0, 1), with a solid dot at (0, 1) because 0 is included.
- For x > 0: draw the line extending right from just above (0, 1), with a hollow dot at (0, 1) because 0 is not included.
This creates two line segments meeting at the y-axis.

A step function is a piecewise function where the output stays constant over intervals, then jumps to a new value. Its graph looks like the steps of a staircase. The greatest integer function ⌊x⌋ (floor function) is a common example — it gives the largest integer less than or equal to x.
Example: Sketch f(x) = 1 for 0 ≤ x < 2, f(x) = 2 for 2 ≤ x < 4, f(x) = 3 for 4 ≤ x ≤ 6
Step 1: Draw horizontal segments
- From x = 0 to x = 2: draw at y = 1, with ● at (0, 1) and ○ at (2, 1)
- From x = 2 to x = 4: draw at y = 2, with ● at (2, 2) and ○ at (4, 2)
- From x = 4 to x = 6: draw at y = 3, with ● at (4, 3) and ● at (6, 3)
Step 2: Check the endpoints
Solid dots show included endpoints; hollow dots show excluded endpoints. The graph resembles steps rising from left to right.
Graphing calculators and software like MATLAB can help you draw graphs quickly and accurately, especially for complex functions. These tools allow you to:
- Enter the equation directly and see the graph instantly
- Adjust the viewing window to see all important features
- Check your hand-drawn graphs for accuracy
- Explore how changing coefficients affects the graph shape
In Tanzania, step functions are used to model taxi fares and bus fares that charge fixed amounts for distance ranges. For example, a daladala might charge 500 TZS for the first 5 kilometers, then 700 TZS for the next 5 kilometers. By drawing this as a step function, passengers can quickly see the fare for any distance they need to travel.
Swali
What type of function has a graph that appears as a parabola (U-shaped curve)?
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