Equation of a Line – Questions with Detailed Solutions

This page reviews the main ideas behind the slope of a line and the different forms of linear equations. After a concise summary of the theory, you will find carefully selected practice questions with complete, step-by-step solutions.

Slopes and Equations of Lines

Slope of a Line

If a line passes through two distinct points \( P_1(x_1, y_1) \) and \( P_2(x_2, y_2) \), its slope is defined by

\[ m = \frac{y_2 - y_1}{x_2 - x_1}, \qquad x_2 \neq x_1. \]

General Equation of a Line

The general (or standard) form of the equation of a straight line is

\[ Ax + By = C, \]

where \(A\), \(B\), and \(C\) are constants, and \(A\) and \(B\) are not both zero. Every straight line in the Cartesian plane can be represented in this form.

Slope–Intercept Form

If the slope \(m\) of a line is known, its equation can be written as

\[ y = mx + b, \]

where \(m\) is the slope and \(b\) is the \(y\)-intercept. This is called the slope–intercept form.

Point–Slope Form

An equation of a line with slope \(m\) passing through the point \(P(x_1, y_1)\) is

\[ y - y_1 = m(x - x_1). \]

Vertical and Horizontal Lines

If \(A = 0\) in the general equation \(Ax + By = C\), we obtain

\[ By = C \quad \Rightarrow \quad y = \frac{C}{B} = k, \]

which represents a horizontal line with slope \(0\).

If \(B = 0\), then

\[ Ax = C \quad \Rightarrow \quad x = \frac{C}{A} = h, \]

which represents a vertical line with undefined slope.

Parallel and Perpendicular Lines

Two non-vertical lines are parallel if and only if their slopes are equal.

Two non-vertical lines are perpendicular if and only if their slopes \(m_1\) and \(m_2\) satisfy

\[ m_1 m_2 = -1. \]

Questions with Solutions

Question 1

Find the slope of the line passing through the given points:

  1. \((2, 3)\) and \((0, -1)\)
  2. \((-2, 4)\) and \((-2, 6)\)
  3. \((5, 2)\) and \((-7, 2)\)

Solution

  1. \[ m = \frac{-1 - 3}{0 - 2} = 2. \]
  2. \[ m = \frac{6 - 4}{-2 + 2}, \] which is undefined. The line is vertical.
  3. \[ m = \frac{2 - 2}{-7 - 5} = 0, \] so the line is horizontal.

Question 2

Find the equation of the line that passes through \((-2, 5)\) and has slope \(-4\).

Solution

Using the point–slope form,

\[ y - 5 = -4(x + 2). \]

\[ y = -4x - 3. \]

Question 3

Find the equation of the line passing through \((0, -1)\) and \((3, 5)\).

Solution

First compute the slope:

\[ m = \frac{5 - (-1)}{3 - 0} = 2. \]

Using the point–slope form with \((0, -1)\):

\[ y + 1 = 2x \quad \Rightarrow \quad y = 2x - 1. \]

Question 4

Find the slope of the line given by

\[ -2x + 4y = 6. \]

Solution

Rewrite in slope–intercept form:

\[ 4y = 2x + 6 \quad \Rightarrow \quad y = \tfrac{1}{2}x + \tfrac{3}{2}. \]

The slope is \(\tfrac{1}{2}\).

More References and Interactive Tools