Straight Lines: Slope and Angle Between Lines
Slope of a Straight Line: Definition and Calculation (from two points, from equation)
Definition
The slope (also known as the gradient) of a straight line is a fundamental concept in coordinate geometry that quantifies two main characteristics of the line: its direction and its steepness. It measures how much the line rises or falls vertically for every unit it moves horizontally. This is often described as the ratio of "rise" over "run".
The slope is conventionally denoted by the letter $m$.
Geometrically, the slope is closely related to the angle of inclination of the line. The angle of inclination, typically denoted by $\theta$ (theta), is the angle measured from the positive direction of the x-axis counterclockwise to the line. This angle is usually considered within the range $0^\circ \le \theta < 180^\circ$.

The slope $m$ of a non-vertical line is formally defined as the tangent of its angle of inclination $\theta$:
$\mathbf{m = \tan \theta}$
This definition holds for all angles $\theta$ in the range $0^\circ \le \theta < 180^\circ$, except for $\theta = 90^\circ$, where $\tan 90^\circ$ is undefined.
Types of Slopes based on Angle of Inclination:
- If $0^\circ < \theta < 90^\circ$: The line rises from left to right. The slope $m = \tan \theta$ is positive ($m > 0$).
- If $90^\circ < \theta < 180^\circ$: The line falls from left to right. The slope $m = \tan \theta$ is negative ($m < 0$).
- If $\theta = 0^\circ$: The line is parallel to the x-axis (horizontal). The slope $m = \tan 0^\circ = 0$ (zero slope).
- If $\theta = 90^\circ$: The line is parallel to the y-axis (vertical). The slope $m = \tan 90^\circ$ is undefined.
Calculation of Slope
The slope of a straight line can be calculated in different ways depending on the information provided.
1. Calculating Slope from Two Points
If a non-vertical line passes through two distinct points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, its slope $m$ can be calculated using the change in the y-coordinates divided by the change in the x-coordinates between the two points. This ratio is often called the "rise over run". The formula is valid provided $x_1 \neq x_2$ (i.e., the line is not vertical).

