2. Functions

Equations Of A Straight Line

Equations of a Straight Line

Welcome, students! πŸ“ˆ In this lesson, you will explore one of the most important ideas in algebra and functions: the equation of a straight line. Straight lines are simple to draw, but they are powerful because they model many real-life situations, such as constant speed, fixed costs plus a charge per item, and temperature changes over time. By the end of this lesson, you should be able to identify the key parts of a line, write equations in different forms, and connect straight-line equations to the wider study of functions in IB Mathematics Analysis and Approaches SL.

What You Need to Learn

In this lesson, you will learn how to:

  • explain the meaning of terms such as gradient, slope, intercept, and linear function
  • write and interpret equations of straight lines in different forms
  • use points, gradients, and graphs to find line equations
  • understand how straight lines fit into the function topic
  • solve real-world problems using linear models

A straight line is one of the simplest examples of a function. It shows a constant rate of change, which means the output changes by the same amount for each equal change in the input. That idea appears again and again in mathematics and science, so mastering it is a major step forward πŸš€

What Is a Straight Line?

A straight line is a graph with a constant gradient. In function language, it is often written as $y = mx + c$, where $m$ is the gradient and $c$ is the $y$-intercept. This is called the slope-intercept form.

For a function, we can also write $f(x) = mx + c$. This means the same thing as $y = mx + c$, but it uses function notation. If students sees $f(x)$, think β€œthe output of the function when the input is $x$.”

The gradient tells you how steep the line is. 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 horizontal line has equation $y = c$ and its gradient is zero.

The intercept is where the line crosses the $y$-axis. At this point, $x = 0$. So in $y = mx + c$, the value of $c$ is the $y$-value when $x = 0$.

Example: In $y = 3x - 2$, the gradient is $3$ and the $y$-intercept is $-2$. This means that for every increase of $1$ in $x$, the value of $y$ increases by $3$.

Different Forms of the Equation of a Line

There are several useful ways to write the equation of a straight line. IB students should know more than one form because different forms are useful in different situations.

Slope-intercept form

The form $y = mx + c$ is the most common. It is easy to read the gradient and the $y$-intercept directly from the equation.

Example: $y = -\frac{1}{2}x + 4$ has gradient $-\frac{1}{2}$ and $y$-intercept $4$.

Point-slope form

If you know a point on the line and the gradient, you can use

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

where $(x_1, y_1)$ is a point on the line and $m$ is the gradient.

Example: A line passes through $(2, 5)$ and has gradient $3$. Then

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

This equation can be simplified:

$$y - 5 = 3x - 6$$

$$y = 3x - 1$$

Two-point form using gradient first

If you know two points, you can first find the gradient using

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

This formula measures β€œrise over run,” which means vertical change divided by horizontal change.

Example: Find the gradient through $(1, 2)$ and $(5, 10)$.

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

Then use point-slope form with either point:

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

which simplifies to

$$y = 2x$$

Finding the Equation of a Line from Information

In many IB questions, students will be given some information and asked to form the equation of a line. The method depends on what you know.

If you know the gradient and one point

Use point-slope form.

Example: A line has gradient $-4$ and passes through $(3, 7)$.

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

Expand:

$$y - 7 = -4x + 12$$

$$y = -4x + 19$$

If you know two points

First find the gradient, then use one point.

Example: A line passes through $(-1, 6)$ and $(3, -2)$.

$$m = \frac{-2 - 6}{3 - (-1)} = \frac{-8}{4} = -2$$

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

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

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

$$y = -2x + 4$$

If you know the intercepts

Sometimes a line crosses the axes at known points. The $y$-intercept gives a direct value of $c$, and the $x$-intercept can help find the gradient.

Example: A line crosses the $y$-axis at $5$ and the $x$-axis at $10$. The points are $(0, 5)$ and $(10, 0)$.

$$m = \frac{0 - 5}{10 - 0} = -\frac{5}{10} = -\frac{1}{2}$$

So the equation is

$$y = -\frac{1}{2}x + 5$$

Interpreting Gradients and Intercepts in Real Life

Straight lines are often used as linear models because they describe situations with a constant rate of change. This makes them very useful in science, business, and everyday life.

Example: taxi fare

