2.1 Linear Functions

1. Basic Notions on Coordinate Geometry

Given two points $A(x_1,y_1)$ and $B(x_2,y_2)$ on a Cartesian plane, the change in $x$ is called the run, and the change in $y$ is called the rise:

$$\Delta x=x_2-x_1,\qquad \Delta y=y_2-y_1.$$

The gradient, or slope, of the line segment $AB$ is

$$m=\dfrac{\Delta y}{\Delta x}=\dfrac{y_2-y_1}{x_2-x_1},\qquad x_1\neq x_2.$$

The slope indicates the inclination of the line. Moving in the positive direction of the $x$-axis:

  • If the line is increasing, then $m>0$.
  • If the line is decreasing, then $m<0$.
  • If the line is horizontal, then $m=0$.
  • If the line is vertical, then $m$ is undefined.
  • The slope also satisfies $m=\tan\theta$, where $\theta$ is the angle between the line and the positive $x$-axis.
Distance between two points:

$$d_{AB}=\sqrt{(\Delta x)^2+(\Delta y)^2} =\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.$$

Midpoint of a line segment: If $M(x,y)$ is the midpoint of $AB$, then

$$x=\dfrac{x_1+x_2}{2},\qquad y=\dfrac{y_1+y_2}{2}.$$

Therefore,

$$M\left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2}\right).$$

EXAMPLE 1

For each pair of points, find the slope, distance, and midpoint.

  • (a) Given $A(1,4)$ and $B(7,12)$:

    $$ m=\dfrac{12-4}{7-1} =\dfrac{8}{6} =\dfrac{4}{3}. $$

    $$\begin{aligned} d_{AB} &=\sqrt{(7-1)^2+(12-4)^2}\\ &=\sqrt{6^2+8^2}\\ &=\sqrt{36+64}\\ &=10. \end{aligned}$$

    $$M\left(\dfrac{1+7}{2},\dfrac{4+12}{2}\right)=M(4,8).$$

  • (b) Given $A(1,8)$ and $B(5,8)$:
    • The $y$-coordinates are equal, so the line is horizontal.
    • The slope is $m=0$.
    • The distance is $d=5-1=4$.
    • The midpoint is $M(3,8)$.
  • (c) Given $A(1,5)$ and $B(1,7)$:
    • The $x$-coordinates are equal, so the line is vertical.
    • The slope is undefined.
    • The distance is $d=7-5=2$.
    • The midpoint is $M(1,6)$.

2. The Equation of a Line

A straight line can be written in slope-intercept form as

$$y=mx+c,$$

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

  • $m$ controls the steepness and direction of the line.
  • $c$ is the $y$-intercept, so the graph crosses the $y$-axis at $(0,c)$.
  • A horizontal line has equation $y=c$ and slope $m=0$.
  • A vertical line has equation $x=c$ and has no slope.
  • A vertical line is not a function of $x$, so it is not a special case of $y=mx+c$.

EXAMPLE 2

Look at the graphs of

$$L_1:y=2x,\qquad L_2:y=-2x.$$

Line $L_1$ has slope $2$, so $y$ increases by $2$ units for every $1$ unit increase in $x$.
Line $L_2$ has slope $-2$, so $y$ decreases by $2$ units for every $1$ unit increase in $x$.
Both lines pass through the origin, so in both cases $c=0$.

EXAMPLE 3

Look at the graphs of

$$L_1:y=2x+3,\qquad L_2:y=-2x+3.$$

Line $L_1$ has slope $2$.
Line $L_2$ has slope $-2$.
Both lines have $y$-intercept $3$, so both pass through $(0,3)$.

EXAMPLE 4

Look at the graphs of

$$L_1:y=5,\qquad L_2:x=5.$$

The line $y=5$ is horizontal and has slope $0$.
The line $x=5$ is vertical and has undefined slope.

3. Parallel and Perpendicular Lines

Consider two lines