Consider the right-angled triangle formed by points $P_1(x_1, y_1)$, $P_2(x_2, y_2)$, and the point with coordinates $(x_2, y_1)$. The vertical side of this triangle has length $|y_2 - y_1|$ (the rise), and the horizontal side has length $|x_2 - x_1|$ (the run). The angle at $P_1$ within this triangle corresponding to the direction of the line with respect to the horizontal is equal to the angle of inclination $\theta$ (or $180^\circ - \theta$ in some cases, but the tangent value will align due to signs).
The change in y-coordinate (rise) is $\Delta y = y_2 - y_1$.
The change in x-coordinate (run) is $\Delta x = x_2 - x_1$.
From the definition $m = \tan \theta$, and in the right triangle, $\tan \theta = \frac{\text{Opposite side}}{\text{Adjacent side}} = \frac{\Delta y}{\Delta x}$ (considering directed distances, the signs of $\Delta y$ and $\Delta x$ correctly give the sign of the slope), we get the formula:
$\mathbf{m = \frac{y_2 - y_1}{x_2 - x_1}}$
This formula is valid as long as $x_1 \neq x_2$. If $x_1 = x_2$, the line is vertical, and its slope is undefined. The order of the points does not affect the result because $\frac{y_2 - y_1}{x_2 - x_1} = \frac{-(y_1 - y_2)}{-(x_1 - x_2)} = \frac{y_1 - y_2}{x_1 - x_2}$.
Example 1. Find the slope of the line passing through the points (2, -1) and (5, 3).
Answer:
Let the first point be $(x_1, y_1) = (2, -1)$ and the second point be $(x_2, y_2) = (5, 3)$.
Using the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$:
$m = \frac{3 - (-1)}{5 - 2}$
... (i)
Simplify the numerator and the denominator in equation (i):
$m = \frac{3 + 1}{3} = \frac{4}{3}$
$m = \frac{4}{3}$
... (ii)
The slope of the line passing through the points (2, -1) and (5, 3) is $\mathbf{\frac{4}{3}}$.
2. Calculating Slope from the Equation of the Line
The equation of a straight line implicitly contains information about its slope. Depending on the form in which the equation is given, the slope can be identified directly or derived through simple rearrangement.
-
Slope-Intercept Form: $\mathbf{y = mx + c}$
This is one of the most convenient forms for identifying the slope. In this equation, $m$ represents the slope of the line, and $c$ represents the y-intercept (the y-coordinate where the line crosses the y-axis). The coefficient of $x$ when $y$ is isolated is the slope.
Example: For the line $y = -2x + 5$, the slope is $m = -2$. For the line $y = \frac{1}{2}x - 3$, the slope is $m = \frac{1}{2}$.
-
General Form: $\mathbf{Ax + By + C = 0}$ (where A and B are not both zero)
Any straight line can be represented by this linear equation. If $B \neq 0$, we can rearrange this equation to the slope-intercept form ($y = mx + c$) to find the slope:
$By = -Ax - C$
Divide by B (since $B \neq 0$):
$y = -\frac{A}{B}x - \frac{C}{B}$
Comparing this with $y = mx + c$, we see that the slope is:
$\mathbf{m = -\frac{A}{B}}$
This formula applies when $B \neq 0$. If $B = 0$, the equation becomes $Ax + C = 0$. If $A \neq 0$, this simplifies to $x = -C/A$, which is the equation of a vertical line. As discussed earlier, vertical lines have an undefined slope.
Example: For the line $3x + 4y - 12 = 0$, $A=3, B=4$. The slope is $m = -\frac{3}{4}$. For the line $5x - 2y + 1 = 0$, $A=5, B=-2$. The slope is $m = -\frac{5}{-2} = \frac{5}{2}$. For the line $7x - 9 = 0$, $A=7, B=0$. The slope is undefined.
-
Point-Slope Form: $\mathbf{y - y_1 = m(x - x_1)}$
This form is used when the slope $m$ and the coordinates of a point $(x_1, y_1)$ on the line are known. In this form, the slope $m$ is explicitly given as the coefficient of $(x - x_1)$.
Example: For the line $y - 5 = 7(x - 2)$, the slope is $m = 7$. For the line $y + 1 = -\frac{1}{3}(x + 4)$, which can be written as $y - (-1) = -\frac{1}{3}(x - (-4))$, the slope is $m = -\frac{1}{3}$.
-
Intercept Form: $\mathbf{\frac{x}{a} + \frac{y}{b} = 1}$ (where $a$ and $b$ are non-zero)
This form represents a line that intersects the x-axis at $(a, 0)$ (x-intercept is $a$) and the y-axis at $(0, b)$ (y-intercept is $b$). To find the slope, we can convert it to the slope-intercept form:
$\frac{y}{b} = 1 - \frac{x}{a}$
$y = b \left(1 - \frac{x}{a}\right) = b - \frac{b}{a}x$
$y = -\frac{b}{a}x + b$
Comparing with $y = mx + c$, the slope is:
$\mathbf{m = -\frac{b}{a}}$
Example: For the line $\frac{x}{3} + \frac{y}{-2} = 1$, $a=3$ and $b=-2$. The slope is $m = -\frac{-2}{3} = \frac{2}{3}$. For the line $\frac{x}{5} + \frac{y}{10} = 1$, $a=5$ and $b=10$. The slope is $m = -\frac{10}{5} = -2$.
Slope Calculation Summary (For Competitive Exams)
Definition:
Measure of steepness and direction; $m = \tan \theta$, where $\theta$ is the angle of inclination ($0^\circ \le \theta < 180^\circ$).
Calculation Methods:
- From Two Points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$ (non-vertical line):
$m = \frac{y_2 - y_1}{x_2 - x_1}$
- From Equation of the Line:
- $y = mx + c \implies \mathbf{m}$ is the coefficient of $x$.
- $Ax + By + C = 0 \implies \mathbf{m = -\frac{A}{B}}$ (if $B \neq 0$). If $B=0$, slope is undefined (vertical line).
- $y - y_1 = m(x - x_1) \implies \mathbf{m}$ is explicitly given.
- $\frac{x}{a} + \frac{y}{b} = 1 \implies \mathbf{m = -\frac{b}{a}}$ (if $a, b \neq 0$).
Key Points:
- Positive slope: Rises left to right ($0^\circ < \theta < 90^\circ$).
- Negative slope: Falls left to right ($90^\circ < \theta < 180^\circ$).
- Zero slope: Horizontal line ($\theta = 0^\circ$).
- Undefined slope: Vertical line ($\theta = 90^\circ$).
Slope of Lines Parallel and Perpendicular to Axes
Understanding the slopes of lines that are parallel to the coordinate axes is crucial as they represent special cases in the definition of slope. These lines have constant x or y coordinates and play a significant role in many geometric problems.
Line Parallel to the X-axis (Horizontal Line)
A straight line that is parallel to the x-axis is called a horizontal line. For any point lying on such a line, the y-coordinate is always the same constant value. The general equation of a horizontal line is of the form $\mathbf{y = k}$, where $k$ is a constant.
Let's determine the slope of a horizontal line using the definition involving the angle of inclination and also using the formula from two points.
Using the Angle of Inclination:
A horizontal line lies flat relative to the x-axis. The angle measured counterclockwise from the positive direction of the x-axis to a horizontal line is $0^\circ$.