Suppose a taxi charges a fixed fee of $4$ plus $2$ dollars per kilometre. If $x$ is the distance in kilometres and $y$ is the total cost in dollars, the model is

$$y = 2x + 4$$

Here, the gradient is $2$, meaning the cost increases by $2$ dollars for every extra kilometre. The intercept is $4$, which represents the starting fee even when $x = 0$.

Example: temperature conversion

The formula relating Celsius and Fahrenheit is a straight-line model:

$$F = \frac{9}{5}C + 32$$

This shows that a change in Celsius corresponds to a constant change in Fahrenheit. The intercept $32$ is the Fahrenheit value when $C = 0$.

These examples show why linear functions matter: they let us describe change clearly and predict values accurately when the relationship is approximately constant.

Graphs, Intercepts, and Special Cases

To sketch a straight line, students usually needs two pieces of information, or one point and the gradient.

Horizontal lines

A horizontal line has equation $y = c$. Its gradient is $0$. For example, $y = 6$ is a line parallel to the $x$-axis.

Vertical lines

A vertical line has equation $x = a$. For example, $x = -3$ is a vertical line through $-3$ on the $x$-axis. A vertical line is not a function because one input value of $x$ gives many possible values of $y$. This is important in function language: not every graph is a function.

Parallel and perpendicular lines

Two lines are parallel if they have the same gradient. For example, $y = 2x + 1$ and $y = 2x - 5$ are parallel.

Two non-vertical lines are perpendicular if their gradients multiply to $-1$. So if one line has gradient $m$, a perpendicular line has gradient $-\frac{1}{m}$, provided $m \neq 0$.

Example: If one line has gradient $3$, a perpendicular line has gradient $-\frac{1}{3}$.

Connecting Straight Lines to Functions

A straight line is a function when each input $x$ gives exactly one output $y$. In function notation, we can write

$$f(x) = mx + c$$

This fits into the broader topic of functions because it shows the basic structure of input and output, domain and range, and graph representation.

For linear functions, the domain is often all real numbers, written as

$$x \in \mathbb{R}$$

because a straight line can usually continue forever in both directions. The range is also all real numbers unless the line is horizontal.

Straight-line functions also help with later topics like transformations and composites. For example, if $f(x) = 2x + 1$, then shifting the line up gives $f(x) + 3 = 2x + 4$. This shows how algebra changes the graph.

A line can also be the starting point for inverse functions. If $f(x) = mx + c$ and $m \neq 0$, then $f$ has an inverse function. To find it, swap $x$ and $y$ and solve for $y$.

Example: If $f(x) = 4x - 7$, then

$$y = 4x - 7$$

Swap $x$ and $y$:

$$x = 4y - 7$$

Solve for $y$:

$$x + 7 = 4y$$

$$y = \frac{x + 7}{4}$$

So

$$f^{-1}(x) = \frac{x + 7}{4}$$

This inverse reverses the original input-output relationship.

Conclusion

Equations of straight lines are a core part of functions in IB Mathematics Analysis and Approaches SL. students should now recognize the main forms of a linear equation, find an equation from given information, and interpret gradient and intercept in context. Straight-line graphs are not only easy to draw but also extremely useful for modeling constant change. They connect directly to function notation, graphing, inverse functions, and later algebraic ideas. Mastering linear equations builds confidence for more complex function types such as quadratic, rational, exponential, and logarithmic models.

Study Notes

  • A straight line has a constant gradient.
  • The slope-intercept form is $y = mx + c$ or $f(x) = mx + c$.
  • The gradient is $m$ and the $y$-intercept is $c$.
  • Use $m = \frac{y_2 - y_1}{x_2 - x_1}$ to find the gradient from two points.
  • Use $y - y_1 = m(x - x_1)$ when you know one point and the gradient.
  • Parallel lines have equal gradients.
  • Perpendicular non-vertical lines have gradients whose product is $-1$.
  • A vertical line has equation $x = a$ and is not a function.
  • A horizontal line has equation $y = c$ and gradient $0$.
  • Linear functions model constant rate of change in real situations.
  • Every equation, variable expression, derivative, integral, limit, inequality, and formula in this lesson is written using LaTeX.

Practice Quiz

5 questions to test your understanding

Equations Of A Straight Line β€” IB Mathematics Analysis And Approaches SL | A-Warded