$$L_1:y=m_1x+c_1,\qquad L_2:y=m_2x+c_2.$$

  • Parallel lines:

    $$L_1\parallel L_2\iff m_1=m_2.$$

    Example:

    $$y=3x+5\qquad\text{and}\qquad y=3x+8$$

    are parallel.
  • Perpendicular lines:

    $$L_1\perp L_2\iff m_1m_2=-1.$$

    Equivalently,

    $$m_2=-\dfrac{1}{m_1},\qquad m_1\neq 0.$$

    Example:

    $$y=3x+5\qquad\text{and}\qquad y=-\dfrac{1}{3}x+8$$

    are perpendicular.

EXAMPLE 5

Compare the following pairs of lines.

  • (a)

    $$y=3x+5,\qquad y=3x+8.$$

    Both lines have slope $3$, so the lines are parallel.
  • (b)

    $$y=3x+5,\qquad y=-\dfrac{1}{3}x+8.$$

    The slopes are $3$ and $-\dfrac{1}{3}$, and

    $$3\left(-\dfrac{1}{3}\right)=-1.$$

    Therefore, the lines are perpendicular.

4. Alternative Formula: General Form

A straight line can also be written in the general coordinate form

$$Ax+By=C.$$

In this form, $A$, $B$, and $C$ are usually taken to be integers.

  • If $B\neq 0$, then we can solve for $y$ and obtain the usual form $y=mx+c$.
  • If $B=0$, then $Ax=C$, so

    $$x=\dfrac{C}{A}.$$

    This is a vertical line.
  • If $A=0$, then $By=C$, so

    $$y=\dfrac{C}{B}.$$

    This is a horizontal line.
Form Equation Main use
Slope-intercept form $y=mx+c$ Read the slope and $y$-intercept quickly.
General form $Ax+By=C$ Use integer coefficients and include vertical lines.
Point-slope form $y-y_0=m(x-x_0)$ Use when a point and slope are known.

EXAMPLE 6

Convert between general form and slope-intercept form.

  • (a) Express $2x+3y=5$ in the usual form $y=mx+c$.

    $$ 2x+3y=5 \implies 3y=-2x+5 \implies y=-\dfrac{2}{3}x+\dfrac{5}{3}. $$

  • (b) Express $y=-3x+7$ in general form.

    $$ y=-3x+7 \implies 3x+y=7. $$

  • (c) Express $y=\dfrac{1}{2}x+\dfrac{2}{3}$ in general form with integer coefficients.

    $$ y=\dfrac{1}{2}x+\dfrac{2}{3} \implies -\dfrac{1}{2}x+y=\dfrac{2}{3} \implies -3x+6y=4. $$

  • (d) Express $y=5$ and $x=5$ in general form.

    $$y=5\iff 0x+y=5,$$

    and

    $$x=5\iff x+0y=5.$$

5. Given a Point and a Slope

The line passing through a point $P(x_0,y_0)$ with slope $m$ is given by the point-slope formula:

$$y-y_0=m(x-x_0).$$

EXAMPLE 7

Find the equation of the line passing through $P(1,2)$ with slope $m=3$.

Using point-slope form:

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

Convert to slope-intercept form:

$$\begin{aligned} y-2&=3(x-1)\\ y-2&=3x-3\\ y&=3x-1. \end{aligned}$$

Convert to general form:

$$ y=3x-1 \implies 3x-y=1. $$

Equivalently,

$$3x-y-1=0.$$

6. Given Two Points

The line passing through two distinct points $P(x_1,y_1)$ and $Q(x_2,y_2)$ has slope

$$m=\dfrac{y_2-y_1}{x_2-x_1},\qquad x_1\neq x_2.$$

Its equation is then found using

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

Special cases:

  • If $x_1=x_2$, the line is vertical and has equation $x=x_1$.
  • If $y_1=y_2$, the line is horizontal and has equation $y=y_1$.

EXAMPLE 8

Find the line passing through $P(1,2)$ and $Q(4,7)$. Express your answer in the form $ax+by=c$, where $a,b,c\in\mathbb{Z}$.

First find the slope:

$$m=\dfrac{7-2}{4-1}=\dfrac{5}{3}.$$

Use point-slope form with $P(1,2)$:

$$y-2=\dfrac{5}{3}(x-1).$$

Convert to general form:

