2.1 Lines (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 Gradient or Slope ($m$) of the line segment AB is given by:
This indicates the inclination of the line segment AB. Moving along the positive direction of the x-axis:
- If the line segment is increasing, then $m > 0$.
- If the line segment is decreasing, then $m < 0$.
- If the line segment is horizontal, then $m = 0$.
- If the line segment is vertical, then $m$ is undefined.
Note: The slope is also equal to $\tan\theta$, where $\theta$ is the angle between the line and the x-axis.
$d_{AB} = \sqrt{(\Delta x)^2 + (\Delta y)^2} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
$x = \frac{x_1 + x_2}{2}, \quad y = \frac{y_1 + y_2}{2}$
EXAMPLE 1
Slope: $m = \frac{12 - 4}{7 - 1} = \frac{4}{3}$
Distance: $d = \sqrt{(7 - 1)^2 + (12 - 4)^2} = 10$
Midpoint: $M\left(\frac{1+7}{2}, \frac{4+12}{2}\right) \Rightarrow M(4,8)$
Since y-coordinates are equal, the formula is unnecessary.
Slope: $m = 0$ (horizontal). Distance: $d = 5 - 1 = 4$. Midpoint: $M(3,8)$.
Since x-coordinates are equal.
Slope: undefined (vertical). Distance: $d = 7 - 5 = 2$. Midpoint: $M(1,6)$.
2. The Equation of a Line
The standard equation of a straight line is represented as $y = mx + c$, where $m$ is the gradient (slope) and $c$ is the y-intercept.
- A horizontal line has the equation $y = c$ (slope $m = 0$).
- A vertical line has the equation $x = c$ (slope is undefined). A vertical line is not a function.
EXAMPLE 2 & 3 (Linear Graphs)
$L_1: y = 2x$ (increases 2 units in $y$ for every 1 unit in $x$, slope is 2)
$L_2: y = -2x$ (decreases 2 units in $y$ for every 1 unit in $x$, slope is -2)
$L_1: y = 2x + 3$ (slope is 2, intercepts y-axis at 3)
$L_2: y = -2x + 3$ (slope is -2, intercepts y-axis at 3)
3. Parallel and Perpendicular Lines
Consider two lines: $L_1: y = m_1x + c_1$ and $L_2: y = m_2x + c_2$.
Example: $y = 3x + 5$ and $y = 3x + 8$ are parallel.
Example: $y = 3x + 5$ and $y = -\frac{1}{3}x + 8$ are perpendicular.
4. Alternative Formula: $Ax + By = C$
If $B \ne 0$, solving for $y$ yields the $y = mx + c$ form. If $B = 0$, it yields a vertical line $x = c$. If $A = 0$, it yields a horizontal line $y = c$. Coefficients A, B, and C are conventionally expressed as integers.
EXAMPLE 5
(a) $y = -3x + 7 \Rightarrow 3x + y = 7$.
(b) $y = \frac{1}{2}x + \frac{2}{3} \Rightarrow -\frac{1}{2}x + y = \frac{2}{3} \Rightarrow -3x + 6y = 4$.
5. Given: A Point and a Slope
The equation of a line passing through point $P(x_0, y_0)$ with slope $m$ is given by:
EXAMPLE 6 & 7
$y - 2 = 3(x - 1) \Rightarrow y = 3x - 1$.
In general form: $3x - y = 1$.
Slope: $m = \frac{7 - 2}{4 - 1} = \frac{5}{3}$.
Equation: $y - 2 = \frac{5}{3}(x - 1) \Rightarrow 3y - 6 = 5(x - 1) \Rightarrow -5x + 3y = 1$.