The angle of inclination for a horizontal line is $\theta = 0^\circ$.
The slope $m$ is defined as $m = \tan \theta$.
$m = \tan 0^\circ$
... (i)
Since $\tan 0^\circ = 0$, from equation (i):
$m = 0$
... (ii)
Therefore, the slope of any horizontal line is $\textbf{zero}$.
Using the Two-Point Formula:
Consider any two distinct points on a horizontal line $y = k$. Let these points be $P_1(x_1, k)$ and $P_2(x_2, k)$, where $x_1 \neq x_2$.
Using the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$:
$m = \frac{k - k}{x_2 - x_1}$
... (iii)
Simplify equation (iii):
$m = \frac{0}{x_2 - x_1}$
... (iv)
Since $x_1 \neq x_2$, the denominator $x_2 - x_1$ is non-zero. Therefore, from equation (iv):
$m = 0$
... (v)
Both methods confirm that the slope of a horizontal line is 0.
Example 1. Find the slope of the line passing through the points A(2, 5) and B(-3, 5).
Answer:
Let $(x_1, y_1) = (2, 5)$ and $(x_2, y_2) = (-3, 5)$.
Using the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$:
$m = \frac{5 - 5}{-3 - 2}$
... (i)
Simplify equation (i):
$m = \frac{0}{-5}$
$m = 0$
... (ii)
The slope of the line is $\mathbf{0}$. Notice that both points have the same y-coordinate (5), confirming it's a horizontal line $y=5$.
Line Perpendicular to the X-axis (Parallel to the Y-axis / Vertical Line)
A straight line that is perpendicular to the x-axis is parallel to the y-axis and is called a vertical line. For any point lying on such a line, the x-coordinate is always the same constant value. The general equation of a vertical line is of the form $\mathbf{x = h}$, where $h$ is a constant.
Let's determine the slope of a vertical line.
Using the Angle of Inclination:
A vertical line is perpendicular to the horizontal x-axis. The angle measured counterclockwise from the positive direction of the x-axis to a vertical line is $90^\circ$.

