Skip to main content

Section 2.2 Equations of a Straight Line

Subsection 2.2.1 Identifying the Gradient in Real-Life Situations

In our everyday environment we notice many surfaces that are slanted rather than perfectly flat. Think of the gentle incline of a ramp at your school, or the varying steepness of a hill on a familiar route. These everyday features are examples of what we call a \(\textbf{gradient}\text{.}\)
Instead of focusing on the mathematics immediately, it is important to understand that the gradient describes how steep a path is. It tells us how quickly something rises or falls over a certain distance.
In practical terms, this concept is useful in planning safe ramps, roads, or even understanding the effort required to climb a hill.

Activity 2.2.1.

Work in groups
What you need:
Instructions:
  1. Walk around your school and identify at least two sloped surfaces (for example, a ramp near a doorway or a sloping walkway).
  2. Observe and discuss with your group what β€œsteepness” might mean in a real-life context. Is a gently inclined ramp different from a steep staircase?
  3. Using a measuring tape, estimate the change in height (how much the surface rises) and the horizontal distance (how far it extends).
  4. Record your observations in a table. For example:
Table 2.2.1. Sample Slope Measurements
Location Estimated Rise (m) Estimated Run (m)
Ramp to hall
Staircase or sloping path
  • Discuss as a group how the steepness might affect the use of that surface (for example, ease of access for a wheelchair or the energy required for a person climbing the hill).
  • Discuss as a group how the steepness might affect the use of that surface (for example, ease of access for a wheelchair or the energy required for a person climbing the hill).
  • Which surface appears steeper? Why might that be important?
Key Takeaway:
The gradient gives a numerical value to the concept of steepness, allowing us to compare different slopes and understand their practical implications for safety, accessibility, and design.

Example 2.2.2.

Suppose one ramp rises \(1.2\) m over a horizontal distance of \(4\) m. Express its steepness as a gradient.
Solution.
To find the gradient, we use the formula:
\(\text{Gradient} = \frac{\text{Rise}}{\text{Run}}\)
Here, the rise is \(1.2 m\) and the run is \(4 m\)
\(\therefore \ \ \ \ \text{Gradient} = \frac{1.2}{4} = 0.3\)
This means that for every \(1\) m you move horizontally, the ramp rises by \(0.3\) m.

Exercises Exercises

1.
\(\textbf{Answer the following questions in your exercise book.}\)
  1. In your own words, explain what the term \(gradient\) means in real life.
  2. You are shown two walkways:
    Walkway A: Rises by \(1.5 \, \text{m}\) over \(6 \, \text{m}\) horizontally
    Walkway B: Rises by \(1.5 \, \text{m}\) over \(3 \, \text{m}\) horizontally
    Without calculating, which walkway do you think is steeper? Why?
  3. A builder is constructing a ramp for a wheelchair user. She wants it to be easy to climb. Should the gradient be high or low? Explain your answer.
  4. Name two places in your community where gradients are used on purpose. What purpose do they serve?
  5. Think of a sloped road you’ve walked or cycled on. Was it easier or harder to move along the slope? What does that tell you about its gradient?

Subsection 2.2.2 Determining the Gradient from Two Known Points

In many situations, we are given two points on a straight path and want to determine how steep that path is. These two points may represent physical locations, price changes, distances over time, or any relationship that forms a straight line.
To calculate the gradient between any two points on a straight line, we compare how much the value changes vertically (rise) with how much it changes horizontally (run).
Gradients are useful in describing real situations such as speed, price change, or slope of land.

Activity 2.2.2.

Work in groups
What you need:
Instructions:
  1. On a piece of graph paper, plot the following two points: \(A(2, 3)\) and \(B(6, 7)\text{.}\)
  2. Draw a straight line passing through both points using a ruler.
  3. Count how many units up (rise) and how many units across (run) from point A to point B.
  4. Record your values and use the gradient formula to find the slope between the two points.
Discuss: What does the gradient tell you about this line?
Key Takeaway:
The gradient between two points shows how steep the line is. It is found by dividing the change in \(y\) values (rise) by the change in \(x\) values (run).