$$\begin{aligned} y-2&=\dfrac{5}{3}(x-1)\\ 3(y-2)&=5(x-1)\\ 3y-6&=5x-5\\ -5x+3y&=1. \end{aligned}$$

Therefore, the equation is

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

EXAMPLE 9 (Horizontal and Vertical Cases)

  • (a) Find the line passing through $A(3,5)$ and $B(3,-2)$.
    • The $x$-coordinates are equal: $x_1=x_2=3$.
    • The slope is undefined because

      $$\dfrac{-2-5}{3-3}=\dfrac{-7}{0}.$$

    • Therefore, the line is vertical:

      $$x=3.$$

  • (b) Find the line passing through $C(-4,6)$ and $D(8,6)$.
    • The $y$-coordinates are equal: $y_1=y_2=6$.
    • The slope is

      $$m=\dfrac{6-6}{8-(-4)}=\dfrac{0}{12}=0.$$

    • Therefore, the line is horizontal:

      $$y=6.$$

2.2 Quadratic Functions

1. The Simplest Quadratic: $y=x^2$

The graph of a quadratic function is a symmetric curve called a parabola. The simplest quadratic function is the parent graph for many quadratic transformations:

$$y=x^2.$$

$x$ $-3$ $-2$ $-1$ $0$ $1$ $2$ $3$
$y=x^2$ $9$ $4$ $1$ $0$ $1$ $4$ $9$
  • The domain of $y=x^2$ is $x\in\mathbb{R}$.
  • The range of $y=x^2$ is $y\geq 0$, or $[0,\infty)$.
  • The function $y=-x^2$ is the reflection of $y=x^2$ across the $x$-axis.
  • The range of $y=-x^2$ is $y\leq 0$, or $(-\infty,0]$.

2. The Quadratic Function $y=ax^2+bx+c$

A general quadratic function has the form where the coefficient $a$ controls the concavity and vertical stretch, while $b$ and $c$ affect the position of the parabola:

$$y=ax^2+bx+c,\qquad a\neq 0.$$

  1. Concavity:
    • If $a>0$, the graph is concave up.
    • If $a<0$, the graph is concave down.
  2. Discriminant: The discriminant determines how many real roots the quadratic has.

    $$\Delta = b^2-4ac$$

    • If $\Delta>0$, there are two distinct real roots.
    • If $\Delta=0$, there is one repeated real root.
    • If $\Delta<0$, there are no real roots.
  3. Roots / $x$-intercepts:

    $$x=\dfrac{-b\pm\sqrt{\Delta}}{2a},\qquad \Delta\geq 0.$$

  4. $y$-intercept: set $x=0$. Since

    $$y=a(0)^2+b(0)+c=c,$$

    the $y$-intercept is $(0,c)$.
  5. Axis of symmetry: This is also the $x$-coordinate of the vertex.

    $$x=-\dfrac{b}{2a}.$$

  6. Vertex from roots: if the roots are $r_1$ and $r_2$, then the axis of symmetry is

    $$x=\dfrac{r_1+r_2}{2}.$$

Key Features of a Parabola

Discriminant Cases

EXAMPLE 1

Analyze the quadratic function $$y=2x^2-12x+10.$$

Solution:

Since $a=2>0$, the graph is concave up. The discriminant is calculated as follows $$ \Delta = b^2-4ac = (-12)^2 - 4(2)(10) = 144 - 80 = 64. $$ Since $\Delta>0$, the graph has two distinct real roots, which are found by $$ x = \dfrac{-b\pm\sqrt{\Delta}}{2a} = \dfrac{12\pm\sqrt{64}}{4} = \dfrac{12\pm 8}{4} $$ Therefore, $$x = 1\qquad\text{or}\qquad x = 5$$ The $y$-intercept is found by setting $x=0$, giving $y=10$. Therefore, the $y$-intercept is $(0,10)$. The axis of symmetry is $$x=-\dfrac{b}{2a}=-\dfrac{-12}{2(2)}=3.$$ Substituting $x=3$ yields the vertex $$ y = 2(3)^2-12(3)+10 = 18-36+10 = -8. $$ Therefore, the vertex is $V(3,-8)$.

