# Straight Lines and Coordinate Geometry

> Gradient, y = mx + c, distance, midpoint, parallel and perpendicular lines, and linear models.

From HSC Maths Advanced on WhizzNotes, free study notes for NSW students: https://whizznotes.com/mathematics-advanced/linear-graphs/. Updated 3 November 2026.
Year 11 and Year 12 boxes go deeper than the Year 10 text around them.

### Story time: The taxi meter
Liam takes a taxi from Central Station. The meter starts at 4 dollars the moment he sits down, then adds 2 dollars for every kilometre.

After 1 km it shows 6 dollars. After 5 km it shows 14 dollars. Liam notices that each kilometre adds the same amount. If he drew cost against distance, the dots would sit on a straight line.

The starting fee is where the line begins. The cost per kilometre is how steep it is. Those two numbers describe the whole trip: $C = 2d + 4$.

**In short:** A straight line has the equation $y = mx + c$, where $m$ is the gradient (rise over run) and $c$ is where it crosses the y-axis. Parallel lines have the same gradient, perpendicular lines have gradients that multiply to $-1$, and the distance between two points comes from Pythagoras.

## Starting point: Years 9 and 10

### Gradient

The **gradient** $m$ tells you how steep a line is. It is the rise divided by the run.

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

- Positive gradient: the line goes up to the right.
- Negative gradient: the line goes down to the right.
- Horizontal line: $m = 0$. Vertical line: gradient is undefined.

### Worked example: Gradient from two points
Find the gradient through $A(1, 2)$ and $B(4, 11)$.

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

### The equation of a line

$$y = mx + c$$

$m$ is the gradient and $c$ is the **y-intercept**, where the line crosses the y-axis. In the taxi story $m = 2$ and $c = 4$.

*Diagram: The line y equals 2x plus 1 with a rise of 2 over a run of 1 marked*
*Start at the intercept, then go across 1 and up 2.*

### Distance and midpoint

For points $(x_1, y_1)$ and $(x_2, y_2)$:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \qquad M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$$

The **distance** $d$ is how far apart the two points are: the length of the straight line from one to the other. The **midpoint** $M$ is the point exactly halfway along that line.

The distance formula is just Pythagoras on the grid. Draw a right-angled triangle under the line. Its run is the change in $x$, its rise is the change in $y$, and the line between the points is the longest side.

### Worked example: Distance and midpoint
For $P(-1, 3)$ and $Q(5, 11)$:

- Run: $5 - (-1) = 6$. Rise: $11 - 3 = 8$.
- Distance: $d = \sqrt{6^2 + 8^2} = \sqrt{100} = 10$. So $P$ and $Q$ are 10 units apart.
- Midpoint: average the $x$ values and the $y$ values. $M = \left(\dfrac{-1 + 5}{2}, \dfrac{3 + 11}{2}\right) = (2, 7)$.

*Diagram: Points P minus 1, 3 and Q 5, 11 joined by a line of length 10, with a right-angled triangle under it of run 6 and rise 8, and the midpoint M 2, 7 halfway along*
*The distance is the long side of the right-angled triangle: √(6² + 8²) = 10.*

### Calculator tip: Distance in one line
Type the distance formula in one go, with brackets around each difference: `√( (5 - (-1))² + (2 - 6)² )`. The brackets matter when a coordinate is negative. Press `S⇔D` to get the exact surd, here $2\sqrt{13}$.

In degree mode, $\tan^{-1}(m)$ (`SHIFT tan`) gives the angle a line makes with the positive $x$-axis. If $m$ is negative, add $180^\circ$ to the calculator's answer.

### Parallel and perpendicular lines

### Key idea: Gradient rules
- **Parallel** lines have the same gradient: $m_1 = m_2$.
- **Perpendicular** lines meet at right angles: $m_1 \times m_2 = -1$, so $m_2 = -\dfrac{1}{m_1}$.

To get the perpendicular gradient, **flip the fraction and change the sign**. Then check that the two gradients multiply to $-1$.

### Worked example: Perpendicular gradients
**A positive gradient.** $y = 3x - 2$ has $m = 3 = \dfrac{3}{1}$. Flip it to $\dfrac{1}{3}$ and change the sign: the perpendicular gradient is $-\dfrac{1}{3}$. Check: $3 \times \left(-\dfrac{1}{3}\right) = -1$.

**A negative gradient.** $y = -\dfrac{2}{3}x + 1$ has $m = -\dfrac{2}{3}$. Flip it to $-\dfrac{3}{2}$ and change the sign: the perpendicular gradient is $\dfrac{3}{2}$. Check: $-\dfrac{2}{3} \times \dfrac{3}{2} = -1$.