Example 2.2.3.

Find the gradient of the line passing through the points \((1, 4)\) and \((5, 10)\text{.}\)
Solution.
  • \(\displaystyle x_1 = 1, \quad y_1 = 4\)
  • \(\displaystyle x_2 = 5, \quad y_2 = 10\)
Apply the gradient formula:
\(m = \frac{10 - 4}{5 - 1} = \frac{6}{4} = 1.5 \)
Therefore, the gradient of the line is \(1.5\text{.}\) This means for every \(1\) unit moved to the right, the line goes up by \(1.5\) units.

Exercises Exercises

1.
Use the gradient formula to solve the following questions:
  1. Find the gradient of the line that passes through the points \((2, 5)\) and \((6, 13)\text{.}\)
  2. Two points on a road are given as \(A(0, 0)\) and \(B(8, 2)\text{.}\) What is the gradient of the slope from A to B?
  3. A shop’s profit changed from Ksh \(1,200\) in week 1 to Ksh \(2,400\) in week 4. Find the average rate of profit increase per week (gradient).
  4. If the gradient between two points is zero, what does that tell you about the line? Give an example.

Subsection 2.2.3 Determining the Equation of a Line Given Two Points

Once you have learned how to calculate the gradient between two points, the next step is to use those two points to determine the unique equation of the line that connects them.
In this section, we will introduce the idea that every straight line in the coordinate plane can be defined by its \(\textbf{gradient}\) and a point it passes through. This leads us to the \(\textbf{point-slope form}\) of a line, which can later be rearranged into the slope-intercept form:
\(y = mx + c \)
where \(m\) is the gradient and \(c\) is the y-intercept.
Today, we will combine your earlier work with a new process: determining the line’s equation directly from two known points.

Activity 2.2.3.

Work in groups
What you need:
Instructions:
  1. Plot two points on graph paper; for example, use the points \((2, 4)\) and \((6, 12)\text{.}\)
  2. Using the method from the previous section, calculate the gradient (m) between the two points.
  3. Select one of the points (either one) to substitute into the point-slope form: \(y - y_1 = m(x - x_1) \)
  4. Rearrange the resulting equation into the slope-intercept form \(y = mx + c \text{.}\)
  5. Discuss your findings and how the line’s characteristics (its slope and y-intercept) relate to the points you plotted.
Key Takeaway:
By determining the gradient between two points and substituting one of the points into the point-slope equation, we can derive the unique linear equation that passes through both points. This equation can then be rearranged into the form \(y = mx + c\text{.}\)

Example 2.2.4.

Determine the equation of a line that passes through the points \((2, 4)\) and \((6, 12)\text{.}\)
Solution.
To find the equation of the line, we will follow these steps:
Step 1: Calculate the Gradient
Using the gradient formula: \(m = \frac{12 - 4}{6 - 2} = \frac{8}{4} = 2 \)
Step 2: Apply the Point-Slope Form
Choosing point \((2, 4)\text{,}\) substitute into the point-slope form: \(y - 4 = 2(x - 2) \)
Step 3: Convert to Slope-Intercept Form
Expand and simplify:
\(y - 4 = 2x - 4 \)
Add \(4\) to both sides:
\(y = 2x \)
This is the equation of the line in slope-intercept form.

Exercises Exercises

1.
Solve the following questions:
  1. Find the equation of the line that passes through the points \((3, 5)\) and \((7, 13)\text{.}\)
  2. A line passes through \((-2, 4)\) and \((2, -4)\text{.}\) Determine its gradient and write its equation in the form \(y = mx + c\text{.}\)
  3. If the line through \((1, 2)\) and \((5, 10)\) has a gradient of \(2\text{,}\) what is the y-intercept (\(c\)) of the line?
  4. Explain what the equation \(y = 2x\) tells you about the relationship between \(x\) and \(y\text{.}\)

Subsection 2.2.4 Determining the Equation of a Line from a Known Gradient and a Point

