Unit 6 · Units · 14 min read
Angle between Two Lines and Pair of Straight Lines
What the syllabus asks for 4
- Angle between two straight lines, parallel and perpendicular lines
- Pair of straight lines through the origin: the homogeneous equation of second degree
- Angle between the pair of lines given by a homogeneous equation
- Exercises of the SEE type
Roads cross, rafters meet, and the two edges of a ramp make an angle with the ground. In coordinate geometry we describe every such line by an equation, and the angle between two lines can be found from their slopes alone, with no protractor. This chapter first derives the formula for the angle between two lines and the conditions for lines to be parallel or perpendicular. It then shows how two lines through the origin can be written as one equation, and how to read the angle between them straight from the coefficients of that equation.
Expect (i) the angle between two given lines, or the slope of a line that makes a given angle with another line; (ii) the value of k that makes two lines parallel or perpendicular; (iii) the combined equation of two given lines through the origin, or the two lines hidden in an equation like 2x^2+7xy+3y^2=0; (iv) the angle between the pair, or the condition that the pair is perpendicular (a+b=0) or coincident (h^2=ab). Everything in the chapter depends on one fact: slope =\tan of the inclination.

6.1 Angle between two straight lines
Slope and inclination: a quick review
The inclination \theta of a line is the angle it makes with the positive direction of the x-axis, measured anticlockwise (0^\circ\le\theta<180^\circ). Its slope is
| Line | Slope formula |
|---|---|
| Through (x_1,y_1) and (x_2,y_2) | m=\dfrac{y_2-y_1}{x_2-x_1} |
| y=mx+c | m (the coefficient of x) |
| ax+by+c=0 | m=-\dfrac{a}{b} |
| Parallel to the x-axis | m=0 |
| Parallel to the y-axis | slope undefined (\theta=90^\circ) |
The angle between two lines
We want the angle \theta between two lines whose slopes m_1 and m_2 we know.
Setting up. Let the two lines meet at a point and have inclinations \theta_1 and \theta_2, with \theta_1>\theta_2. So m_1=\tan\theta_1 and m_2=\tan\theta_2. Let \theta be the angle between them.
Step 1 — relate the angles. The inclination \theta_1 is an exterior angle of the triangle formed by the two lines and the x-axis. An exterior angle equals the sum of the two opposite interior angles, so
Step 2 — take tangents. Use the formula for \tan(A-B):
Step 3 — the second angle. The two lines make two angles, \theta and 180^\circ-\theta, and \tan(180^\circ-\theta)=-\tan\theta. So the other angle has the tangent -\dfrac{m_1-m_2}{1+m_1m_2}.
Result.
What it means. The plus sign gives one of the two angles and the minus sign gives the other. If the value of \dfrac{m_1-m_2}{1+m_1m_2} is positive the angle is acute; if it is negative the angle is obtuse. Taking the positive value always gives the acute angle between the lines.
For slopes m_1 and m_2:
For lines a_1x+b_1y+c_1=0 and a_2x+b_2y+c_2=0 the slopes are -\dfrac{a_1}{b_1} and -\dfrac{a_2}{b_2}, which gives
| Condition | In slopes | In coefficients |
|---|---|---|
| Parallel (\theta=0^\circ) | m_1=m_2 | \dfrac{a_1}{a_2}=\dfrac{b_1}{b_2} |
| Perpendicular (\theta=90^\circ) | m_1m_2=-1 | a_1a_2+b_1b_2=0 |
Why does perpendicularity give m_1m_2=-1? When the lines are at 90^\circ, \tan\theta is undefined, so the denominator 1+m_1m_2 must be 0. Hence m_1m_2=-1. If m_1=m_2 the numerator is 0, so \tan\theta=0 and the lines are parallel (or the same line).
If one line is vertical (say x=3) its slope does not exist, so the formula cannot be used. A line perpendicular to it is horizontal (y=\text{constant}) and the angle with any other line is found from its inclination directly. Also, never forget the modulus when the question says "the acute angle": a negative answer for \tan\theta means you found the obtuse angle.
Problem. Find the angle between the lines y=2x+3 and y=\dfrac13x-5.
Solution. Here m_1=2 and m_2=\dfrac13.
So \theta=45^\circ. The angle between the lines is 45^\circ.
Problem. Find the acute and the obtuse angle between 2x+y-3=0 and x-3y+1=0.
Solution. For 2x+y-3=0: a_1=2,\ b_1=1, so m_1=-2. For x-3y+1=0: a_2=1,\ b_2=-3, so m_2=\dfrac13.
So the acute angle is \theta=\tan^{-1}7\approx 81.87^\circ, and the obtuse angle is 180^\circ-81.87^\circ\approx 98.13^\circ.
Problem. Find the angle at A of the triangle with vertices A(1,1), B(5,1) and C(3,5).
Solution. Slope of AB=\dfrac{1-1}{5-1}=0. Slope of AC=\dfrac{5-1}{3-1}=2.
By symmetry B\approx63.43^\circ too, so C\approx 180^\circ-2\times63.43^\circ\approx 53.13^\circ.
Problem. (a) Find k so that 3x+ky=5 is perpendicular to 2x-5y+1=0. (b) Find k so that it is parallel to it. (c) Find the line through (2,3) perpendicular to 3x-4y+5=0.
Solution. (a) Perpendicular: a_1a_2+b_1b_2=0, so 3\times2+k\times(-5)=0, giving k=\dfrac65.
(b) Parallel: \dfrac{a_1}{a_2}=\dfrac{b_1}{b_2}, so \dfrac32=\dfrac{k}{-5}, giving k=-\dfrac{15}{2}.
(c) The slope of 3x-4y+5=0 is \dfrac34. A perpendicular line has slope -\dfrac43. Its equation through (2,3) is
Check: 4(2)+3(3)-17=0. ✓
Problem. Find the equations of the two lines through (1,2) that make an angle of 45^\circ with the line x-2y+3=0.
Solution. The given line has slope \dfrac12. Let the required slope be m. Then \tan45^\circ=1, so
Case 1: m-\dfrac12=1+\dfrac m2, so \dfrac m2=\dfrac32 and m=3. Line: y-2=3(x-1), i.e. 3x-y-1=0.
Case 2: m-\dfrac12=-1-\dfrac m2, so \dfrac{3m}{2}=-\dfrac12 and m=-\dfrac13. Line: y-2=-\dfrac13(x-1), i.e. x+3y-7=0.
The two lines are 3x-y-1=0 and x+3y-7=0. (They are perpendicular, since 3\times(-\frac13)=-1: of course, because they lie 45^\circ on either side of the given line.)
(1) Write each slope, converting ax+by+c=0 to m=-a/b. (2) Write the formula with its modulus. (3) Substitute, simplifying numerator and denominator separately. (4) Give the angle in degrees, noting acute or obtuse if asked. Marks go to the slopes, the formula and the final angle.
6.2 Pair of straight lines through the origin
A homogeneous equation of the second degree
Take two lines through the origin, y-2x=0 and y-3x=0. Multiply the left sides:
A point lies on this curve if it lies on either line, so this one equation stands for both lines. Every term has degree 2 in x and y together (x^2, xy, y^2) and there is no constant or first-degree term. Such an equation is called a homogeneous equation of the second degree. Its standard form is
An equation in x and y in which every term is of degree two, ax^2+2hxy+by^2=0, represents a pair of straight lines passing through the origin (real and distinct, real and coincident, or imaginary, depending on h^2-ab).
Step 1 — divide by x^2. For x\neq0 put m=\dfrac yx, the slope of the line joining the origin to the point (x,y):
Step 2 — solve the quadratic. This quadratic in m has two roots m_1 and m_2. So every point of the curve satisfies \dfrac yx=m_1 or \dfrac yx=m_2, that is, y=m_1x or y=m_2x.
Step 3 — sum and product of roots.
Result. The equation represents the two lines y=m_1x and y=m_2x through the origin.
What it means. The roots are real and different when h^2-ab>0 (two lines), real and equal when h^2=ab (one line, counted twice) and non-real when h^2<ab (only the origin satisfies it).
Finding the combined equation
To write one equation for two lines through the origin, multiply their equations (each written as \text{expression}=0).
Problem. Find the combined equation of the lines 2x-y=0 and x+3y=0.
Solution.
The combined equation is 2x^2+5xy-3y^2=0.
Problem. Find the equation of the pair of lines through the origin with slopes 2 and -3.
Solution. The lines are y=2x and y=-3x, i.e. y-2x=0 and y+3x=0.
The pair is 6x^2-xy-y^2=0.
Separating a pair into its two lines
To split ax^2+2hxy+by^2=0 into two lines, factorise the left side into two linear factors and equate each to zero. If it does not factorise by inspection, solve bm^2+2hm+a=0 and use y=mx.
Problem. Find the separate equations of the lines given by 6x^2-5xy-6y^2=0.
Solution. Factorise: 6x^2-5xy-6y^2=(2x-3y)(3x+2y). Check: 6x^2+4xy-9xy-6y^2. ✓
So the lines are 2x-3y=0 and 3x+2y=0, with slopes \dfrac23 and -\dfrac32. Their product is -1, so the lines are perpendicular.
Problem. For what values of k does x^2+kxy+4y^2=0 represent two coincident lines?
Solution. Compare with ax^2+2hxy+by^2=0: a=1, 2h=k so h=\dfrac k2, and b=4. Coincident lines need h^2=ab:
For k=4: x^2+4xy+4y^2=(x+2y)^2=0, the single line x+2y=0 taken twice.
In ax^2+2hxy+by^2 the middle coefficient is 2h, not h. In 3x^2+8xy-5y^2 we have 2h=8, so h=4. Using h=8 is the most common slip in this chapter and ruins every later formula.
6.3 Angle between the pair of lines
Setting up. The lines are y=m_1x and y=m_2x, with m_1+m_2=-\dfrac{2h}{b} and m_1m_2=\dfrac ab.
Step 1 — difference of slopes.
so m_1-m_2=\pm\dfrac{2\sqrt{h^2-ab}}{b}.
Step 2 — the denominator. 1+m_1m_2=1+\dfrac ab=\dfrac{a+b}{b}.
Step 3 — substitute into the angle formula.
Result.
What it means. The angle depends only on a, h and b, so the lines never have to be separated. If a+b=0 the denominator is zero and \theta=90^\circ. If h^2=ab the numerator is zero and \theta=0^\circ.
For ax^2+2hxy+by^2=0:
| Condition | Meaning |
|---|---|
| h^2>ab | two distinct real lines |
| a+b=0 | the lines are perpendicular |
| h^2=ab | the lines are coincident (parallel and joined) |
| h^2<ab | no real lines |
Angle between a pair (clean answer)
Problem. Find the angle between the lines given by 2x^2+7xy+3y^2=0.
Solution. a=2, 2h=7 so h=\dfrac72, b=3.
Check by factorising: 2x^2+7xy+3y^2=(2x+y)(x+3y), slopes -2 and -\dfrac13, and \dfrac{-2+\frac13}{1+\frac23}=\dfrac{-5/3}{5/3}=-1, so again 45^\circ. ✓
Problem. Find the angle between the lines \sqrt{3}\,x^2-4xy+\sqrt{3}\,y^2=0.
Solution. a=\sqrt{3}, 2h=-4 so h=-2, b=\sqrt{3}.
So \theta=30^\circ.
Problem. Find k if the lines given by 3x^2+4xy+ky^2=0 are perpendicular to each other.
Solution. Perpendicular lines need a+b=0: 3+k=0, so k=-3.
Check: 3x^2+4xy-3y^2=0 has h=2, h^2-ab=4+9=13>0, so the lines are real and distinct. ✓
Problem. Find the equation of the pair of lines through the origin perpendicular to the pair x^2-5xy+6y^2=0.
Solution. Factorise: x^2-5xy+6y^2=(x-2y)(x-3y), so the given lines are x-2y=0 (slope \frac12) and x-3y=0 (slope \frac13).
Perpendicular slopes are -2 and -3. The lines through the origin are y=-2x and y=-3x, i.e. 2x+y=0 and 3x+y=0.
Shortcut. To get the perpendicular pair, interchange the coefficients of x^2 and y^2 and change the sign of the xy term: x^2-5xy+6y^2\to 6x^2+5xy+y^2.
Writing a, 2h and b explicitly (marks); computing h^2-ab separately; the formula with the modulus and the factor 2 in the numerator; and a final angle in degrees. For "show that the lines are perpendicular" it is enough to show a+b=0.
6.4 Exercises of the SEE type
Method for any question
- Pick the right case: two separate lines (use slopes) or one homogeneous equation (use a, h, b).
- For two lines, find m_1 and m_2; for one equation, read a, 2h and b carefully.
- Use the formula with the modulus; simplify the numerator and denominator separately.
- For conditions on k: parallel \Rightarrow m_1=m_2; perpendicular \Rightarrow m_1m_2=-1 or a+b=0; coincident \Rightarrow h^2=ab.
- State the final angle in degrees or the final equation in simplest form.
Two more SEE-type questions
Problem. Two lines through the origin make angles of 60^\circ and 120^\circ with the positive x-axis. Find their combined equation and check the angle between them.
Solution. Slopes: \tan60^\circ=\sqrt{3} and \tan120^\circ=-\sqrt{3}. Lines: y-\sqrt{3}\,x=0 and y+\sqrt{3}\,x=0.
Here a=3, h=0, b=-1, so \tan\theta=\left|\dfrac{2\sqrt{0+3}}{3-1}\right|=\sqrt{3} and \theta=60^\circ. ✓
Problem. Find k if the angle between the lines x^2+kxy+y^2=0 is 45^\circ.
Solution. a=1, h=\dfrac k2, b=1, and \tan45^\circ=1:
Chapter summary
- Slope m=\tan\theta; for ax+by+c=0, m=-\dfrac ab.
- Angle between lines of slopes m_1,m_2: \tan\theta=\left|\dfrac{m_1-m_2}{1+m_1m_2}\right|.
- For a_1x+b_1y+c_1=0 and a_2x+b_2y+c_2=0: \tan\theta=\left|\dfrac{a_1b_2-a_2b_1}{a_1a_2+b_1b_2}\right|.
- Parallel: m_1=m_2. Perpendicular: m_1m_2=-1, i.e. a_1a_2+b_1b_2=0.
- The combined equation of two lines through the origin is the product of their equations; it is ax^2+2hxy+by^2=0.
- Lines y=m_1x, y=m_2x from it: m_1+m_2=-\dfrac{2h}{b}, m_1m_2=\dfrac ab.
- Angle between the pair: \tan\theta=\left|\dfrac{2\sqrt{h^2-ab}}{a+b}\right|.
- Perpendicular if a+b=0; coincident if h^2=ab; real and distinct if h^2>ab.
Practice questions
Group A — Multiple choice (1 mark each)
- The slope of the line 3x-4y+7=0 is [1]a-\frac34b\frac34c\frac43d-\frac43
- Two lines of slopes m_1 and m_2 are perpendicular if [1]am_1=m_2bm_1+m_2=0cm_1m_2=-1dm_1m_2=1
- The equation ax^2+2hxy+by^2=0 represents two perpendicular lines if [1]ah=0ba+b=0ch^2=abda=b
- The combined equation of x-y=0 and x+y=0 is [1]ax^2+y^2=0bx^2-y^2=0cxy=0dx^2-2xy+y^2=0
- The lines given by 4x^2+12xy+9y^2=0 are [1]aperpendicularbcoincidentcdistinct and not perpendiculardimaginary
Answers to Group A
1. (b) — m=-\frac ab=-\frac{3}{-4}=\frac34.
2. (c) — the denominator 1+m_1m_2 must be zero.
3. (b) — a+b=0 makes the denominator of the angle formula zero.
4. (b) — (x-y)(x+y)=x^2-y^2.
5. (b) — 4x^2+12xy+9y^2=(2x+3y)^2; also h=6, h^2=36=ab.
Group B — Short answer (2 marks each)
- Find the angle between the lines of slopes \sqrt{3} and 0. [2]
- Find k so that the lines 2x+3y=7 and kx-6y=1 are parallel. [2]
- Find the combined equation of the lines x-2y=0 and 2x+y=0. [2]
- Find the separate lines given by x^2-y^2=0. [2]
Answers to Group B
1. \tan\theta=\left|\dfrac{\sqrt{3}-0}{1+0}\right|=\sqrt{3}, so \theta=60^\circ.
2. Parallel: \dfrac{2}{k}=\dfrac{3}{-6}, so 3k=-12 and k=-4.
3. (x-2y)(2x+y)=2x^2+xy-4xy-2y^2=2x^2-3xy-2y^2=0.
4. (x-y)(x+y)=0: the lines are x-y=0 and x+y=0.
Group C — Short answer (3 marks each)
- Find the acute angle between x+2y-5=0 and 3x-y+4=0. [3]
- Find the angle between the lines given by x^2-4xy+y^2=0. [3]
- Find the value of k if the lines kx^2+5xy-3y^2=0 are perpendicular. [3]
- Find the equation of the line through (1,-2) perpendicular to the line 2x+3y=6. [3]
Answers to Group C
1. m_1=-\frac12, m_2=3. \tan\theta=\left|\dfrac{-\frac12-3}{1-\frac32}\right|=\left|\dfrac{-\frac72}{-\frac12}\right|=7, so \theta=\tan^{-1}7\approx81.87^\circ.
2. a=1, h=-2, b=1. \tan\theta=\left|\dfrac{2\sqrt{4-1}}{2}\right|=\sqrt{3}, so \theta=60^\circ.
3. Perpendicular needs a+b=0: k-3=0, so k=3.
4. Slope of 2x+3y=6 is -\frac23; perpendicular slope \frac32. y+2=\frac32(x-1)\Rightarrow 2y+4=3x-3\Rightarrow 3x-2y-7=0. Check (1,-2): 3+4-7=0. ✓
Group D — Long answer (4 marks each)
- Find the equations of the two lines through (2,1) that make an angle of 45^\circ with the line 3x-y+2=0. [4]
- Show that the lines 3x^2+8xy-3y^2=0 are perpendicular, and find the separate equations of the lines. [4]
- Find the pair of lines through the origin perpendicular to 2x^2+5xy+3y^2=0. [4]
- The vertices of a triangle are P(0,0), Q(4,0) and R(4,3). Find the angle at P and verify that the angles of the triangle add up to 180^\circ. [4]
Answers to Group D
1. Slope of the given line =3. \left|\dfrac{m-3}{1+3m}\right|=1. Case 1: m-3=1+3m\Rightarrow m=-2; line y-1=-2(x-2), i.e. 2x+y-5=0. Case 2: m-3=-1-3m\Rightarrow4m=2\Rightarrow m=\frac12; line y-1=\frac12(x-2), i.e. x-2y=0. Lines: 2x+y-5=0 and x-2y=0.
2. a=3, b=-3, so a+b=0: the lines are perpendicular. Factorise: 3x^2+8xy-3y^2=(3x-y)(x+3y) (check: 3x^2+9xy-xy-3y^2 ✓). Lines: 3x-y=0 and x+3y=0; slopes 3 and -\frac13, product -1. ✓
3. 2x^2+5xy+3y^2=(2x+3y)(x+y): slopes -\frac23 and -1. Perpendicular slopes: \frac32 and 1. Lines: 3x-2y=0 and x-y=0. Combined: (3x-2y)(x-y)=3x^2-5xy+2y^2=0. (Shortcut check: swap a,b and flip the sign of xy.)
4. Slope of PQ=0, slope of PR=\frac34. \tan P=\frac34, P\approx36.87^\circ. Q=90^\circ (since PQ is horizontal and QR vertical). R=180^\circ-90^\circ-36.87^\circ=53.13^\circ; check with slopes of RP (\frac34) and RQ (vertical, inclination 90^\circ): inclination of RP is 36.87^\circ, so R=90^\circ-36.87^\circ=53.13^\circ. ✓ Sum: 36.87+90+53.13=180^\circ.
Practise more: Optional Mathematics question bank