# Linear and quadratic functions

> IB Mathematics: Analysis and Approaches HL · IB AA HL
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u2-linear-and-quadratic-functions/

This sub-topic covers core properties of linear (first-degree) and quadratic (second-degree) polynomial functions, their graphs, key algebraic features, and common problem-solving approaches for IB AA HL exams.

**Prerequisites:** [Basic coordinate geometry](https://www.owlsprep.com/study/ib-math-aa-hl-u1-coordinate-geometry/); [Introduction to polynomials](https://www.owlsprep.com/study/ib-math-aa-hl-u2-polynomial-introduction/)

## Learning objectives

- Find the equation of a linear function given key features or two points
- Convert quadratic functions between standard, vertex and factored forms
- Identify all key features (intercepts, vertex, roots) of a quadratic function
- Use the discriminant to determine the number of real intersections between a line and a quadratic

## Linear Functions

**Linear function** — A first-degree polynomial function that graphs to a straight line. $m$ is the constant gradient (slope), and $c$ is the y-intercept (the point where the line crosses the y-axis).

*Notation:* f(x) = mx + c

*Example:* f(x) = 3x - 2 has gradient 3 and crosses the y-axis at (0, -2).

To find the equation of a line passing through two points $(x_1, y_1)$ and $(x_2, y_2)$, first calculate the gradient as $m = \frac{y_2 - y_1}{x_2 - x_1}$, then substitute one point and $m$ into $y = mx + c$ to solve for $c$.

**Worked example:** Find the equation of the line passing through $(3, 7)$ and $(1, 1)$.

1. Calculate the gradient from the two points:
2. $$m = \frac{1 - 7}{1 - 3} = \frac{-6}{-2} = 3$$
3. Substitute $m=3$ and $(x,y) = (1,1)$ to find $c$:
4. $$1 = 3(1) + c \implies c = 1 - 3 = -2$$
5. Write the final equation of the line:
6. $$y = 3x - 2$$

> **Exam tip:** Always check your answer by substituting the second point into your final equation to confirm it is correct.

## Quadratic Functions: Forms and Key Features

**Quadratic function** — A second-degree polynomial function that graphs to a parabola. The leading coefficient $a$ determines the direction it opens: $a>0$ opens upwards, $a<0$ opens downwards.

*Notation:* Standard: $f(x) = ax^2 + bx + c$; Vertex: $f(x) = a(x-h)^2 +k$; Factored: $f(x) = a(x-p)(x-q)$

Each form of a quadratic is designed to show different key features: standard form gives the y-intercept $(0,c)$ directly, vertex form gives the turning point (vertex) at $(h,k)$ directly, and factored form gives the roots (x-intercepts) at $x=p$ and $x=q$ directly. To convert from standard form to vertex form, you use the method of completing the square.

**Worked example:** Convert $f(x) = 3x^2 - 12x + 5$ to vertex form and state the vertex coordinates.

1. Factor the leading coefficient out of the x terms:
2. $$f(x) = 3(x^2 - 4x) + 5$$
3. Complete the square inside the bracket by adding and subtracting the square of half the x coefficient:
4. $$x^2 - 4x = (x^2 - 4x + 4) - 4 = (x-2)^2 - 4$$
5. Substitute back and simplify, remembering to multiply the constant term by 3:
6. $$f(x) = 3\left((x-2)^2 - 4\right) + 5 = 3(x-2)^2 - 12 + 5 = 3(x-2)^2 - 7$$
7. State the vertex from vertex form:
8. $$\text{Vertex} = (2, -7)$$

> **tip**
>
> Completing the square is a core skill you will use again for integration and finding centers of mass later in the course, so practice it until it is automatic.

## Intersections and the Discriminant

To find intersections between a line and a quadratic, equate the two expressions for $y$ to get a single quadratic equation in $x$. The number of real intersections is determined by the discriminant of this quadratic.

**Discriminant** — A value that tells you how many real roots a quadratic equation has. The rules are: $\Delta > 0$ = 2 distinct real roots, $\Delta = 0$ = 1 repeated real root, $\Delta < 0$ = 0 real roots.

*Notation:* \Delta = b^2 - 4ac$ for $ax^2 + bx + c = 0$

**Worked example:** Find how many intersections there are between $y = 2x + 3$ and $y = 2x^2 - 3x + 1$.

1. Equate the two expressions for y:
2. $$2x + 3 = 2x^2 - 3x + 1$$
3. Rearrange into standard quadratic form:
4. $$2x^2 - 5x - 2 = 0$$
5. Calculate the discriminant with $a=2$, $b=-5$, $c=-2$:
6. $$\Delta = (-5)^2 - 4(2)(-2) = 25 + 16 = 41$$
7. Interpret the result:
8. $$\Delta = 41 > 0 \implies \text{2 distinct real intersections}$$

**Check your understanding**

Test your understanding of discriminant rules:

1. A line is tangent to a parabola. What is the discriminant of the resulting quadratic?

   - Negative
   - Zero
   - Positive

   *Why:* A tangent touches the parabola at exactly one point, so there is one repeated root, which gives a discriminant of zero.

2. The discriminant of a quadratic is -9. How many real roots does it have?

   - 0
   - 1
   - 2

   *Why:* Negative discriminant means no real roots, only two complex roots.

## Common pitfalls

- **Wrong:** Writing the gradient formula as $\frac{x_2 - x_1}{y_2 - y_1}$ instead of $\frac{y_2 - y_1}{x_2 - x_1}$
  - Why it fails: This gives the reciprocal of the correct gradient, leading to a wrong line equation and lost marks
  - Correct: Remember gradient = rise over run, which is change in y divided by change in x
- **Wrong:** Forgetting to multiply the constant term by the leading coefficient when completing the square
  - Why it fails: When you factor $a$ out of the x terms, the constant you subtract inside the bracket must be multiplied by $a$ when you expand
  - Correct: Always expand your final vertex form back to standard form to check it matches the original quadratic
- **Wrong:** Reading the x-coordinate of the vertex as $-h$ from vertex form $a(x-h)^2 +k$
  - Why it fails: The vertex occurs when the bracket equals zero: $x-h = 0 \implies x=h$, not $x=-h$
  - Correct: Always set the bracket term equal to zero to find the x-coordinate of the vertex to avoid sign errors
- **Wrong:** Stating there are two intersections even when the discriminant is negative
  - Why it fails: IB exam questions regularly test whether you remember that negative discriminant means no real intersections
  - Correct: Always calculate and explicitly reference the discriminant when asked for the number of intersections or roots
- **Wrong:** Taking the y-intercept from standard form $ax^2 +bx +c$ as $b$ instead of $c$
  - Why it fails: When $x=0$, all terms with $x$ disappear, so $f(0) = c$, not $b$
  - Correct: Substitute $x=0$ into the quadratic to confirm the y-intercept if you are unsure

## Cheatsheet

| Concept | Form/Rule | Key Feature |
| --- | --- | --- |
| Linear function | $y = mx + c$ | $m$ = gradient, $c$ = y-intercept |
| Quadratic (standard) | $y = ax^2 +bx +c$ | Y-intercept at $(0, c)$ |
| Quadratic (vertex) | $y = a(x-h)^2 +k$ | Vertex at $(h, k)$ |
| Quadratic (factored) | $y = a(x-p)(x-q)$ | Roots at $x=p, x=q$ |
| Discriminant | $\Delta = b^2 - 4ac$ | $\Delta>0$: 2 roots; $\Delta=0$: 1 root; $\Delta<0$: 0 real roots |

## What's next

Linear and quadratic functions are the foundation for all higher-degree polynomials and more complex functions you will encounter in IB AA HL. The skills you learned here, from completing the square to using the discriminant, will be used repeatedly in topics like calculus, complex numbers, and general polynomial functions. Understanding how to find intersections and key graph features is also essential for solving systems of equations and optimization problems, which are common on both Paper 1 and Paper 2 exams. Next, you will build on this knowledge to explore more complex polynomial functions and their properties.

- [Polynomial and Rational Functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-polynomial-and-rational-functions/)
- [Exponential and logarithmic functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-exponential-and-logarithmic-functions/)
- [Basic trigonometric functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-basic-trigonometric-functions/)

---

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-u2-linear-and-quadratic-functions/