3. Quadratic Inequalities

Quadratic inequalities have one of the following forms. Once the roots are known, the graph shows where the quadratic is positive, negative, or zero.

  • $ax^2+bx+c>0$ or $ax^2+bx+c\geq 0$
  • $ax^2+bx+c<0$ or $ax^2+bx+c\leq 0$

For example, the inequality below has roots $1$ and $5$, and the parabola is concave up $$2x^2-12x+10>0,$$

  • The expression is positive for $x < 1$ or $x > 5$. Hence, $$x\in(-\infty,1)\cup(5,\infty).$$
  • The inequality $2x^2-12x+10\leq 0$ has the solution $$x\in[1,5].$$

NOTICE

If $ax^2+bx+c > 0$ for every $x\in\mathbb{R}$ or $ax^2+bx+c < 0$ for every $x\in\mathbb{R}$, then the graph does not intersect the $x$-axis. Therefore, the quadratic has no real roots, so

$$\Delta<0.$$

EXAMPLE 2

Let $f(x)=2x^2-4x+k$. Determine the values of $k$ for each condition.

Solution:

The discriminant is $$ \Delta = b^2 - 4ac = (-4)^2 - 4(2)(k) = 16-8k $$

  • (a) Exactly one root:

    $$\Delta=0\implies 16-8k=0\implies k=2.$$

  • (b) Exactly two roots:

    $$\Delta>0\implies 16-8k>0\implies k<2.$$

  • (c) No real roots:

    $$\Delta<0\implies 16-8k<0\implies k>2.$$

  • (d) Has real roots:

    $$\Delta\geq 0\implies k\leq 2.$$

  • (e) $f(x)>0$ for every $x\in\mathbb{R}$: Since $a=2>0$, the parabola opens upward. To stay strictly above the $x$-axis, it must have no real roots:

    $$\Delta<0\implies k>2.$$

  • (f) $f(x)\geq 0$ for every $x\in\mathbb{R}$: The parabola may touch the $x$-axis once or float above it:

    $$\Delta\leq 0\implies k\geq 2.$$

4. Forms of a Quadratic Function

  • Standard form:

    $$y=ax^2+bx+c.$$

  • Factorized form: where $r_1$ and $r_2$ are the roots.

    $$y=a(x-r_1)(x-r_2),$$

  • Vertex form: where $(h,k)$ is the vertex.

    $$y=a(x-h)^2+k,$$

EMPHASIS ON STRATEGY: If the roots are known, the $x$-coordinate of the vertex is the midpoint of the roots:

$$x=\dfrac{r_1+r_2}{2}.$$

This midpoint property also agrees with the formula

$$x=-\dfrac{b}{2a}.$$

NOTICE: Finding the Vertex

  • From $y=ax^2+bx+c$, use

    $$x=-\dfrac{b}{2a}.$$

  • From $y=a(x-r_1)(x-r_2)$, use

    $$x=\dfrac{r_1+r_2}{2}.$$

  • After finding the $x$-coordinate $h$, substitute $x=h$ into the function to find $k$.
  • Then write the quadratic as

    $$y=a(x-h)^2+k.$$

♦ JUSTIFICATION OF THE VERTEX FORM $y=a(x-h)^2+k$

  • (a) The point $(h,k)$ is the vertex.
    • If $a>0$, then $a(x-h)^2\geq 0$. Therefore, $a(x-h)^2+k\geq k$. Hence $y\geq k$, and the minimum value is $k$ at $x=h$.
    • If $a<0$, then $a(x-h)^2\leq 0$. Therefore, $a(x-h)^2+k\leq k$. Hence $y\leq k$, and the maximum value is $k$ at $x=h$.
  • (b) Any quadratic can be written in vertex form by completing the square. For example:

    $$\begin{aligned} y&=2x^2-12x+10\\ &=2(x^2-6x)+10\\ &=2(x^2-6x+9-9)+10\\ &=2(x-3)^2-18+10\\ &=2(x-3)^2-8. \end{aligned}$$

    This agrees with the vertex $(3,-8)$ found earlier.

EXAMPLE 3

Express the following function in factorized form and vertex form $$y=2x^2-12x+10$$