So a perpendicular line always slopes the other way: if one goes up to the right, the other goes down to the right.

**Flat and upright lines.** A horizontal line ($m = 0$) and a vertical line (no gradient) are also perpendicular, but the rule cannot be used, because you cannot flip $0$. For example $y = 4$ and $x = 2$ meet at right angles at $(2, 4)$.

### General form

Lines are also written as $ax + by + c = 0$. To find the gradient, rearrange into $y = mx + c$. For $2x + 3y - 6 = 0$: $3y = -2x + 6$, so $y = -\dfrac{2}{3}x + 2$.

### Watch out: Rise over run, not run over rise
Put the change in $y$ on top. Keep the points in the same order on top and bottom.

### Exam tip: Finding x-intercepts
Set $y = 0$ to find where a line crosses the x-axis. Set $x = 0$ for the y-axis.

**Mind map**

```text
Straight lines
  Gradient
    Rise over run
    Positive, negative, zero
  Equation
    y = mx + c
    ax + by + c = 0
  Two points
    Distance: Pythagoras
    Midpoint: average
  Pairs of lines
    Parallel: same m
    Perpendicular: product is -1
  Models
    Start value and rate
```

### Year 11: Point-gradient form
When you know the gradient $m$ and one point $(x_1, y_1)$, use

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

**Example.** Find the line through $(2, -1)$ perpendicular to $y = \dfrac{1}{2}x + 3$.

The new gradient is $-2$. So $y + 1 = -2(x - 2)$, which gives $y = -2x + 3$.

**Intersection of lines.** Solve the two equations simultaneously. The answer is the point where they cross.

**Perpendicular bisector.** The **perpendicular bisector** of $AB$ is the line that cuts $AB$ in half ("bisects" it) and crosses it at a right angle ("perpendicular"). So it passes through the midpoint of $AB$, with the perpendicular gradient $-\dfrac{1}{m_{AB}}$. Every point on it is the same distance from $A$ and $B$.

For $A(0, 1)$ and $B(4, 3)$:

1. Midpoint: $\left(\dfrac{0 + 4}{2}, \dfrac{1 + 3}{2}\right) = (2, 2)$.
2. Gradient of $AB$: $\dfrac{3 - 1}{4 - 0} = \dfrac{1}{2}$, so the bisector's gradient is $-2$.
3. Line through $(2, 2)$ with gradient $-2$: $y - 2 = -2(x - 2)$, that is $y = -2x + 6$.

**Same distance from two points.** To find the point $(0, k)$ on the $y$-axis equally far from $A$ and $B$, set the squared distances equal and solve for $k$ (or find where the perpendicular bisector crosses the $y$-axis).

For the same $A(0, 1)$ and $B(4, 3)$:

- From $(0, k)$ to $A$: $d^2 = (0 - 0)^2 + (k - 1)^2 = k^2 - 2k + 1$.
- From $(0, k)$ to $B$: $d^2 = (0 - 4)^2 + (k - 3)^2 = k^2 - 6k + 25$.
- Set them equal: $k^2 - 2k + 1 = k^2 - 6k + 25$, so $4k = 24$ and $k = 6$.

The point is $(0, 6)$, which is 5 units from both $A$ and $B$. It is also where $y = -2x + 6$ crosses the $y$-axis, as it should be.

*Diagram: Segment from A 0, 1 to B 4, 3 with midpoint M 2, 2. The perpendicular bisector y equals minus 2x plus 6 crosses AB at a right angle at M and meets the y-axis at 0, 6, which is 5 units from A and from B*
*The bisector meets AB at its midpoint, at a right angle. The two marks show the halves are equal. The point (0, 6) on it is 5 units from both A and B.*

**Fourth corner of a parallelogram.** The diagonals of a parallelogram bisect each other, so the midpoint of $AC$ equals the midpoint of $BD$. Use it to find a missing corner $D$.

For $A(1, 1)$, $B(5, 2)$ and $C(6, 5)$:

1. Midpoint of $AC$: $\left(\dfrac{1 + 6}{2}, \dfrac{1 + 5}{2}\right) = (3.5, 3)$.
2. This is also the midpoint of $BD$. With $D(x, y)$: $\dfrac{5 + x}{2} = 3.5$ and $\dfrac{2 + y}{2} = 3$.
3. So $x = 2$ and $y = 4$: the fourth corner is $D(2, 4)$.

*Diagram: Parallelogram A 1, 1, B 5, 2, C 6, 5 and D 2, 4. Its two diagonals AC and BD cross at their shared midpoint M 3.5, 3*
*Both diagonals have the same midpoint M. Knowing M and B gives D.*

