Unit 12 · Analytic Geometry · 7 teaching hours · 18 min read
Pair of Straight Lines
What the syllabus asks for 4
- General equation of second degree; condition for representing a pair of lines
- Homogeneous second degree equation in x and y
- Angle between the pair of lines
- Bisectors of the angles between the pair of lines
A single straight line has a first-degree equation. Multiply two such equations together and you get a second-degree equation whose graph is not a curve but two straight lines. This unit runs that idea backwards: given a second-degree equation in x and y, when does it represent a pair of lines, what are the lines, what angle do they make, and where do their angle bisectors lie?
Three results carry nearly all the marks: the condition abc+2fgh-af^{2}-bg^{2}-ch^{2} = 0, the angle formula \tan\theta = \dfrac{2\sqrt{h^{2}-ab}}{a+b}, and the bisector pair \dfrac{x^{2}-y^{2}}{a-b} = \dfrac{xy}{h}. Group C almost always asks you to derive the angle formula or the bisector equation from the homogeneous equation.
12.1 General equation of second degree; condition for representing a pair of lines
The most general second-degree equation in two variables is written, by long convention, as
The factors of 2 are put in deliberately so that the formulae below come out without fractions. So for 2x^{2}+7xy+3y^{2}+8x+14y+8 = 0 we read off a=2, h=\frac72, b=3, g=4, f=7, c=8.
h, g and f are half the coefficients of xy, x and y. Forgetting this is the single commonest error in this unit — it makes the condition fail for an equation that really does represent a pair of lines.
Suppose the equation factorises into two linear factors:
Treat the equation as a quadratic in x, with y as a parameter:
For x to be a linear function of y — which is what "a pair of straight lines" means — the expression under the root must be a perfect square in y:
A quadratic Ay^{2}+By+C is a perfect square exactly when its discriminant B^{2}-4AC = 0:
Expanding,
Dividing by -a (assuming a \ne 0) gives the condition
This is the expansion of the determinant of the symmetric array with rows (a,h,g), (h,b,f), (g,f,c). Two further facts go with it:
- The two lines are real and distinct when h^{2} > ab, coincident when h^{2} = ab, and imaginary (only the intersection point is real) when h^{2}<ab.
- Their point of intersection is \left(\dfrac{bg-fh}{h^{2}-ab},\ \dfrac{af-gh}{h^{2}-ab}\right).
Problem. Show that 2x^{2}+7xy+3y^{2}+8x+14y+8 = 0 represents a pair of straight lines, find them, and find their point of intersection.
Solution. Reading off, a=2, b=3, c=8, h=\frac72, g=4, f=7.
So it does represent a pair of lines. Also h^{2}-ab = \frac{49}{4}-6 = \frac{25}{4} > 0, so they are real and distinct.
Factorising. Treat it as a quadratic in x: 2x^{2}+(7y+8)x+(3y^{2}+14y+8) = 0. The last bracket factorises as (3y+2)(y+4), and 2x^{2}+7xy+3y^{2} = (x+3y)(2x+y), so we try
Expanding checks out: 2x^{2}+xy+4x+6xy+3y^{2}+12y+4x+2y+8 = 2x^{2}+7xy+3y^{2}+8x+14y+8 ✓.
The lines are x+3y+2 = 0 and 2x+y+4 = 0.
Point of intersection. From the second, y = -4-2x; substituting, x+3(-4-2x)+2 = 0, so -5x-10 = 0 and x = -2, giving y = 0. The lines meet at (-2,\,0).
Check with the formula. \dfrac{bg-fh}{h^{2}-ab} = \dfrac{3(4)-7\left(\frac72\right)}{\frac{25}{4}} = \dfrac{-\frac{25}{2}}{\frac{25}{4}} = -2 and \dfrac{af-gh}{h^{2}-ab} = \dfrac{2(7)-4\left(\frac72\right)}{\frac{25}{4}} = 0 ✓.
Problem. Find the values of k for which 2x^{2}+kxy+3y^{2}-5x-5y+2 = 0 represents a pair of straight lines, and write down the lines for the larger value.
Solution. Here a=2, b=3, c=2, h=\frac{k}{2}, g=-\frac52, f=-\frac52. Substituting into \Delta = 0:
Multiplying by 4: 48+25k-50-75-2k^{2} = 0, that is
For k = 7 the equation is 2x^{2}+7xy+3y^{2}-5x-5y+2 = 0, which factorises as
so the lines are x+3y-2 = 0 and 2x+y-1 = 0.
Problem. Show that x^{2}+4xy+4y^{2}+2x+4y-3 = 0 represents a pair of parallel lines and find the distance between them.
Solution. Here a=1, h=2, b=4, so h^{2}-ab = 4-4 = 0: the "point of intersection" formula breaks down, which is exactly the signature of parallel lines.
The second-degree part is x^{2}+4xy+4y^{2} = (x+2y)^{2}, so put u = x+2y:
The lines are x+2y+3 = 0 and x+2y-1 = 0. They are parallel (same a, b), and the distance between them is
12.2 Homogeneous second degree equation in x and y
An equation is homogeneous of degree two when every term has total degree exactly two:
Putting x=0, y=0 satisfies it, so every such pair passes through the origin. This is the case g=f=c=0, for which \Delta = 0 automatically — a homogeneous second-degree equation always represents a pair of lines through the origin (real if h^{2}\ge ab).
Neither line is vertical when b \ne 0, so write each as y = mx. Substituting,
This quadratic has the two slopes m_1, m_2 as its roots, so
Equivalently, ax^{2}+2hxy+by^{2} = b(y-m_1x)(y-m_2x).
- Perpendicular lines: m_1m_2 = -1, i.e. \dfrac{a}{b} = -1, i.e.
— the coefficient of x^{2} plus the coefficient of y^{2} is zero. - Coincident lines: m_1 = m_2, i.e. h^{2} = ab.
Problem. Find the separate equations of the lines represented by 6x^{2}+5xy-6y^{2} = 0, and show that they are perpendicular.
Solution. Split the middle term: 5xy = 9xy-4xy, so
The lines are 3x-2y = 0 and 2x+3y = 0, with slopes \frac32 and -\frac23. Their product is -1, so the lines are perpendicular.
Check by the rule. a+b = 6+(-6) = 0 ✓.
Lines joining the origin to the intersection of a line and a curve
This is a standard exam problem and the only real use of homogenisation. To find the pair of lines joining the origin to the points where the line lx+my = n cuts the curve S = 0, rewrite the line as \dfrac{lx+my}{n} = 1 and use it to multiply up every term of S until every term has degree two. The resulting homogeneous equation is the required pair.
Problem. Find the equation of the pair of lines joining the origin to the points of intersection of x+y = 3 and x^{2}+y^{2} = 5, and the angle between them.
Solution. Write the line as \dfrac{x+y}{3} = 1. The curve is x^{2}+y^{2} = 5\cdot 1^{2}, so replacing the 1:
Factorising, (x-2y)(2x-y) = 0, so the lines are y = \frac{x}{2} and y = 2x.
Angle. With m_1 = 2, m_2 = \frac12,
Check directly. From x+y=3 and x^{2}+y^{2}=5 we get 2xy = 9-5 = 4, so xy=2; x and y are the roots of t^{2}-3t+2 = 0, namely 1 and 2. The intersection points are (1,2) and (2,1), and the lines from the origin through them are indeed y=2x and y=\frac{x}{2} ✓.
Problem. Find the equation of the pair of lines through the origin perpendicular to the pair 6x^{2}-xy-y^{2} = 0.
Solution. First separate: 6x^{2}-3xy+2xy-y^{2} = 3x(2x-y)+y(2x-y) = (2x-y)(3x+y), so the lines are y = 2x and y = -3x.
The perpendiculars through the origin have slopes -\frac12 and \frac13, i.e. x+2y = 0 and x-3y = 0. Multiplying,
The general rule. Replacing m by -\frac1m in bm^{2}+2hm+a = 0 turns it into a m^{2}-2hm+b = 0, so the perpendicular pair to ax^{2}+2hxy+by^{2}=0 is
With a=6, h=-\frac12, b=-1 this gives -x^{2}+xy+6y^{2} = 0, i.e. x^{2}-xy-6y^{2} = 0 ✓.
12.3 Angle between the pair of lines
Let the lines be y = m_1x and y = m_2x, so m_1+m_2 = -\dfrac{2h}{b} and m_1m_2 = \dfrac{a}{b}. The angle \theta between them satisfies
Now (m_1-m_2)^{2} = (m_1+m_2)^{2}-4m_1m_2 = \dfrac{4h^{2}}{b^{2}}-\dfrac{4a}{b} = \dfrac{4(h^{2}-ab)}{b^{2}}, so |m_1-m_2| = \dfrac{2\sqrt{h^{2}-ab}}{|b|}. Also 1+m_1m_2 = 1+\dfrac{a}{b} = \dfrac{a+b}{b}. Hence
Usually written without the modulus, with the sign chosen to give the acute angle:
The same formula works for a general second-degree pair, because shifting the origin to the point of intersection leaves a, h, b unchanged and kills g, f, c. So the angle depends only on the second-degree terms.
| Condition | Meaning |
|---|---|
| a+b = 0 | the lines are perpendicular (\theta = 90^{\circ}) |
| h^{2} = ab | the lines are coincident (\theta = 0) |
| h^{2} > ab | real, distinct lines |
| h^{2} < ab | no real lines |
Problem. Find the angle between the lines represented by 6x^{2}-xy-y^{2} = 0.
Solution. Here a = 6, 2h = -1 so h = -\frac12, and b = -1.
Check. The lines are y = 2x and y = -3x, and |\dfrac{2-(-3)}{1+2(-3)}| = |\dfrac{5}{-5}| = 1 ✓.
Problem. Find the acute angle between the lines represented by 2x^{2}+7xy+3y^{2}+8x+14y+8 = 0.
Solution. Only a, h, b matter: a=2, h=\frac72, b=3.
This agrees with Worked example 12.1, where the lines came out as x+3y+2=0 (slope -\frac13) and 2x+y+4=0 (slope -2): |\dfrac{-\frac13+2}{1+\frac23}| = \dfrac{\frac53}{\frac53} = 1 ✓.
12.4 Bisectors of the angles between the pair of lines
Take the pair ax^{2}+2hxy+by^{2} = 0 through the origin, with separate equations y-m_1x = 0 and y-m_2x = 0. A point P(x,y) on a bisector is equidistant from both lines:
Squaring to remove the moduli,
Expanding and collecting, all the terms in x^{2}, xy and y^{2} regroup as
Now substitute m_1+m_2 = -\dfrac{2h}{b} and m_1m_2 = \dfrac{a}{b}:
Multiplying by -\dfrac{b}{2} gives h\left(x^{2}-y^{2}\right) = (a-b)xy, usually quoted as
- h\left(x^{2}-y^{2}\right)-(a-b)xy = 0 is itself a homogeneous second-degree equation, so it is a pair of lines through the origin.
- For it, the coefficient of x^{2} is h and of y^{2} is -h, whose sum is zero — so the two bisectors are always perpendicular, whatever the original pair.
- If the pair does not pass through the origin, first shift the origin to the point of intersection (x_0,y_0), apply the formula, then shift back by replacing x with x-x_0 and y with y-y_0.
Problem. Find the equation of the bisectors of the angles between the lines 6x^{2}-xy-y^{2} = 0.
Solution. Here a = 6, h = -\frac12, b = -1, so a-b = 7 and
Check. The sum of the coefficients of x^{2} and y^{2} is 1+(-1) = 0, so the bisectors are perpendicular ✓. Their slopes satisfy 1+14m-m^{2} = 0, i.e. m^{2}-14m-1 = 0, giving m = 7\pm 5\sqrt{2} — approximately 14.07 and -0.071, whose product is 49-50 = -1 ✓.
Problem. Find the bisectors of the angles between the lines 2x^{2}+7xy+3y^{2}+8x+14y+8 = 0.
Solution. From Worked example 12.1 the lines meet at (-2,0). Shift the origin there by putting X = x+2, Y = y, i.e. x = X-2, y = Y:
(as it must be — the shifted pair passes through the new origin). Now apply the formula with a=2, h=\frac72, b=3, so a-b = -1:
Shifting back with X = x+2, Y = y:
that is, 7x^{2}+2xy-7y^{2}+28x+4y+28 = 0.
Check. Coefficients of x^{2} and y^{2} sum to 7-7 = 0, so the two bisectors are perpendicular ✓, and both pass through (-2,0), since substituting gives 7(0)+2(0)(0)-0 = 0 ✓.
Before you write the final line of any answer in this unit, check the pair you have found: multiply your two separate equations back out and compare with the original; and for any bisector pair confirm that the x^{2} and y^{2} coefficients are negatives of each other.
Chapter summary
- ax^{2}+2hxy+by^{2}+2gx+2fy+c = 0 represents a pair of straight lines exactly when \Delta = abc+2fgh-af^{2}-bg^{2}-ch^{2} = 0. Remember h, g, f are half the coefficients of xy, x, y.
- The lines are real and distinct if h^{2}>ab, coincident if h^{2}=ab, parallel if h^{2}=ab with the pair not degenerate, and not real if h^{2}<ab.
- They meet at \left(\dfrac{bg-fh}{h^{2}-ab},\ \dfrac{af-gh}{h^{2}-ab}\right).
- A homogeneous equation ax^{2}+2hxy+by^{2} = 0 always represents two lines through the origin, with m_1+m_2 = -\dfrac{2h}{b} and m_1m_2 = \dfrac{a}{b}.
- Angle between the pair: \tan\theta = \dfrac{2\sqrt{h^{2}-ab}}{a+b}; they are perpendicular when a+b = 0 and coincident when h^{2} = ab.
- The pair through the origin perpendicular to ax^{2}+2hxy+by^{2}=0 is bx^{2}-2hxy+ay^{2} = 0.
- The bisectors of the angles between the pair are \dfrac{x^{2}-y^{2}}{a-b} = \dfrac{xy}{h}; they are always perpendicular to each other.
- To find the lines joining the origin to the intersections of lx+my=n with a curve, homogenise the curve using \dfrac{lx+my}{n} = 1.
Practice questions
Group A — Multiple choice (1 mark each)
- The equation x^{2}-y^{2} = 0 represents [1]aa circlebtwo perpendicular linescone linedno real locus
- The lines ax^{2}+2hxy+by^{2}=0 are perpendicular if [1]ah^{2}=abba+b=0cab=1dh=0
- The angle between the pair x^{2}-2xy+y^{2}=0 is [1]a0^{\circ}b30^{\circ}c60^{\circ}d90^{\circ}
- The bisectors of the angles between a pair of lines are always [1]aparallelbperpendicularccoincidentdinclined at 60^{\circ}
- In 3x^{2}+5xy-2y^{2}+4x-7y+2=0, the value of h is [1]a5b\frac52c-2d2
- The lines represented by 2x^{2}+5xy+2y^{2}=0 pass through [1]a(1,1)b(0,0)c(2,2)d(1,0)
Answers to Group A
1. (b) — (x-y)(x+y)=0, slopes 1 and -1, product -1.
2. (b) — m_1m_2 = a/b = -1 gives a+b=0.
3. (a) — h^{2}-ab = 1-1 = 0, so the lines coincide: (x-y)^{2}=0.
4. (b) — the bisector pair has x^{2} and y^{2} coefficients h and -h, summing to zero.
5. (b) — 2h is the coefficient of xy, so h = \frac52.
6. (b) — every homogeneous second-degree equation is satisfied by (0,0).
Group B — Short answer (5 marks each)
- Find the separate equations of the lines represented by 3x^{2}-8xy-3y^{2} = 0 and the angle between them. [5]
- Find the value of \lambda for which 6x^{2}+11xy-10y^{2}+x+31y+\lambda = 0 represents a pair of straight lines. [5]
- Prove that the equation x^{2}+4xy+4y^{2}+4x+8y+3 = 0 represents a pair of parallel lines and find the distance between them. [5]
- Find the equation of the bisectors of the angles between the lines 2x^{2}-5xy+2y^{2} = 0. [5]
- Find the equation of the pair of lines through the origin perpendicular to x^{2}-3xy+2y^{2} = 0. [5]
Answers to Group B
1. Split the middle term: 3x^{2}-9xy+xy-3y^{2} = 3x(x-3y)+y(x-3y) = (x-3y)(3x+y). So the lines are x-3y = 0 and 3x+y = 0, with slopes \frac13 and -3. Since a+b = 3+(-3) = 0 the lines are perpendicular, \theta = 90^{\circ} (and indeed \frac13\times(-3) = -1).
2. a=6, h=\frac{11}{2}, b=-10, g=\frac12, f=\frac{31}{2}, c=\lambda.
Multiplying through by 4:
Check. With \lambda=-15 the equation factorises as (3x-2y+5)(2x+5y-3) = 0, which expands to 6x^{2}+11xy-10y^{2}+x+31y-15 ✓.
3. a=1, h=2, b=4, so h^{2}-ab = 4-4 = 0 and the lines are parallel. Also a=1, g=2, f=4, c=3 give \Delta = (1)(4)(3)+2(4)(2)(2)-1(4)^{2}-4(2)^{2}-3(2)^{2} = 12+32-16-16-12 = 0, so it is a pair of lines. Putting u = x+2y, the equation is u^{2}+4u+3 = 0, i.e. (u+1)(u+3) = 0. The lines are x+2y+1 = 0 and x+2y+3 = 0, and d = \dfrac{|3-1|}{\sqrt{1+4}} = \dfrac{2}{\sqrt{5}} = \dfrac{2\sqrt{5}}{5} \approx 0.894 units.
4. For 2x^{2}-5xy+2y^{2} = 0: a = 2, h = -\frac52, b = 2, so a-b = 0. Written as h(x^{2}-y^{2}) = (a-b)xy the bisector equation reads -\frac52(x^{2}-y^{2}) = 0, so
This is right: the original lines are (x-2y)(2x-y) = 0, i.e. y = \frac{x}{2} and y = 2x, which are mirror images of each other in y = x.
5. For ax^{2}+2hxy+by^{2} = 0 the perpendicular pair through the origin is bx^{2}-2hxy+ay^{2} = 0. With a = 1, 2h = -3, b = 2:
Check. The original pair is (x-2y)(x-y) = 0, slopes \frac12 and 1; the new pair has slopes -2 and -1. Each product is -1 ✓.
Group C — Long answer (8 marks each)
- (a) Derive the formula \tan\theta = \dfrac{2\sqrt{h^{2}-ab}}{a+b} for the angle between the lines ax^{2}+2hxy+by^{2} = 0. [5](b) Hence find the angle between the lines 2x^{2}+7xy+3y^{2}+8x+14y+8 = 0. [3]
- (a) Show that x^{2}+4xy+3y^{2}+4x+10y+3 = 0 represents a pair of straight lines and find them. [5](b) Find their point of intersection and the angle between them. [3]
Answers to Group C
1. (a) Writing each line as y = mx and substituting gives bm^{2}+2hm+a = 0, so m_1+m_2 = -\frac{2h}{b} and m_1m_2 = \frac{a}{b}. Then
so |m_1-m_2| = \frac{2\sqrt{h^{2}-ab}}{|b|}, while 1+m_1m_2 = \frac{a+b}{b}. Substituting in \tan\theta = |\frac{m_1-m_2}{1+m_1m_2}| and cancelling |b| gives \tan\theta = \frac{2\sqrt{h^{2}-ab}}{a+b}.
(b) a = 2, h = \frac72, b = 3, so h^{2}-ab = \frac{49}{4}-6 = \frac{25}{4} and \tan\theta = \frac{2\cdot\frac52}{5} = 1, giving \theta = 45^{\circ}.
2. (a) a=1, h=2, b=3, g=2, f=5, c=3.
So it is a pair of lines, and h^{2}-ab = 4-3 = 1 > 0, so they are real and distinct. Since x^{2}+4xy+3y^{2} = (x+y)(x+3y), try (x+y+p)(x+3y+q). Matching the x terms: p+q = 4; matching the y terms: 3p+q = 10. Subtracting, 2p = 6, so p = 3 and q = 1; the constant is pq = 3 ✓. The lines are
(b) Subtracting the equations gives -2y+2 = 0, so y = 1 and then x = -4: they meet at (-4,\,1). (Formula check: \frac{bg-fh}{h^{2}-ab} = \frac{3(2)-5(2)}{1} = -4 and \frac{af-gh}{h^{2}-ab} = \frac{1(5)-2(2)}{1} = 1 ✓.) The angle: \tan\theta = \frac{2\sqrt{1}}{1+3} = \frac12, so \theta = \tan^{-1}\frac12 \approx 26.57^{\circ}. (Direct check: slopes -1 and -\frac13, and |\frac{-1+\frac13}{1+\frac13}| = \frac{2/3}{4/3} = \frac12 ✓.)
Practise more: Mathematics question bank