Solution:

From Example 1, the roots are $1$ and $5$. Therefore, the factorized form is $$y=2(x-1)(x-5).$$ The vertex $x$-coordinate is the midpoint of the roots: $x=\dfrac{1+5}{2}=3$. Substitute $x=3$ into the equation to get $y=2(3)^2-12(3)+10=-8$. Hence the vertex is $(3,-8)$. Therefore, the vertex form is $$y=2(x-3)^2-8.$$ Verification from factorized form: $$2(x-1)(x-5)=2(x^2-6x+5)=2x^2-12x+10$$ Verification from vertex form: $$ \begin{aligned} 2(x-3)^2-8 &= 2(x^2-6x+9)-8 = 2x^2-12x+18-8 \\ &=2x^2-12x+10. \end{aligned} $$

EXAMPLE 4

Let $y=-3x^2-15x+42$. Express it in factorized form and vertex form.

Solution:

Using the GDC or the quadratic formula, the roots are $x=-7$ and $x=2$. Therefore, the factorized form is $$y=-3(x+7)(x-2).$$ The vertex $x$-coordinate is $$x=\dfrac{-7+2}{2}=-\dfrac{5}{2}=-2.5.$$ Substitute $x=-2.5$ to get $y=-3(-2.5)^2-15(-2.5)+42=60.75$. Therefore, the vertex is $V(-2.5,60.75)$, and thus the vertex form is $$y=-3(x+2.5)^2+60.75.$$

EXAMPLE 5

Consider $f(x)=3x^2+12x$. Find the roots, vertex, and vertex form.

Solution:

Factorize: $f(x)=3x(x+4)$. Therefore, the roots are $x=0$ and $x=-4$. The vertex $x$-coordinate is the midpoint of the roots is equal to $$x=\dfrac{0+(-4)}{2}=-2$$ Substitute $x=-2$ to get $f(-2)=3(-2)^2+12(-2)=12-24=-12$. Therefore, the vertex is $V(-2,-12)$. Hence the vertex form is $$y=3(x+2)^2-12.$$

EXAMPLE 6 (Polynomial with Imaginary Roots)

Let $y=2x^2-8x+14$. Find the vertex and vertex form.

Solution:

First check the discriminant. $$ \Delta = (-8)^2-4(2)(14) = 64-112 = -48 $$ Since $\Delta<0$, the quadratic has no real roots. The vertex $x$-coordinate can still be found using: $$x=-\dfrac{b}{2a}=-\dfrac{-8}{2(2)}=\dfrac{8}{4}=2.$$ Substitute $x=2$ to get $y=2(2)^2-8(2)+14=8-16+14=6$. Therefore, the vertex is $V(2,6)$, and hence the vertex form is $$y=2(x-2)^2+6.$$ The complex roots are $$x=2\pm i\sqrt{3}.$$ Their midpoint is still $$\dfrac{(2+i\sqrt{3})+(2-i\sqrt{3})}{2}=2,$$ which agrees with the vertex $x$-coordinate.

5. Vieta Formulas

Given the quadratic function below with roots $r_1$ and $r_2$, Vieta's formulas state:

$$y=ax^2+bx+c,$$

  • Sum of roots:

    $$S=r_1+r_2=-\dfrac{b}{a}.$$

  • Product of roots:

    $$P=r_1r_2=\dfrac{c}{a}.$$

Conversely, if a monic quadratic has sum of roots $S$ and product of roots $P$, then

$$x^2-Sx+P=0.$$

EXAMPLE 7

For $y=2x^2-12x+10$, the roots are $1$ and $5$. Verify Vieta's formulas.

Solution:

The sum of the roots is $1+5=6$. Vieta's formula gives $$-\dfrac{b}{a}=-\dfrac{-12}{2}=6.$$ The product of the roots is $1\cdot 5=5$. Vieta's formula gives $$\dfrac{c}{a}=\dfrac{10}{2}=5.$$ Therefore, the monic quadratic with roots $1$ and $5$ is $$x^2-6x+5=0.$$ Multiplying by $2$ gives $$2x^2-12x+10=0.$$