2. Functions

Equations Of A Straight Line

Equations of a Straight Line 📈

Introduction: Why straight lines matter

students, a straight line is one of the most important ideas in mathematics because it is simple, powerful, and easy to recognize in real life. When you look at a graph of a bus fare that increases by the same amount for every mile, or the amount of money earned by working at a constant hourly rate, you are often looking at a linear relationship. In IB Mathematics: Analysis and Approaches HL, equations of a straight line help you describe patterns, compare variables, and build a foundation for more advanced function ideas.

In this lesson, you will learn how to:

  • explain the main language used for straight lines,
  • write and interpret different forms of a line’s equation,
  • connect straight lines to function notation,
  • use line equations to solve problems involving points, gradients, and intersections,
  • understand how straight lines fit into the wider topic of functions.

A straight line is a graph with a constant rate of change. That means the same change in $x$ always gives the same change in $y$. This constant change is called the gradient or slope. 🌟

1. The meaning of a straight line

A function describes a relationship between variables, usually written as $y=f(x)$. For a straight line, the output changes at a constant rate as the input changes. This is why linear functions are often used to model real-world situations where growth or decrease is steady.

For example, if a taxi charges a fixed start fee plus a fee per kilometer, the total cost can be modeled by a line. If the start fee is $5$ and each kilometer adds $2$, then the cost $C$ after $x$ kilometers is $C=2x+5$. The graph is a straight line because every extra kilometer increases the cost by the same amount.

Important vocabulary:

  • Gradient: the steepness of the line, written as $m$.
  • $y$-intercept: the point where the line crosses the $y$-axis.
  • Intercept: a point where the graph crosses an axis.
  • Linear function: a function whose graph is a straight line.
  • Independent variable: usually $x$, the input.
  • Dependent variable: usually $y$, the output.

The gradient tells you whether the line rises or falls:

  • If $m>0$, the line rises from left to right.
  • If $m<0$, the line falls from left to right.
  • If $m=0$, the line is horizontal.
  • A vertical line has no single gradient, so it is not a function.

2. Gradient and rate of change

The gradient is defined using two points on the line. If the line passes through $(x_1,y_1)$ and $(x_2,y_2)$, then the gradient is

$$m=\frac{y_2-y_1}{x_2-x_1}$$

This formula measures change in $y$ divided by change in $x$. It is often described as “rise over run.” 🚀

Example: Find the gradient of the line through $(1,3)$ and $(5,11)$.

$$m=\frac{11-3}{5-1}=\frac{8}{4}=2$$

So the line rises by $2$ units for every $1$ unit moved to the right.

You can also interpret gradient in context. If a water tank fills by $4$ liters per minute, then the amount of water increases at a constant rate of $4$ liters per minute. That means the gradient is $4$ in a graph of water amount against time.

A key IB skill is understanding what the gradient means in words, not just calculating it. If the line models temperature, population, distance, or cost, the gradient tells the rate of change of the dependent variable with respect to the independent variable.

3. Forms of the equation of a straight line

There are several common ways to write the equation of a straight line. Each form is useful in different situations.

Slope-intercept form

The most familiar form is

$$y=mx+c$$

where $m$ is the gradient and $c$ is the $y$-intercept.

Example: In $y=3x-2$, the gradient is $3$ and the $y$-intercept is $-2$. The line crosses the $y$-axis at $(0,-2)$.

This form is especially useful when you know the gradient and one point on the $y$-axis.

Point-slope form

If you know the gradient and one point $(x_1,y_1)$, you can use

$$y-y_1=m(x-x_1)$$

Example: A line with gradient $-4$ passing through $(2,7)$ has equation

$$y-7=-4(x-2)$$

This form is useful for building a line from given information.

General form

A line can also be written as

$$Ax+By+C=0$$

where $A$, $B$, and $C$ are constants, and $A$ and $B$ are not both zero.

Example: $2x-3y+6=0$ is a straight line. You can rearrange it into slope-intercept form:

$$-3y=-2x-6$$

$$y=\frac{2}{3}x+2$$