In some cases, we may be told the \(\textbf{gradient (m)}\) of a line and given only one point that lies on it. Using this information, we can still find the full equation of the line.
To do this, we use the \(\textbf{point-slope form}\) of a linear equation:
\(y - y_1 = m(x - x_1) \)
where \((x_1, y_1)\) is the known point and \(m\) is the gradient. We can rearrange this into the familiar slope-intercept form: \(y = mx + c \text{.}\)

Activity 2.2.4.

Work in groups
MWhat you need:
Instructions:
  1. Suppose you are told that a line has a gradient of \(3\) and passes through the point \((2, 5)\text{.}\)
  2. Write the point-slope form using this information.
  3. Rearrange the equation into slope-intercept form (\(y = mx + c\)).
  4. Plot the point on graph paper, then draw the line using your equation to verify your result.
Discuss with your group: would the result be different if we had chosen a different point?
Key Takeaway:
When given a gradient and one point on a line, you can use the point-slope form to find the full equation of the line. This method is efficient and avoids the need for a second point.

Example 2.2.5.

Write the equation of a line that has a gradient \(m = 2\) and passes through the point \((3, 4)\text{.}\)
Solution.
We know the gradient \(m = 2\) and the point \((x_1, y_1) = (3, 4)\text{.}\) Using the point-slope form:
\(y - y_1 = m(x - x_1) \)
Substituting the known values:
\(y - 4 = 2(x - 3) \)
Now, we will rearrange this into slope-intercept form:
\(y - 4 = 2x - 6 \)
Adding 4 to both sides gives:
\(y = 2x - 2 \)
Therefore, the equation of the line is \(y = 2x - 2 \text{.}\)

Exercises Exercises

1.
Answer the following questions. Use the point-slope method to derive each equation, then write it in the form \(y = mx + c\text{.}\)
  1. A line has a gradient of \(3\) and passes through the point \((1, 5)\text{.}\) Find the equation of the line.
  2. The gradient of a line is \(-\frac{1}{2}\) and it goes through the point \((4, 6)\text{.}\) Write its equation in slope-intercept form.
  3. A line passes through the origin and has a gradient of \(\frac{5}{3}\text{.}\) Write its equation.
  4. A plumber charges a fixed fee of Ksh \(300\) and an additional Ksh \(150\) per hour worked. Let \(x\) represent the number of hours worked and \(y\) represent the total charge. Write the equation connecting \(x\) and \(y\text{.}\)
  5. The equation of a line is \(y = 4x - 7\text{.}\) Identify:
  6. Without drawing a graph, explain whether the line with equation \(y = -2x + 8\) is increasing or decreasing. Justify your answer using the gradient.

Subsection 2.2.5 Determining the x and y-intercepts of a Line

When sketching or interpreting a linear graph, it is helpful to know where the line crosses the axes. These points are called the \(\textbf{intercepts}\text{.}\)
  • The \(\textbf{y-intercept}\) is the point where the line crosses the y-axis. This occurs when \(x = 0\text{.}\)
  • The \(\textbf{x-intercept}\) is the point where the line crosses the x-axis. This occurs when \(y = 0\text{.}\)
Knowing both intercepts helps you to sketch a line quickly and accurately.

Activity 2.2.5.

Work in groups
What You Need:
Instructions:
  1. Choose the equation \(y = 2x - 4\text{.}\)
  2. To find the y-intercept, substitute \(x = 0\text{.}\)
  3. To find the x-intercept, substitute \(y = 0\) and solve for \(x\text{.}\)
  4. Plot both points and draw the line on graph paper.
Discuss with your partner: Why are these two points enough to draw the whole line?
Key Takeaway:
The y-intercept is found by setting \(x = 0\text{.}\) The x-intercept is found by setting \(y = 0\text{.}\) These two points are enough to sketch a linear graph accurately.

Example 2.2.6.