The angle of inclination for a vertical line is $\theta = 90^\circ$.
The slope $m$ is defined as $m = \tan \theta$.
$m = \tan 90^\circ$
... (vi)
The tangent of $90^\circ$ is undefined.
Therefore, the slope of any vertical line is undefined.
Using the Two-Point Formula:
Consider any two distinct points on a vertical line $x = h$. Let these points be $P_1(h, y_1)$ and $P_2(h, y_2)$, where $y_1 \neq y_2$.
Using the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$:
$m = \frac{y_2 - y_1}{h - h}$
... (vii)
Simplify equation (vii):
$m = \frac{y_2 - y_1}{0}$
... (viii)
Since $y_1 \neq y_2$, the numerator $y_2 - y_1$ is non-zero. Division by zero is undefined. Therefore, from equation (viii):
$m = \text{Undefined}$
... (ix)
Both methods demonstrate that the slope of a vertical line is undefined.
Example 2. Find the slope of the line passing through the points C(1, 2) and D(1, 7).
Answer:
Let $(x_1, y_1) = (1, 2)$ and $(x_2, y_2) = (1, 7)$.
Using the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$:
$m = \frac{7 - 2}{1 - 1}$
... (i)
Simplify equation (i):
$m = \frac{5}{0}$
$m = \text{Undefined}$
... (ii)
The slope of the line is $\textbf{undefined}$. Notice that both points have the same x-coordinate (1), confirming it's a vertical line $x=1$.
Summary Table: Slopes of Lines Parallel/Perpendicular to Axes
Line Orientation | Relation to Axes | Equation Form | Angle of Inclination ($\theta$) | Slope ($m = \tan \theta$) |
---|---|---|---|---|
Horizontal | Parallel to x-axis Perpendicular to y-axis |
$y = k$ (constant) | $0^\circ$ | $0$ |
Vertical | Parallel to y-axis Perpendicular to x-axis |
$x = h$ (constant) | $90^\circ$ | Undefined |
Slopes of Axes-Parallel Lines (Summary for Competitive Exams)
Horizontal Lines ($y=k$):
- Parallel to x-axis.
- Angle of inclination: $0^\circ$.
- Slope: $\mathbf{m = 0}$.
Vertical Lines ($x=h$):
- Parallel to y-axis (Perpendicular to x-axis).
- Angle of inclination: $90^\circ$.
- Slope: $\mathbf{m = \text{Undefined}}$.
Key Distinction:
Zero slope and Undefined slope are distinct concepts. Zero slope means the line is flat horizontally. Undefined slope means the line is perfectly upright vertically.
Angle Between Two Lines in terms of their Slopes
When two non-parallel straight lines intersect in a plane, they form two pairs of vertically opposite angles. The two angles in each pair are equal, and adjacent angles are supplementary (sum up to $180^\circ$). We are typically interested in finding the measure of the angle between the two lines. This angle can be expressed in terms of the slopes of the lines.
Let $L_1$ and $L_2$ be two non-vertical straight lines in the xy-plane. Let their angles of inclination with the positive x-axis be $\theta_1$ and $\theta_2$, respectively. The slopes of the lines are given by $m_1 = \tan \theta_1$ and $m_2 = \tan \theta_2$. We assume neither line is vertical, so $m_1$ and $m_2$ are defined real numbers, and $\theta_1, \theta_2 \neq 90^\circ$.