So the gradient is $\frac{2}{3}$ and the $y$-intercept is $2$.

General form is useful in algebraic manipulation and when solving systems of equations.

4. Writing equations from information

IB questions often give you a point, a gradient, or two points and ask you to find the equation of the line.

Given gradient and one point

Suppose a line has gradient $5$ and passes through $(1,-3)$. Use point-slope form:

$$y-(-3)=5(x-1)$$

$$y+3=5x-5$$

$$y=5x-8$$

Given two points

Suppose a line passes through $(2,1)$ and $(6,9)$. First find the gradient:

$$m=\frac{9-1}{6-2}=\frac{8}{4}=2$$

Now use point-slope form with $(2,1)$:

$$y-1=2(x-2)$$

$$y=2x-3$$

Given an intercept and a point

If a line crosses the $y$-axis at $4$ and passes through $(3,10)$, then the gradient is

$$m=\frac{10-4}{3-0}=2$$

So the equation is

$$y=2x+4$$

These methods show how algebra and geometry work together. A line is not just a picture; it is a rule connecting variables.

5. Intersections and solving equations

The point where two lines cross is important because it is a solution to both equations at once. This is common in systems of equations and in real situations like comparing prices or finding break-even points.

Example: Find the intersection of

$$y=2x+1$$

and

$$y=-x+7$$

Set the two expressions equal:

$$2x+1=-x+7$$

$$3x=6$$

$$x=2$$

Substitute back:

$$y=2(2)+1=5$$

The lines intersect at $(2,5)$.

In context, if one line represents the cost of one phone plan and another line represents a different plan, the intersection tells you the point where both plans cost the same. 📱

6. Straight lines as functions

A straight line often appears as a function, such as $f(x)=mx+c$. This is important because the Functions topic in IB is not only about drawing graphs but also about understanding how inputs and outputs behave.

For a line to be a function, each input $x$ must produce exactly one output $y$. A non-vertical straight line satisfies this rule. For example, $f(x)=3x-1$ is a function because each $x$ gives a single value of $f(x)$.

You may also use function notation to describe transformations. If $f(x)=x$, then:

  • $f(x)+2$ shifts the graph up by $2$,
  • $f(x-3)$ shifts the graph right by $3$,
  • $-f(x)$ reflects it in the $x$-axis.

Even though this lesson focuses on straight lines, these ideas connect directly to the broader syllabus topic of transformations and function behavior.

7. Common errors to avoid

Students sometimes make predictable mistakes with line equations. Watch out for these:

  • Confusing the gradient with the $y$-intercept.
  • Forgetting to use brackets in point-slope form.
  • Reversing the order in the gradient formula.
  • Thinking every straight line is a function, including vertical lines.
  • Mixing up the meaning of a graph’s crossing point with the $y$-intercept.

For example, the line $x=4$ is vertical. It is a straight line, but it is not a function because the input $x=4$ gives infinitely many $y$ values. This violates the function rule.

Conclusion

students, equations of a straight line are a central part of IB Mathematics: Analysis and Approaches HL because they link algebra, graphing, and real-world modeling. You should now be able to recognize a line’s gradient, identify its intercepts, write its equation in different forms, and use line equations to solve practical problems. Straight lines are also a gateway into the language of functions, where inputs, outputs, rates of change, and graphical interpretation all matter. Mastering this topic gives you tools that are used again in systems of equations, modeling, and more advanced function work. ✅

Study Notes

  • A straight line has a constant rate of change.
  • The gradient formula is $m=\frac{y_2-y_1}{x_2-x_1}$.
  • Slope-intercept form is $y=mx+c$.
  • Point-slope form is $y-y_1=m(x-x_1)$.
  • General form is $Ax+By+C=0$.
  • The $y$-intercept is the point where $x=0$.
  • A positive gradient means the line rises; a negative gradient means it falls.
  • A non-vertical straight line is a function.
  • Intersection points can be found by setting equations equal.
  • Straight-line models are useful for costs, distance, temperature, and other constant-rate situations.

Practice Quiz

5 questions to test your understanding