A straight line in the coordinate plane is completely determined by any two of its properties - two points on it, a point and a slope, two intercepts, or the perpendicular from the origin. The equation of a straight line is a first-degree relation in x and y, and every first-degree equation represents a straight line. This concept covers the eight standard forms of the equation of a line, the angle between two lines, parallel and perpendicular conditions, the family of concurrent lines, and the theory of a pair of straight lines given by a second-degree equation.
Key Formulas - Quick Reference
Slope: m=x2−x1y2−y1=tanθ, where θ is the inclination.
Point-slope: y−y1=m(x−x1).
Slope-intercept: y=mx+c.
Two-point: y−y1=x2−x1y2−y1(x−x1).
Intercept: ax+by=1.
Normal: xcosα+ysinα=p, p>0.
Parametric: cosθx−x1=sinθy−y1=r.
General: ax+by+c=0; slope =−ba.
Angle between two lines: tanθ=1+m1m2m1−m2.
Distance between parallel lines ax+by+c1=0 and ax+by+c2=0: a2+b2∣c1−c2∣.
Pair through origin ax2+2hxy+by2=0: slopes have m1+m2=−b2h, m1m2=ba; angle tanθ=a+b2h2−ab.
1. Slope (Gradient) of a Line
Let θ be the angle a straight line makes with the positive direction of the x-axis, measured anti-clockwise, with 0∘≤θ<180∘. Then θ is called the inclination of the line and
m=tanθ
is its slope (or gradient). Special cases:
θ=0∘: line is parallel to the x-axis, m=0.
θ=90∘: line is parallel to the y-axis (vertical); m is undefined.
0∘<θ<90∘: line rises left-to-right, m>0.
90∘<θ<180∘: line falls left-to-right, m<0.
Figure 1. The four cases. m=tanθ is zero for a horizontal line, positive for 0∘<θ<90∘, undefined at θ=90∘, and negative for 90∘<θ<180∘.
Slope from two points
If A(x1,y1) and B(x2,y2) are two points on a line and x1=x2, then
m=x2−x1y2−y1.Figure 2. Slope is the tangent of the inclination: m=tanθ=x2−x1y2−y1, the vertical step divided by the horizontal step between any two points of the line.
Solved Example 1
Find the slope of the line whose inclination is (i) 120∘, (ii) 150∘.
Solution:
(i) m=tan120∘=tan(180∘−60∘)=−tan60∘=−3.
(ii) m=tan150∘=−tan30∘=−31.
Solved Example 2
Find the slope of the line through (1,6) and (−4,2).
Solution:
m=−4−12−6=−5−4=54.
2. Various Forms of the Equation of a Line
2.1 Point-slope form
Line with slope m passing through (x1,y1):
y−y1=m(x−x1).
Solved Example 3
Find the equation of the line through (2,−3) inclined at 135∘ with the x-axis.
Solution:
m=tan135∘=−1. So y−(−3)=−1(x−2), i.e., y+3=−x+2 or x+y+1=0.
2.2 Slope-intercept form
Line with slope m and y-intercept c (i.e., cutting the y-axis at (0,c)):
y=mx+c.
Solved Example 4
Find the equation of the line with slope −1 and y-intercept −4.
Solution:
y=−x−4 or equivalently x+y+4=0.
2.3 Two-point form
Line through two given points (x1,y1) and (x2,y2):
y−y1=x2−x1y2−y1(x−x1)(x1=x2).
2.4 Determinant form
Same idea rewritten as a 3×3 determinant:
xy1x1y11x2y21=0.
Expanding this determinant gives the two-point form directly.
Solved Example 5
Find the equation of the line joining (−1,3) and (4,−2).
Solution:
Slope =4−(−1)−2−3=5−5=−1.
Using point-slope with (−1,3): y−3=−1(x+1)⇒x+y−2=0.
2.5 Intercept form
Line with x-intercept a and y-intercept b (i.e., meeting the axes at (a,0) and (0,b), both non-zero):
ax+by=1.Figure 3. Intercept form. A line meeting the axes at (a,0) and (0,b) has equation ax+by=1, and cuts off a triangle of area 21∣ab∣ with the axes.
Solved Example 6
A line passes through (3,4) and the sum of its intercepts on the axes is 14. Find its equation.
Solution:
Let intercepts be a and b with a+b=14, so b=14−a. The line is ax+14−ay=1.
Passing through (3,4): a3+14−a4=1⇒3(14−a)+4a=a(14−a).
42+a=14a−a2⇒a2−13a+42=0⇒(a−6)(a−7)=0.
So (a,b)=(6,8) giving 6x+8y=1 or 4x+3y=24; or (a,b)=(7,7) giving x+y=7.
2.6 Normal (perpendicular) form
If the perpendicular from the origin to the line has length p and makes an angle α with the positive x-axis, then
xcosα+ysinα=p,p>0,0≤α<2π.
The constant p is always taken as positive; the angle α carries the direction information.
Figure 4. Normal form. If the perpendicular from the origin has length p and makes angle α with the positive x-axis, the line is xcosα+ysinα=p with p>0.
Solved Example 7
A line is at distance 3 from the origin and the perpendicular from the origin makes an angle of 30∘ with the positive x-axis. Find its equation.
Solution:
p=3, α=30∘. Equation: xcos30∘+ysin30∘=3, i.e., 23x+21y=3 or 3x+y=6.
2.7 Parametric (distance) form
Line through P(x1,y1) inclined at angle θ with the positive x-axis:
cosθx−x1=sinθy−y1=r,
where ∣r∣ is the distance from P to the variable point (x,y) on the line. So any point on the line is
(x,y)=(x1+rcosθ,y1+rsinθ).Figure 5. Parametric form. Every point of the line through P(x1,y1) with inclination θ is (x1+rcosθ,y1+rsinθ), where r is the signed distance from P.
This form is invaluable for "find points on this line at a given distance from a fixed point" problems.
Solved Example 8
Find the equation of the line through A(2,3) making an angle 45∘ with the x-axis, and the length of its intercept between A and the line x+y+1=0.
Solution:
Line: cos45∘x−2=sin45∘y−3, i.e., x−y+1=0.
Any point on it at distance r from A: (2+2r,3+2r). Substituting into x+y+1=0: 2+2r+3+2r+1=0⇒2r=−6⇒r=−32.
Distance =∣r∣=32.
2.8 General form
Every straight line can be written as
ax+by+c=0,(a,b)=(0,0).
From this general form:
Slope =−ba (undefined if b=0; the line is then vertical).
x-intercept =−ac; y-intercept =−bc.
Distance from origin =a2+b2∣c∣.
Solved Example 9
Find the slope, x-intercept, and y-intercept of 2x−3y+5=0.
Let m1 and m2 be the slopes of two intersecting lines with m1m2=−1. The acute angle θ between them satisfies
tanθ=1+m1m2m1−m2.Figure 6. The angle between two lines is the difference of their inclinations, so tanθ=1+m1m2m1−m2. The lines are parallel when m1=m2 and perpendicular when m1m2=−1.
Two special cases:
Parallel lines:m1=m2 (both defined) or both undefined.
Perpendicular lines:m1m2=−1 (both defined); alternatively one is horizontal (m=0) and the other is vertical.
Equivalently, for lines in general form:
a1x+b1y+c1=0 is parallel to a2x+b2y+c2=0 iff a2a1=b2b1=c2c1.
The two lines are perpendicular iff a1a2+b1b2=0.
Line through a point making a given angle with a given line
The two lines through (x1,y1) making angle α with the line y=mx+c are
y−y1=tan(θ−α)(x−x1)andy−y1=tan(θ+α)(x−x1),
where tanθ=m.
Solved Example 10
The acute angle between two lines is 4π and the slope of one of them is 21. Find the slope of the other.
Solution:
Let the other slope be m. Then tan4π=1+2m21−m⇒1=2+m1−2m.
So 1−2m=±(2+m). Positive: 1−2m=2+m⇒m=−31. Negative: 1−2m=−2−m⇒m=3.
The slope of the other line is −31 or 3.
Solved Example 11
A vertex of an equilateral triangle is (2,3) and the opposite side lies on x+y=2. Find the equations of the other two sides.
Solution:
Slope of x+y=2 is −1. The other two sides pass through (2,3) and make 60∘ with slope −1.
tan60∘=1−m−1−m⇒3(1−m)=±(1+m).
Solving both signs: m=3+13−1=2−3 or m=2+3.
Equations: y−3=(2−3)(x−2) and y−3=(2+3)(x−2).
4. Distance Between Two Parallel Lines
The distance between the parallel lines ax+by+c1=0 and ax+by+c2=0 is
d=a2+b2∣c1−c2∣.Figure 7. Distance between parallels. With identical a and b in both equations, d=a2+b2∣c1−c2∣; rescale one equation first if the coefficients do not already match.
Warning: the coefficients of x and y in both equations must be identical before applying the formula. If they aren't, multiply one equation through to match them.
Solved Example 12
Two sides of a square lie on x+y=1 and x+y+2=0. Find its area.
Solution:
Side of the square = distance between the two parallel lines =12+12∣1−(−2)∣=23.
Area =(23)2=29.
Area of a parallelogram formed by four lines
If the four sides are y=m1x+c1,y=m1x+c2,y=m2x+d1,y=m2x+d2, then
Area=m1−m2(c1−c2)(d1−d2).
5. Family of Lines and Concurrency
Family through the intersection of two lines
If L1≡a1x+b1y+c1=0 and L2≡a2x+b2y+c2=0 meet at a point P, then every line through P (except L2 itself) can be written as
L1+λL2=0,λ∈R.Figure 8. The family of lines. If L1=0 and L2=0 meet at P, then L1+λL2=0 passes through P for every real λ, and every line through P except L2 itself arises this way.
Choose λ to make the resulting line satisfy the extra condition of the problem.
Concurrency of three lines
Three lines aix+biy+ci=0 (i=1,2,3) are concurrent iff
a1b1c1a2b2c2a3b3c3=0.
Equivalently, three lines are concurrent if constants A,B,C (not all zero) exist with AL1+BL2+CL3≡0 (identically).
Solved Example 13
Find the equation of the line passing through (2,−3) and through the intersection of x+y+4=0 and 3x−y−8=0.
Solution:
Any line through the intersection: (x+y+4)+λ(3x−y−8)=0. Passing through (2,−3): (2−3+4)+λ(6+3−8)=0⇒3+λ=0⇒λ=−3.
always represents a pair of straight lines passing through the origin. Dividing by x2 and setting xy=m gives the quadratic bm2+2hm+a=0 whose two roots m1,m2 are the slopes of the two lines.
Slopes of the pair
m1+m2=−b2h,m1m2=ba.Figure 9. A homogeneous second-degree equation ax2+2hxy+by2=0 always represents two lines through the origin, with m1+m2=−b2h, m1m2=ba and tanθ=a+b2h2−ab.
Nature of the pair
h2>ab: two distinct real lines.
h2=ab: two coincident real lines.
h2<ab: no real lines - only the origin (imaginary pair, real point of intersection at (0,0)).
Angle between the pair
The acute angle θ between the two lines represented by ax2+2hxy+by2=0 is
tanθ=a+b2h2−ab.
Special cases
Perpendicular lines:a+b=0 (coefficient of x2 + coefficient of y2 = 0).
Coincident lines:h2=ab.
Equally inclined to the x-axis:h=0 (the coefficient of xy vanishes).
Extension. A homogeneous equation of degree n in x,y represents n straight lines through the origin (some possibly imaginary).
Angle bisectors of the pair
The equation of the pair of angle bisectors of ax2+2hxy+by2=0 is
a−bx2−y2=hxy.
Note: the bisectors are always perpendicular to each other (the two bisectors of any angle pair are).
Solved Example 15
Show that 6x2−5xy+y2=0 represents two distinct lines through the origin and find them.
Solution:
Here a=6,b=1,h=−25. So h2−ab=425−6=41>0: two distinct real lines.
Factorise: 6x2−5xy+y2=(3x−y)(2x−y)=0. Lines: y=3x and y=2x.
Solved Example 16
Find the angle between the pair of lines 4x2+24xy+11y2=0.
Find the equation of the bisectors of the angles between the lines 3x2−5xy+4y2=0.
Solution:
Here a=3,b=4,h=−25. Bisector pair: 3−4x2−y2=−5/2xy, i.e., −1x2−y2=−52xy.
Cross-multiplying: −5(x2−y2)=−2xy⇒5x2−2xy−5y2=0.
7. General Second-Degree Equation as a Pair of Lines
The general second-degree equation
ax2+2hxy+by2+2gx+2fy+c=0
represents a pair of straight lines if and only if
Δ≡abc+2fgh−af2−bg2−ch2=0,i.e.,ahghbfgfc=0,
along with h2≥ab (so that the pair is real).
Angle between the pair
The angle between the two lines depends only on the second-degree part - i.e., it is the same as for ax2+2hxy+by2=0:
tanθ=a+b2h2−ab.
Point of intersection of the pair
Assuming h2=ab, the two lines meet at
(ab−h2hf−bg,ab−h2gh−af).
An easy way to remember: partially differentiate the LHS with respect to x and y, set both to zero, and solve. That gives the intersection point directly.
Condition for the pair to be parallel lines
The pair represents two parallel lines iff h2=ab and af2=bg2 (or equivalently bg2=ch2, af2=ch2). The distance between the two parallel lines is
d=2a(a+b)g2−ac.
Solved Example 18
Show that 2x2+5xy+3y2+6x+7y+4=0 represents a pair of straight lines and find their point of intersection.
Treating as a quadratic in x: 2x2+(5y+6)x+(3y2+7y+4)=0. Discriminant =(5y+6)2−8(3y2+7y+4)=y2+4y+4=(y+2)2.
x=4−(5y+6)±(y+2), giving x+y+1=0 and 2x+3y+4=0.
Solving: y=−2,x=1. Point of intersection: (1,−2).
8. Homogenisation - Joint Equation from the Origin
Given a curve S≡ax2+2hxy+by2+2gx+2fy+c=0 and a line L≡ℓx+my+n=0 (n=0), let the line cut the curve at A and B. The joint equation of the two straight lines OA and OB (from the origin to the intersection points) is obtained by making S homogeneous of degree two using L:
ax2+2hxy+by2+2(gx+fy)(−nℓx+my)+c(−nℓx+my)2=0.
Every term is now of degree two, so the equation represents a pair of straight lines through the origin - exactly OA and OB.
Figure 10. Homogenisation. Writing the line as L=1 and using it to raise every term of S=0 to degree two gives the joint equation of OA and OB, the pair of lines from the origin to the points where the line cuts the curve.
Solved Example 19
If the lines joining the origin to the points of intersection of 2x2+3y2+m=0 with y=2x+3 are perpendicular, find m.
Solution:
Write the line as 3y−2x=1. Homogenising 2x2+3y2+m⋅12=0:
2x2+3y2+m(3y−2x)2=0.
Coefficient of x2: 2+94m. Coefficient of y2: 3+9m.
For perpendicular lines the two coefficients sum to zero: 2+94m+3+9m=0⇒5+95m=0⇒m=−9.
Solved Example 20
Find the equation of the lines joining the origin to the points of intersection of 3x+4y−5=0 with the curve 2x2+3y2=5.
Multiply by 5: 10x2+15y2=9x2+24xy+16y2⇒x2−24xy−y2=0.
Common Mistakes to Avoid
Watch out
Slope of a vertical line:tan90∘ is undefined - the line has no slope, not "infinite slope". Write vertical lines as x=k, not as y=mx+c.
Angle between lines when 1+m1m2=0: the formula gives division by zero because the lines are perpendicular; simply state θ=90∘ instead of trying to plug in.
Distance between parallel lines: the coefficients of x and y must match. 2x+3y+5=0 and 4x+6y−1=0 - divide the second by 2 first, then apply the formula.
Homogeneous eqn ax2+2hxy+by2=0: the coefficient of xy is 2h, not h. A student who reads 6xy as h=6 (instead of h=3) will get the angle wrong.
General second-degree pair: the determinant condition Δ=0 is necessary but you also need h2≥ab for the lines to be real (otherwise you get an imaginary pair).
Homogenisation: the line must be written in the form L=1 (i.e., −nℓx+my=1), never L=0 - otherwise you'd be multiplying by zero and lose information.
Family of lines:L1+λL2=0 generates every line through the intersection exceptL2 itself. If the required line is L2, no finite λ works.
Frequently Asked Questions
Q1. When is the slope of a line undefined?
When the line is vertical - i.e., parallel to the y-axis. Its inclination is 90∘ and tan90∘ is undefined. Vertical lines have the equation x=k for some constant k.
Q2. Why is p always taken positive in the normal form xcosα+ysinα=p?
Because p represents a length - the perpendicular distance from the origin to the line - and lengths are non-negative by definition. The direction information is carried by the angle α (which can range over [0,2π)).
Q3. What is the parametric form used for?
It gives every point on a line as (x1+rcosθ,y1+rsinθ) where ∣r∣ is the distance from a fixed point (x1,y1). This makes it ideal for problems that ask "find the point on this line at distance d from a given point" or "find the length of intercept between two curves along a given line".
Q4. How many lines can pass through the intersection of two given lines?
Infinitely many - the entire pencil of lines through that point. Algebraically, the family L1+λL2=0 (for varying real λ) covers every line through the point of intersection except L2 itself.
Q5. What is the condition for ax2+2hxy+by2=0 to represent perpendicular lines?
The condition is a+b=0 - i.e., the sum of the coefficients of x2 and y2 vanishes. This is a very useful test that requires no factoring.
Q6. What is the difference between ax2+2hxy+by2=0 and the general second-degree equation?
The homogeneous form (no first-degree or constant terms) always represents a pair of lines through the origin. The general form with all six terms represents a pair only if the extra condition abc+2fgh−af2−bg2−ch2=0 holds, and then the two lines can meet anywhere - not necessarily at the origin.
Q7. What does the homogenisation trick achieve?
Given a line L=0 meeting a curve S=0 at two points A and B, homogenisation produces a single second-degree equation whose two lines are exactly OA and OB. This lets you find the angle at the origin, test perpendicularity, or write the joint equation - all without solving for A and B explicitly.
Q8. Are the two angle bisectors of a pair of lines always perpendicular?
Yes. The two bisectors of the two angles between any pair of intersecting lines bisect supplementary angles, and supplementary bisectors are always perpendicular to each other. That's why a−bx2−y2=hxy (the pair-of-bisectors equation) has coefficient of x2 equal to negative of coefficient of y2 - the perpendicularity condition.
Previous year questions on Introduction to Straight Lines
4 questions from past papers, each with a step-by-step solution.