Equations of a Straight Line

Learn the different forms of the equation of a straight line and understand how to find each form step by step.

Equations of a Straight Line

An equation of a straight line represents the relationship between the coordinates $x$ and $y$ of every point lying on a straight line. Different forms of the equation are useful depending on the information given about the line.

In this topic, we will learn the following forms:

  1. Equation of a line parallel to the Y-axis – used when the line is vertical.
  2. Equation of a line parallel to the X-axis – used when the line is horizontal.
  3. Slope-intercept form – used when the slope and $y$-intercept are known.
  4. Double-intercept form – used when the $x$-intercept and $y$-intercept are known.
  5. Perpendicular form – used when the perpendicular distance of the line from the origin and the angle made by the perpendicular with the positive $x$-axis are known.

Section Formula – Coordinates of a Point Dividing a Line Segment

Step 1 of 7
Y Y' X X' O A(x₁, y₁) P(x, y) B(x₂, y₂) M N D F E

Section Formula

Let, in the figure, A(x1, y1) and B(x2, y2) are two points. P(x, y) divides the line segment AB internally in the ratio m1:m2. Calculate the coordinate of P(x, y).

Now, draw AD⊥OX, BE⊥OX, PF⊥OX, AM⊥PF and PN⊥BE

In the figure, AM = DF = OF − OD = x − x1,

PN = FE = OE − OF = x2 − x

PM = PF − MF = PF − AD = y − y1

BN = BE − NE = BE − PF = y2 − y

And APBP = m1m2

Right angled triangles ΔPMA and ΔBNP are similar.

AMPN = APBP [ ∵ The ratio of corresponding sides of similar triangle]

Or, x − x1x2 − x = m1m2

Or, m2x − m2x1 = m1x2 − m1x

Or, m2x + m1x = m1x2 + m2x1

Or, x(m1 + m2) = m1x2 + m2x1

Or, x = m1x2 + m2 x1m1 + m2

Again, PMBN = APBP [ ∵ The ratio of corresponding sides of similar triangle]

Or, y − y1y2 − y = m1m2

Or, m2y − m2y1 = m1y2 − m1y

Or, m2y + m1y = m1y2 + m2y1

Or, y(m1 + m2) = m1y2 + m2y1

Or, y = m1y2 + m2y1m1 + m2

∴ (x, y) = (m1x2 + m2 x1m1 + m2 , m1y2 + m2 y1m1 + m2)

Thus, the coordinates of the point dividing line segment AB are

P(x, y) = (m1x2 + m2 x1m1 + m2 , m1y2 + m2 y1m1 + m2)

Equation of line parallel to X- axis

X X' Y Y' O b A B b A' B' y = −b

Derivation Steps

In the adjoining figure, the line AB is parallel to the X- axis, and the distance from the X- axis to AB is b units.

Thus, the y- coordinate of every point lying on AB is b.

Therefore, y = b is the equation of the line AB.

If the line AB is below the X- axis and the distance from the X- axis to the line is b units, what would its equation be? Discuss this among your friends and present it in the classroom.

Equation of straight line in slope intercept form

X X' Y Y' O c θ A B C θ P(x, y) M N

Derivation Steps

In the adjoining figure, the straight line AB makes an angle ∠BAX = θ with the positive direction of the X- axis.

Its y- intercept is OC = (c). From any point P(x, y) lying on this line, we draw PM ⊥ OX. We also draw CN ⊥ PM. We have ∠PCN = ∠BAX = θ, OM = x and PM = y.

In right angled triangle PNC,

tanθ = PNCN

or, m = PM – NMCN

or, m = PM – OCOM

or, m = y – cx

or, y – c = mx

∴ y = mx + c

Alternative method

The coordinate of point C = (0, c)

Slope of AB = Slope of CP (why? Discuss.)

or, m = y – cx – 0

or, mx = y – c

∴ y = mx + c is the required equation.

a.  If the line AB passes through origin, c = 0 and its equation be y = mx + 0

∴ y = mx

b.  If the line AB is parallel to X- axis, m = tan0° = 0, and the equation of line is

y = mx + c

Or, y = 0.x + c

∴ y = c

Equation of line parallel to Y- axis

X X' Y Y' O a B A a B' A' x = −a

Derivation Steps

In the adjoining figure, the line AB is parallel to the Y- axis, and the distance from the Y- axis to AB is a units.

Thus, the x- coordinate of every point lying on AB is a.

Therefore, x = a is the equation of the line AB.

If the line AB is to the left side of the Y- axis and the distance from the Y- axis to the line is a units, what would its equation be? Discuss this among your friends and present it in the classroom.

Equation of straight line in double intercepts form

X X' Y Y' O b a B(0, b) A(a, 0) P(x, y)

Derivation Steps

In the adjoining figure, the straight line AB intersects the X- axis at the point A(a, 0) and the Y- axis at the point B(0, b). Therefore, OA = a and OB = b.

Let P(x, y) be any point lying on AB.

Slope of AP = y – 0x – a = yx – a

Slope of PB = b – y0 – x = b – y0 – x

The points A(a, 0), P(x, y), and B(0, b) are collinear (lie on the same line).

Therefore, Slope of AP = Slope of PB

Or, yx – a = b – y0 – x

Or, –xy = bx – ab – xy + ay

Or, bx + ay = ab

Dividing both sides by ab:

bxab + ayab = abab

∴  xa + yb = 1

This is the equation of the line AB in the double intercepts form.

Equation of straight line in perpendicular form

X X' Y Y' O b a B(0, b) A(a, 0) D p α

Derivation Steps

In the given figure, the straight line AB intersects the X- axis at the point A(a, 0) and the Y- axis at the point B(0, b). Therefore, OA = a and OB = b.

A perpendicular line OD ⊥ AB is drawn, where OD = p and ∠DOA = α.

In the right-angled triangle ΔODB, ∠BOD = 90° – α, ∠OBD = 180° – (90° – α) – 90° = α.

sinα = ODOB = pb

or, b = psinα

In the right-angled triangle ΔODA,

cosα = ODOA = pa

or, a = pcosα

Now, the equation of line AB from the intercepts form

xa + yb = 1

or, xpcosα + ypsinα = 1

or, xcosαp + ysinαp = 1

Thus, xcosα + ysinα = p is the required equation of line AB.

Example 1 of 2

Solve It