**Areas on the grid.** If two sides of a triangle are perpendicular ($m_1 m_2 = -1$), use them as base and height: area $= \frac{1}{2} \times$ base $\times$ height, with lengths from the distance formula. A line with intercepts $a$ and $b$ makes a right-angled triangle with the axes, of area $\frac{1}{2}|a||b|$.

For $P(1, 2)$, $Q(3, 6)$ and $R(5, 0)$:

1. Gradients: $m_{PQ} = \dfrac{6 - 2}{3 - 1} = 2$ and $m_{PR} = \dfrac{0 - 2}{5 - 1} = -\dfrac{1}{2}$. Their product is $-1$, so the corner at $P$ is a right angle.
2. Lengths: $PQ = \sqrt{2^2 + 4^2} = \sqrt{20}$ and $PR = \sqrt{4^2 + 2^2} = \sqrt{20}$.
3. Area $= \frac{1}{2} \times \sqrt{20} \times \sqrt{20} = \frac{1}{2} \times 20 = 10$ square units.

For the line $2x + 3y = 12$: the $x$-intercept is $6$ (set $y = 0$) and the $y$-intercept is $4$ (set $x = 0$). The triangle it makes with the axes has area $\frac{1}{2} \times 6 \times 4 = 12$ square units.

*Diagram: Triangle P 1, 2, Q 3, 6 and R 5, 0 with a right angle at P. The sides PQ and PR are both root 20 long and are the base and height*
*PQ and PR meet at a right angle, so one is the base and the other is the height.*

### Year 11: Gradient and angle
The gradient equals the tangent of the angle $\theta$ the line makes with the positive x-axis:

$$m = \tan \theta$$

A line at $45^\circ$ has gradient $\tan 45^\circ = 1$. This link appears again when we study the gradient of a curve.

For a negative gradient the angle of inclination is obtuse. The calculator gives a negative angle for $\tan^{-1} m$, so add $180^\circ$. For $3x + 2y = 7$, $m = -\frac{3}{2}$, $\tan^{-1}\left(-\frac{3}{2}\right) \approx -56^\circ$, so the angle is about $124^\circ$.

Going the other way, a line at $30^\circ$ has gradient $\tan 30^\circ = \dfrac{1}{\sqrt{3}}$.

### Year 12: Linear models
A **linear model** has a fixed start and a constant rate of change. Write it as $y = mx + c$ where $m$ is the rate.

A phone plan costs 15 dollars a month plus 0.10 dollars per text. Cost: $C = 0.1t + 15$. Break-even questions are solved by setting two models equal. Plan B costs $C = 0.05t + 25$. Equal when $0.1t + 15 = 0.05t + 25$, so $t = 200$ texts. Above 200 texts, plan B is cheaper.

In Year 12 calculus, the rate $m$ becomes the derivative. A straight line is the only graph whose rate never changes.

**A model from two data points.** A town had 50 000 people in 2010 and 44 000 in 2016. The rate is $\dfrac{44\,000 - 50\,000}{6} = -1000$ people a year. Measuring $t$ in years after 2010, $P = 50\,000 - 1000t$, so the prediction for 2025 ($t = 15$) is 35 000. Predictions far outside the data are less reliable.

**Profit.** Profit is income minus cost. With income $I = 40x$ and cost $C = 15x + 500$, profit is $25x - 500$, which is positive when $x > 20$. So at least 21 items must be sold to make a profit.

## Quick summary

- Gradient $m = \dfrac{y_2 - y_1}{x_2 - x_1}$: rise over run.
- $y = mx + c$: $m$ is the gradient, $c$ is the y-intercept.
- Distance uses Pythagoras. The midpoint is the average of the coordinates.
- Parallel lines: same gradient. Perpendicular lines: $m_1 m_2 = -1$.
- Point-gradient form: $y - y_1 = m(x - x_1)$.

## Quiz

Try these questions from the chapter quiz.

1. What is the gradient of the line through $(2, 3)$ and $(6, 11)$?
   - A. $\dfrac{1}{2}$
   - B. 2
   - C. 4
   - D. 8
   - Answer: B. 2. $m = \dfrac{11 - 3}{6 - 2} = \dfrac{8}{4} = 2$.

2. What is the y-intercept of $y = -3x + 7$?
   - A. $-3$
   - B. 7
   - C. $\dfrac{7}{3}$
   - D. 0
   - Answer: B. 7. In $y = mx + c$, $c$ is the y-intercept.

3. A line goes down from left to right. Its gradient is:
   - A. positive
   - B. negative
   - C. zero
   - D. undefined
   - Answer: B. negative. Falling to the right means a negative gradient.

The whole chapter quiz is on the page, for signed-in students: https://whizznotes.com/mathematics-advanced/linear-graphs/#quiz