Find the x- and y-intercepts of the line given by the equation \(y = -3x + 6\text{.}\)
Solution.
To find the y-intercept, set \(x = 0\) and solve for \(y\text{:}\)
\(y = -3(0) + 6 = 6\)
So, the y-intercept is \((0, 6)\text{.}\)
To find the x-intercept, set \(y = 0\) and solve for \(x\text{:}\)
\(0 = -3x + 6\)
Rearranging gives:
\(3x = 6\)
Dividing both sides by 3:
\(x = 2\)
So, the x-intercept is \((2, 0)\text{.}\)
Therefore, the intercepts of the line are \((0, 6)\) and \((2, 0)\text{.}\)

Exercises Exercises

1.
\(\textbf{Answer the following in your exercise book.}\)
  1. Find the x- and y-intercepts of the equation \(y = 5x - 10\text{.}\)
  2. A line has the equation \(y = -2x + 4\text{.}\) Determine its intercepts and plot them on graph paper.
  3. What are the intercepts of the line \(y = 7\text{?}\) Explain your answer.
  4. A mobile data company charges a base fee of Ksh \(100\) and Ksh \(20\) per GB. Write the cost equation, and find how many GB one can get when the total cost is Ksh \(300\text{.}\)
  5. Sketch the graph of the line \(y = \frac{1}{2}x - 1\) by using the intercepts.

Subsection 2.2.6 The Use of Equations of Straight Lines in Real Life

Linear equations are not just for the classroom, they appear all around us in daily life. Any situation that involves a fixed starting value and a constant rate of change can be modelled using a straight-line equation of the form \(y = mx + c\text{.}\)
Understanding these applications can help us make predictions, compare situations, and make informed decisions.

Activity 2.2.6.

Work in groups
What you need:
Instructions:
  1. Interview a boda boda or taxi operator. Ask about how they charge their customers (e.g. base fare + per kilometre cost).
  2. Write down the relationship between distance travelled \(x\) and total cost \(y\text{.}\)
  3. Express this relationship as a linear equation in the form \(y = mx + c\text{.}\)
  4. Discuss how such an equation can help both the rider and the customer.
Share your findings with your class.
Key Takeaway:
Everyday life situations involving steady increase or decrease can be modelled using linear equations. This makes it easier to predict, budget, or compare.

Example 2.2.7.

A water tank is being filled at a constant rate. After \(1\) minute, it contains \(20\) litres. After \(4\) minutes, it contains \(80\) litres.
a) Find the equation that relates time \(x\) (in minutes) to the amount of water \(y\) (in litres).
b) How much water will be in the tank after \(10\) minutes?
c) How long will it take to fill the tank to \(200\) litres?
Solution.
a) First, find the gradient \(m\text{:}\)
\(m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{80 - 20}{4 - 1} = \frac{60}{3} = 20\)
Now, use the point \((1, 20)\) to find \(c\text{:}\)
\(20 = 20(1) + c \Rightarrow c = 0\)
So, the equation is \(y = 20x\text{.}\)
b) To find the amount of water after \(10\) minutes, substitute \(x = 10\) into the equation:
\(y = 20(10) = 200\) litres.
c) To find how long it takes to fill the tank to \(200\) litres, set \(y = 200\) and solve for \(x\text{:}\)
\(200 = 20x \Rightarrow x = \frac{200}{20} = 10\) minutes.

Exercises Exercises

1.
\(\textbf{Answer the following in your exercise book.}\)
  1. A mobile provider charges Ksh \(50\) per GB of data and a flat connection fee of Ksh \(100\text{.}\) Write the equation that models the total cost \(y\) in terms of data used \(x\text{.}\)
  2. A vehicle travels at a constant speed. It covers 120 km in 2 hours and 180 km in 3 hours. Find the equation connecting time \(x\) (hours) to distance \(y\) (km).
  3. A student earns Ksh \(200\) per week as allowance and Ksh \(50\) for every day they help in a shop. Write an equation to model the total amount earned in a week if they work for \(x\) days.
  4. A maize farmer harvests 15 bags per acre. Write an equation that relates the number of acres \(x\) to total harvest \(y\text{.}\)
  5. Reflect: Think of one more situation from your life or community that can be modelled using a straight-line equation. Describe it and write its equation.