Let $\phi$ be one of the angles formed between the lines $L_1$ and $L_2$. From the geometry of intersecting lines and their angles of inclination, the angle $\phi$ (or its supplement $180^\circ - \phi$) is equal to the absolute difference between the angles of inclination, i.e., $|\theta_2 - \theta_1|$. Specifically, if $\theta_2 > \theta_1$, one angle formed by $L_1$ and $L_2$ is $\theta_2 - \theta_1$, and the other is $180^\circ - (\theta_2 - \theta_1)$.
We can find the tangent of the angle between the lines using the tangent subtraction formula from trigonometry:
$\tan(\theta_2 - \theta_1) = \frac{\tan \theta_2 - \tan \theta_1}{1 + \tan \theta_1 \tan \theta_2}$
Substitute $m_1 = \tan \theta_1$ and $m_2 = \tan \theta_2$ into this formula:
$\tan(\theta_2 - \theta_1) = \frac{m_2 - m_1}{1 + m_1 m_2}$
... (i)
The value $\frac{m_2 - m_1}{1 + m_1 m_2}$ represents the tangent of one of the angles between the lines. To find the tangent of the acute angle $\phi$ between the lines, we take the absolute value of this expression, because the tangent of an acute angle ($0^\circ < \phi < 90^\circ$) is positive, while the tangent of an obtuse angle ($90^\circ < \phi < 180^\circ$) is negative. $\tan \phi = |\tan(\theta_2 - \theta_1)|$.
Formula for the Angle Between Two Lines
The tangent of the acute angle $\phi$ between two non-vertical lines with slopes $m_1$ and $m_2$ is given by:
$\mathbf{\tan \phi = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|}$
This formula is valid as long as $1 + m_1 m_2 \neq 0$. If $1 + m_1 m_2 = 0$, it means $m_1 m_2 = -1$. This condition indicates that the product of the slopes is -1, which is the condition for the two lines to be perpendicular (as discussed in the next subheading). In this case, the angle between the lines is $90^\circ$, and $\tan 90^\circ$ is undefined, which is consistent with the denominator being zero.
Note that $\left| \frac{m_2 - m_1}{1 + m_1 m_2} \right| = \left| \frac{-(m_1 - m_2)}{1 + m_1 m_2} \right| = \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right|$, so the order of $m_1$ and $m_2$ in the numerator difference does not affect the final result for $\tan \phi$ due to the absolute value.
Case when one line is Vertical:
If one of the lines, say $L_1$, is vertical ($\theta_1 = 90^\circ$, $m_1$ is undefined) and the other line $L_2$ is not vertical ($m_2 = \tan \theta_2$), the formula $\tan \phi = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|$ cannot be directly applied because $m_1$ is undefined.
In this case, the angle between the lines is $\phi = |90^\circ - \theta_2|$. The tangent of this angle is:
$\tan \phi = |\tan(90^\circ - \theta_2)|$
Using the trigonometric identity $\tan(90^\circ - \theta) = \cot \theta = \frac{1}{\tan \theta}$, we get:
$\tan \phi = |\cot \theta_2| = \left|\frac{1}{\tan \theta_2}\right| = \left|\frac{1}{m_2}\right|$
... (ii)
So, if one line is vertical and the other has slope $m_2$, the tangent of the acute angle between them is $\frac{1}{|m_2|}$.
Example 1. Find the acute angle between the lines $x - 2y + 1 = 0$ and $3x - y - 2 = 0$.
Answer:
First, we find the slopes of the two given lines.
Line 1: $x - 2y + 1 = 0$. This is in the general form $Ax + By + C = 0$, where $A_1 = 1$, $B_1 = -2$, $C_1 = 1$.
The slope $m_1 = -\frac{A_1}{B_1} = -\frac{1}{-2} = \frac{1}{2}$.
$m_1 = \frac{1}{2}$
... (i)
Line 2: $3x - y - 2 = 0$. This is in the general form $Ax + By + C = 0$, where $A_2 = 3$, $B_2 = -1$, $C_2 = -2$.
The slope $m_2 = -\frac{A_2}{B_2} = -\frac{3}{-1} = 3$.
$m_2 = 3$
... (ii)
Let $\phi$ be the acute angle between the two lines. We use the formula $\tan \phi = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|$.
Substitute the slopes from (i) and (ii) into the formula:
$\tan \phi = \left| \frac{3 - \frac{1}{2}}{1 + (\frac{1}{2})(3)} \right|$
... (iii)
Simplify the numerator and the denominator in equation (iii):
Numerator: $3 - \frac{1}{2} = \frac{6}{2} - \frac{1}{2} = \frac{6 - 1}{2} = \frac{5}{2}$.
Denominator: $1 + (\frac{1}{2})(3) = 1 + \frac{3}{2} = \frac{2}{2} + \frac{3}{2} = \frac{2 + 3}{2} = \frac{5}{2}$.
Substitute these back into the expression for $\tan \phi$:
$\tan \phi = \left| \frac{\frac{5}{2}}{\frac{5}{2}} \right|$
... (iv)
Simplify equation (iv):
$\tan \phi = |1| = 1$
... (v)
Since $\tan \phi = 1$, and we are looking for the acute angle, the angle $\phi$ whose tangent is 1 is $45^\circ$.
The acute angle between the lines $x - 2y + 1 = 0$ and $3x - y - 2 = 0$ is $\mathbf{45^\circ}$ or $\mathbf{\frac{\pi}{4} \text{ radians}}$.
Angle Between Lines (Summary for Competitive Exams)
Formula:
For two non-vertical lines with slopes $m_1$ and $m_2$, the tangent of the acute angle $\phi$ between them is:
$\mathbf{\tan \phi = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|}$
Special Cases:
- Perpendicular Lines: If $1 + m_1 m_2 = 0 \implies m_1 m_2 = -1$. The angle is $90^\circ$.
- Parallel Lines: If $m_1 = m_2$. The angle is $0^\circ$ or $180^\circ$, and $\tan \phi = 0$.
- One Vertical Line ($m_1$ undefined) and one Non-vertical Line (slope $m_2$):
$\tan \phi = \left|\frac{1}{m_2}\right|$
Key Point:
The absolute value $\left| \dots \right|$ is used to find the tangent of the acute angle. Without the absolute value, the formula $\frac{m_2 - m_1}{1 + m_1 m_2}$ gives the tangent of the angle $(\theta_2 - \theta_1)$, which could be acute or obtuse.
Conditions for Parallelism and Perpendicularity of Lines
The relationship between the slopes of two lines and the angle between them, as described by the formula $\tan \phi = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|$, provides a straightforward way to determine when two lines are parallel or perpendicular based solely on their slopes.
Condition for Parallelism
Two distinct non-vertical straight lines, say $L_1$ and $L_2$, are considered parallel if they have the same direction. Geometrically, parallel lines in a plane never intersect. This implies that the angle between them is $0^\circ$.
Using the formula for the angle between two lines, if $L_1 \parallel L_2$, then the acute angle $\phi$ between them is $0^\circ$.
$\tan \phi = \tan 0^\circ = 0$
Substitute this into the angle formula:
$\left| \frac{m_2 - m_1}{1 + m_1 m_2} \right| = 0$
($\tan \phi = 0$)
For an absolute value to be zero, the expression inside must be zero. Therefore:
$m_2 - m_1 = 0$
... (i)
From equation (i), we get:
$\mathbf{m_1 = m_2}$
(Condition for Parallelism)
Conclusion: Two non-vertical lines are parallel if and only if they have the same slope.
Special Case - Vertical Lines:
If two lines are vertical, their equations are of the form $x = h_1$ and $x = h_2$. Vertical lines have undefined slopes. While the condition $m_1 = m_2$ does not apply directly using numerical values for slopes, two vertical lines are indeed parallel to each other if $h_1 \neq h_2$. Their angle of inclination is $90^\circ$, which is the same for both, geometrically indicating parallelism.
Condition for Perpendicularity
Two non-vertical lines $L_1$ and $L_2$ are considered perpendicular (or orthogonal) if they intersect at a right angle ($90^\circ$).
Using the formula for the angle between two lines, if $L_1 \perp L_2$, then the angle $\phi$ between them is $90^\circ$.
$\tan \phi = \tan 90^\circ$, which is undefined.
The expression $\left| \frac{m_1 - m_2}{1 + m_1 m_2} \right|$ becomes undefined if and only if its denominator is zero (assuming the numerator is non-zero, which it is unless $m_1=m_2$, which would imply parallel lines). Therefore:
$1 + m_1 m_2 = 0$
... (ii)
From equation (ii), we get:
$\mathbf{m_1 m_2 = -1}$
(Condition for Perpendicularity)
Conclusion: Two non-vertical lines are perpendicular if and only if the product of their slopes is -1. This is equivalent to saying that the slope of one line is the negative reciprocal of the slope of the other line ($m_2 = -\frac{1}{m_1}$, provided $m_1 \neq 0$).
Special Case - Horizontal and Vertical Lines:
Consider a horizontal line $L_1$ with slope $m_1 = 0$ (equation $y=k$) and a vertical line $L_2$ with undefined slope (equation $x=h$). These lines are geometrically perpendicular. If we formally apply the product condition $m_1 m_2 = -1$, we have $0 \times (\text{undefined})$. While this expression is indeterminate, the geometric fact remains that a horizontal line and a vertical line are perpendicular. The condition $m_1 m_2 = -1$ holds for all pairs of perpendicular lines except when one is vertical (and the other is horizontal, having slope 0).
Summary Table: Conditions for Parallelism and Perpendicularity
Relationship Between Lines ($L_1, L_2$) | Condition on Slopes ($m_1, m_2$) | Notes on Vertical Lines |
---|---|---|
Parallel ($L_1 \parallel L_2$) | $m_1 = m_2$ | This holds for non-vertical lines. Two vertical lines are also parallel (both slopes undefined). |
Perpendicular ($L_1 \perp L_2$) | $m_1 m_2 = -1$ | This holds if neither line is vertical or horizontal. If one line is horizontal ($m=0$), the other must be vertical (slope undefined) to be perpendicular. |
Example 1. Show that the line passing through (2, 3) and (4, 7) is perpendicular to the line passing through (5, 1) and (9, -1).
Answer:
Let $L_1$ be the line passing through point A(2, 3) and point B(4, 7).
We calculate the slope of $L_1$ using the two-point formula $m = \frac{y_2 - y_1}{x_2 - x_1}$.
$m_1 = \frac{7 - 3}{4 - 2} = \frac{4}{2}$
... (i)
$m_1 = 2$
... (ii)
Let $L_2$ be the line passing through point C(5, 1) and point D(9, -1).
We calculate the slope of $L_2$ using the two-point formula.
$m_2 = \frac{-1 - 1}{9 - 5} = \frac{-2}{4}$
... (iii)
$m_2 = -\frac{1}{2}$
... (iv)
Now, we check the condition for perpendicularity of two lines: $m_1 m_2 = -1$.
Multiply the slopes from (ii) and (iv):
Product of slopes $= m_1 \times m_2 = (2) \times \left(-\frac{1}{2}\right)$
... (v)
Simplify equation (v):
Product of slopes $= -1$
... (vi)
Since the product of the slopes of the two lines is -1 (from equation (vi)), the lines are perpendicular to each other.
Example 2. Find the value of $k$ such that the line $3x - ky + 8 = 0$ is parallel to the line $x + 2y - 1 = 0$.
Answer:
For two lines to be parallel, their slopes must be equal.
First, find the slope of the first line, $L_1: 3x - ky + 8 = 0$. This is in the general form $Ax + By + C = 0$, where $A_1 = 3$, $B_1 = -k$, $C_1 = 8$.
The slope is $m_1 = -\frac{A_1}{B_1} = -\frac{3}{-k}$. Assuming $k \neq 0$, we get:
$m_1 = \frac{3}{k}$
... (i)
Next, find the slope of the second line, $L_2: x + 2y - 1 = 0$. This is in the general form $Ax + By + C = 0$, where $A_2 = 1$, $B_2 = 2$, $C_2 = -1$.
The slope is $m_2 = -\frac{A_2}{B_2} = -\frac{1}{2}$.
$m_2 = -\frac{1}{2}$
... (ii)
For the lines $L_1$ and $L_2$ to be parallel, their slopes must be equal, i.e., $m_1 = m_2$.
$\frac{3}{k} = -\frac{1}{2}$
($m_1 = m_2$)
Cross-multiply to solve for $k$:
$3 \times 2 = -1 \times k$
$6 = -k$
$k = -6$
... (iii)
We assumed $k \neq 0$ when finding $m_1$. Our result $k=-6$ is non-zero, so the assumption is valid. If $k$ were 0, the first line would be $3x+8=0$, which is a vertical line with undefined slope. The second line has slope $-1/2$. A vertical line cannot be parallel to a line with slope $-1/2$. Thus, $k=0$ is not a solution.
Therefore, the value of $k$ for which the line $3x - ky + 8 = 0$ is parallel to the line $x + 2y - 1 = 0$ is $\mathbf{-6}$.
Conditions for Parallelism and Perpendicularity (Summary)
Parallel Lines:
Two distinct non-vertical lines with slopes $m_1$ and $m_2$ are parallel $\iff \mathbf{m_1 = m_2}$.
Two distinct vertical lines are parallel.
Perpendicular Lines:
Two non-vertical lines with slopes $m_1$ and $m_2$ are perpendicular $\iff \mathbf{m_1 m_2 = -1}$.
A horizontal line is perpendicular to a vertical line.
Key Idea:
Parallel lines have the same steepness and direction. Perpendicular lines have slopes that are negative reciprocals of each other (except for horizontal/vertical cases).