# 2D Coordinate Geometry

> IB Mathematics: Analysis and Approaches HL · Geometry & Trigonometry
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u3-2d-coordinate-geometry/

This module covers core 2D coordinate geometry concepts for IB AA HL, including distance, midpoint, straight line equations, parallel/perpendicular lines, and circle equations. You will learn to solve common intersection and angle problems regularly tested in IB exams.

**Prerequisites:** [Algebraic manipulation of linear equations](https://www.owlsprep.com/study/ib-math-aa-hl-u1-linear-equations/); [Basic trigonometry for arctangent calculations](https://www.owlsprep.com/study/ib-math-aa-hl-u2-trigonometric-functions/)

## Learning objectives

- Calculate distance between two points and midpoint of a line segment
- Derive and use equations of straight lines in multiple forms
- Find intersections of lines and calculate the acute angle between two lines
- Find equations of circles and solve tangent/intersection problems

## Distance and Midpoint Formulas

Any point on the 2D coordinate plane is described by an ordered pair $(x, y)$, where $x$ is the horizontal coordinate and $y$ is the vertical coordinate. Using Pythagoras' theorem, we can derive the distance between any two points.

**Distance and Midpoint** — Distance: $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ 
 Midpoint: $M\left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$

*Notation:* For points $A(x_1, y_1)$, $B(x_2, y_2)$

*Example:* Distance between $(1, 2)$ and $(4, 6)$ is 5 units, midpoint is $(2.5, 4)$

**Worked example:** Find the distance between $A(-2, 3)$ and $B(4, -5)$, then find the midpoint $M$ of segment $AB$.

1. Label coordinates: $x_1 = -2, y_1 = 3, x_2 = 4, y_2 = -5$
2. Substitute into the distance formula:
3. $$d = \sqrt{(4 - (-2))^2 + (-5 - 3)^2} = \sqrt{6^2 + (-8)^2} = \sqrt{100} = 10$$
4. Substitute into the midpoint formula:
5. $$M\left(\frac{-2 + 4}{2}, \frac{3 + (-5)}{2}\right) = M(1, -1)$$
6. Final result: distance is 10 units, midpoint is $(1, -1)$

> **Exam tip:** Always double check negative signs when subtracting coordinates, this is the most common error in this topic.

## Straight Line Equations

A straight line is a set of points that satisfy a linear relationship between $x$ and $y$. Its gradient (slope) describes steepness, and lines can be written in three common forms, all accepted in IB exams unless specified otherwise.

**Parallel and Perpendicular Lines** — Parallel lines never intersect and have equal gradients: $m_1 = m_2$. Perpendicular lines intersect at $90^\circ$ and their gradients multiply to $-1$: $m_1 m_2 = -1$.

Common line forms: 1. Gradient-intercept: $y = mx + c$ ($c$ = y-intercept), 2. Point-gradient: $y - y_1 = m(x - x_1)$, 3. General: $ax + by + c = 0$.

**Worked example:** Find the equation of the line that passes through $(3, -2)$ and is perpendicular to $2x + 4y - 5 = 0$. Write your answer in general form.

1. Rearrange the given line to find its gradient:
2. $$2x + 4y - 5 = 0 \implies y = -\frac{1}{2}x + \frac{5}{4}$$
3. Gradient of given line is $-\frac{1}{2}$. For perpendicular lines, find the required gradient:
4. $$-\frac{1}{2}m = -1 \implies m = 2$$
5. Use point-gradient form with the given point:
6. $$y - (-2) = 2(x - 3) \implies y + 2 = 2x - 6$$
7. Rearrange to general form:
8. $$2x - y - 8 = 0$$

> **Exam tip:** If the question asks for a specific form (e.g. general form), always give your answer in that form to earn full marks.

## Intersections and Angle Between Two Lines

Two distinct lines are either parallel (no intersection) or intersect at exactly one point. The intersection point satisfies both line equations, so we solve the system of linear equations to find its coordinates.

The acute angle $\theta$ between two lines with gradients $m_1$ and $m_2$ is calculated using the formula derived from the tangent compound angle identity:

$$\tan\theta = \left|\frac{m_2 - m_1}{1 + m_1 m_2}\right|, \quad 0^\circ \leq \theta \leq 90^\circ$$

**Worked example:** Find the acute angle between the lines $y = 3x + 2$ and $y = -x + 5$.

1. Identify the gradients from the equations: $m_1 = 3$, $m_2 = -1$
2. Substitute into the angle formula:
3. $$\tan\theta = \left|\frac{-1 - 3}{1 + (3)(-1)}\right| = \left|\frac{-4}{-2}\right| = 2$$
4. Calculate $\theta$ using arctangent:
5. $$\theta = \arctan(2) \approx 63.4^\circ$$
6. This is already acute, so it is the required angle.

**Check your understanding**

Test your understanding:

1. What is the angle between two perpendicular lines?

   - 30°
   - 45°
   - 90°
   - 180°

   *Answer:* 90°

   *Why:* Perpendicular lines are defined as lines that intersect at a right angle (90°), which is consistent with the angle formula that gives undefined $\tan\theta$, corresponding to 90°.

## Equations of Circles

A circle is defined as all points $(x, y)$ that are a fixed distance (radius $r$) from a fixed center point $(h, k)$. We can derive the standard equation from the distance formula directly.

**Circle Equation Forms** — Standard form: $(x - h)^2 + (y - k)^2 = r^2$. General form: $x^2 + y^2 + 2gx + 2fy + c = 0$, where center is $(-g, -f)$ and radius is $\sqrt{g^2 + f^2 - c}$.

*Notation:* Center $(h, k)$, radius $r$

**Worked example:** Find the center and radius of the circle with equation $x^2 + y^2 - 4x + 6y - 12 = 0$.

1. Group $x$ and $y$ terms, move the constant to the right-hand side:
2. $$(x^2 - 4x) + (y^2 + 6y) = 12$$
3. Complete the square for both variables:
4. $$(x - 2)^2 - 4 + (y + 3)^2 - 9 = 12$$
5. Simplify to get standard form:
6. $$(x - 2)^2 + (y + 3)^2 = 25$$
7. Compare to standard form to get center and radius:
8. Center = $(2, -3)$, Radius = $\sqrt{25} = 5$

> **Exam tip:** The tangent to a circle is always perpendicular to the radius at the point of contact. This is the key property used for all tangent to circle exam questions.

## Common pitfalls

- **Wrong:** Writing $(x + h)^2 + (y + k)^2 = r^2$ for a circle with center $(h, k)$
  - Why it fails: Signs are flipped when moving from center coordinates to the standard equation
  - Correct: For center $(h, k)$, use $(x - h)^2 + (y - k)^2 = r^2$. A center at $(-2, 3)$ becomes $(x + 2)^2 + (y - 3)^2 = r^2$
- **Wrong:** Trying to use $m_2 = -1/m_1$ for a horizontal (gradient 0) line to find its perpendicular
  - Why it fails: This leads to division by zero, which is undefined
  - Correct: A horizontal line ($y = c$) has a vertical perpendicular ($x = k$), and vice versa. Do not use the gradient product rule for these cases.
- **Wrong:** Taking both positive and negative roots when calculating distance or radius
  - Why it fails: Distance and radius are scalar quantities, they are always positive
  - Correct: Only take the positive square root when calculating distance, radius or length of any segment.
- **Wrong:** Leaving the negative result from the angle formula calculation, leading to an obtuse angle
  - Why it fails: The formula always requires an absolute value to get the acute angle between two lines, which is what exams ask for
  - Correct: Always take the absolute value of the fraction before calculating $\arctan$ to get an angle between 0° and 90°.

## Cheatsheet

| Concept | Formula |
| --- | --- |
| Distance between $(x_1,y_1), (x_2,y_2)$ | $d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$ |
| Midpoint of segment | $\left(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}\right)$ |
| Gradient of line | $m = \frac{y_2-y_1}{x_2-x_1}$ |
| Parallel lines | $m_1 = m_2$ |
| Perpendicular lines | $m_1 m_2 = -1$ |
| Circle (center $(h,k)$, radius $r$) | $(x-h)^2 + (y-k)^2 = r^2$ |
| Acute angle between two lines | $\tan\theta = \left\|\frac{m_2 - m_1}{1 + m_1 m_2}\right\|$ |

## What's next

2D coordinate geometry is the foundation for all higher geometry topics in IB AA HL, including 3D coordinate geometry, 2D and 3D vectors, and conic sections. Mastering the basic formulas and problem solving patterns here will make it much easier to solve more complex problems involving intersections, tangents, and distances in higher dimensions. Many IB exam problems combine 2D coordinate geometry with calculus (for finding tangents to curves) and trigonometry, so a solid understanding of this topic is essential to achieve a high overall grade.

- [3D Coordinate Geometry](https://www.owlsprep.com/study/ib-math-aa-hl-u3-3d-coordinate-geometry/)
- [Vector fundamentals and dot product](https://www.owlsprep.com/study/ib-math-aa-hl-u3-vector-fundamentals-and-dot-product/)
- [Cross product of vectors (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u3-cross-product-of-vectors/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u3-2d-coordinate-geometry/
