9.1 Slope of a Line and the Angle between Two Lines
The slope of a line, $m=\tan\theta=\dfrac{y_2-y_1}{x_2-x_1}$, measures its steepness. Parallel lines share a slope, perpendicular slopes multiply to $-1$, and $\tan\theta=\left|\dfrac{m_2-m_1}{1+m_1m_2}\right|$ gives the angle between two lines.
A school is building a wheelchair ramp up to a doorway $0.5\ \text{m}$ above the ground, and the guideline says the ramp must be no steeper than "$1$ in $12$". How long must the ramp be along the ground, and what angle will it make with the ground? To answer, we need a single number that measures steepness โ how much a line rises for each unit it runs horizontally. That number is the slope. A $1$ in $12$ ramp has slope $\tfrac1{12}$, so it needs at least $12\times0.5=6\ \text{m}$ of horizontal run, and it makes an angle of only about $4.8^\circ$ with the ground.
In this section we define the angle a line makes with the $x$-axis (its inclination) and its slope, and prove that the slope can be read straight from the coordinates of any two points on the line. Slopes then answer three geometric questions with simple algebra: are two lines parallel? are they perpendicular? and, if neither, at what angle do they cross? We start with a quick recall of the two Class 10 formulae that the whole chapter uses.
A Quick Recall: Distance and Section Formulae
Points of the plane are described by ordered pairs $(x,y)$ (Section 2.1). From Class 10 Mathematics (Chapter 7, Coordinate Geometry) you know two formulae for points $P(x_1,y_1)$ and $Q(x_2,y_2)$:
Distance. $$PQ=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.$$ It is Pythagoras' theorem in the right triangle whose legs are the horizontal and vertical gaps $|x_2-x_1|$ and $|y_2-y_1|$.
Section formula. The point $R$ that divides $PQ$ internally in the ratio $p:q$ (so $PR:RQ=p:q$, with $p,q\gt0$) is $$R\left(\dfrac{px_2+qx_1}{p+q},\ \dfrac{py_2+qy_1}{p+q}\right).$$ (Class 10 often writes the ratio as $m_1:m_2$; we use $p:q$ because in this chapter $m$ stands for a slope.)
Mid-point. Taking $p=q$: the mid-point of $PQ$ is $\left(\dfrac{x_1+x_2}{2},\ \dfrac{y_1+y_2}{2}\right)$.
Inclination and Slope of a Line
The inclination of a line is the angle $\theta$ that the line makes with the positive direction of the $x$-axis, measured anticlockwise (from the $x$-axis round to the line). It always satisfies $$0^\circ\le\theta\lt180^\circ.$$ Lines parallel to the $x$-axis (including the $x$-axis itself) have inclination $0^\circ$; lines parallel to the $y$-axis have inclination $90^\circ$.
If a line has inclination $\theta\ne90^\circ$, its slope (or gradient) is $$m=\tan\theta.$$ A vertical line ($\theta=90^\circ$) has no slope: $\tan90^\circ$ is not defined. A horizontal line has slope $\tan0^\circ=0$.
The tangent of an obtuse angle is negative ($\tan(180^\circ-\alpha)=-\tan\alpha$, Section 3.2), so a line with an obtuse inclination has a negative slope. Because $\tan$ takes every real value exactly once on $0^\circ\le\theta\lt180^\circ$, $\theta\ne90^\circ$, each real number is the slope of lines of exactly one inclination.
Let a line pass through two points $P(x_1,y_1)$ and $Q(x_2,y_2)$ with $x_1\ne x_2$. Then its slope is $$m=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{\text{rise}}{\text{run}}.$$ If $x_1=x_2$ (and $P\ne Q$), the line is vertical and has no slope.
Proof. The expression does not change if $P$ and $Q$ are swapped (numerator and denominator both change sign), so we may label the points with $x_1\lt x_2$. Let $R(x_2,y_1)$ be the point level with $P$ and directly below or above $Q$; then $PR=x_2-x_1\gt0$ and $PR$ is parallel to the $x$-axis.
Case 1: $y_2\gt y_1$ (the line rises to the right). The line meets the $x$-axis and $PR$ at equal corresponding angles, so $\angle QPR=\theta$, which is acute. In the right triangle $PRQ$, $\tan\theta=\dfrac{RQ}{PR}=\dfrac{y_2-y_1}{x_2-x_1}$.
Case 2: $y_2\lt y_1$ (the line falls to the right). Now $\theta$ is obtuse and $\angle QPR=180^\circ-\theta$, so $\tan(180^\circ-\theta)=\dfrac{RQ}{PR}=\dfrac{y_1-y_2}{x_2-x_1}$. Since $\tan\theta=-\tan(180^\circ-\theta)$, again $\tan\theta=\dfrac{y_2-y_1}{x_2-x_1}$.
Case 3: $y_2=y_1$. The line is horizontal, $\theta=0^\circ$, and both sides are $0$.
Finally, if $x_1=x_2$ both points lie on one vertical line, whose inclination is $90^\circ$. $\blacksquare$
So the slope is the same whichever two points of the line you use โ it is the rise per unit run, everywhere along the line. Its sign and size tell you how the line looks:
| slope | inclination | the lineโฆ |
|---|---|---|
| $m\gt0$ | acute, $0^\circ\lt\theta\lt90^\circ$ | rises from left to right |
| $m\lt0$ | obtuse, $90^\circ\lt\theta\lt180^\circ$ | falls from left to right |
| $m=0$ | $\theta=0^\circ$ | is horizontal |
| not defined | $\theta=90^\circ$ | is vertical |
The larger $|m|$ is, the steeper the line: slope $5$ climbs five units for every unit across, slope $\tfrac15$ only one unit for every five across.
(b) Find the slope of the line through $(-2,5)$ and $(-2,-1)$.
(c) Find the slope of a line with inclination $120^\circ$, and the inclination of a line with slope $\tfrac{1}{\sqrt3}$.
(d) A ramp rises $0.5\ \text{m}$ over a horizontal run of $6\ \text{m}$. Find its slope and the angle it makes with the ground.
(b) For which $k$ does the line through $(k,-1)$ and $(3,k)$ have inclination $45^\circ$? Is there a $k$ giving inclination $135^\circ$?
Parallel and Perpendicular Lines
Two lines are parallel exactly when they make equal corresponding angles with the $x$-axis, that is, when they have equal inclinations. Since equal inclinations (other than $90^\circ$) mean equal tangents, slopes give an instant test.
Two non-vertical lines with slopes $m_1$ and $m_2$ are parallel (or are the same line) if and only if $$m_1=m_2.$$ Any two vertical lines are parallel.
Proof. Let the inclinations be $\theta_1,\theta_2$, both in $[0^\circ,180^\circ)$ and not $90^\circ$. The lines are parallel exactly when $\theta_1=\theta_2$ (corresponding angles with the $x$-axis). On this range $\tan$ never takes the same value twice, so $\theta_1=\theta_2$ exactly when $\tan\theta_1=\tan\theta_2$, i.e. $m_1=m_2$. $\blacksquare$
Two non-vertical lines with slopes $m_1$ and $m_2$ are perpendicular if and only if $$m_1m_2=-1,\quad\text{that is,}\quad m_2=-\dfrac{1}{m_1}.$$ (A horizontal line, slope $0$, is perpendicular to every vertical line, which has no slope; the formula does not cover that pair.)
Proof. Neither line is vertical, and if they are perpendicular neither can be horizontal (its partner would be vertical). So the inclinations are not $0^\circ$ or $90^\circ$. Label the lines so that $\theta_1\lt\theta_2$.
($\Rightarrow$) If the lines are perpendicular, the angle of the triangle they form with the $x$-axis gives $\theta_2=\theta_1+90^\circ$ (an exterior angle equals the sum of the two interior opposite angles, one of which is the right angle). Then $$m_2=\tan(90^\circ+\theta_1)=-\cot\theta_1=-\dfrac1{\tan\theta_1}=-\dfrac1{m_1},$$ using the allied-angle formula from Section 3.3. So $m_1m_2=-1$.
($\Leftarrow$) If $m_1m_2=-1$, the slopes have opposite signs, so one inclination is acute and the other obtuse; with our labelling $0^\circ\lt\theta_1\lt90^\circ\lt\theta_2\lt180^\circ$. Now $\tan\theta_2=-\dfrac1{\tan\theta_1}=\tan(90^\circ+\theta_1)$, and both $\theta_2$ and $90^\circ+\theta_1$ lie between $90^\circ$ and $180^\circ$, where $\tan$ never repeats a value. Hence $\theta_2=\theta_1+90^\circ$ and the lines are perpendicular. $\blacksquare$
In practice: to get a perpendicular slope, flip the fraction and change its sign. Perpendicular to slope $\tfrac23$ is slope $-\tfrac32$; perpendicular to slope $-4$ is slope $\tfrac14$.
(b) The line through $(-3,5)$ and $(3,7)$ is perpendicular to the line through $(6,10)$ and $(x,22)$. Find $x$.
(c) Find $y$ if the line through $(-1,y)$ and $(2,-4)$ is parallel to the line through $(0,1)$ and $(4,-7)$.
The Angle between Two Lines
Two lines that cross make two angles at the crossing point, $\phi$ and $180^\circ-\phi$ (vertically opposite angles repeat them). Unless the lines are perpendicular, one angle is acute and the other obtuse, and "the angle between the lines" usually means the acute one. Slopes give it directly.
Let two non-vertical lines have slopes $m_1$ and $m_2$, with $1+m_1m_2\ne0$. Then the acute angle $\theta$ between them satisfies $$\tan\theta=\left|\dfrac{m_2-m_1}{1+m_1m_2}\right|,$$ and the obtuse angle between them is $180^\circ-\theta$. If $1+m_1m_2=0$ the lines are perpendicular (Theorem 9.3); if $m_1=m_2$ they are parallel and $\theta=0^\circ$.
Proof. Let the inclinations be $\alpha_1$ and $\alpha_2$, so $m_1=\tan\alpha_1$, $m_2=\tan\alpha_2$. Turning the first line through the angle $\alpha_2-\alpha_1$ brings it parallel to the second, so the two angles between the lines are $|\alpha_2-\alpha_1|$ and $180^\circ-|\alpha_2-\alpha_1|$. By the difference formula of Section 3.3 (valid because $\alpha_1,\alpha_2\ne90^\circ$ and, as $1+m_1m_2\ne0$, $\alpha_2-\alpha_1\ne\pm90^\circ$), $$\tan(\alpha_2-\alpha_1)=\dfrac{\tan\alpha_2-\tan\alpha_1}{1+\tan\alpha_1\tan\alpha_2}=\dfrac{m_2-m_1}{1+m_1m_2}.$$ Since $\tan(-x)=-\tan x$ and $\tan(180^\circ-x)=-\tan x$, the two angles between the lines have tangents $\pm\dfrac{m_2-m_1}{1+m_1m_2}$. The acute one has the positive tangent, which is the absolute value. $\blacksquare$
- Find both slopes. If one line is vertical, the formula does not apply: work with inclinations instead (the angle is $|90^\circ-\alpha|$ where $\alpha$ is the other line's inclination).
- If $1+m_1m_2=0$, stop: the lines are perpendicular.
- Otherwise compute $\left|\dfrac{m_2-m_1}{1+m_1m_2}\right|$ and take $\tan^{-1}$ for the acute angle. Give the obtuse angle as $180^\circ-\theta$ if it is asked for.
- When the angle is given and a slope is unknown, remove the modulus by writing $\dfrac{m_2-m_1}{1+m_1m_2}=\pm\tan\theta$ and solve both equations โ there are usually two answers.
1. Mixing the order of the points. $\dfrac{y_2-y_1}{x_2-x_1}$ is right and so is $\dfrac{y_1-y_2}{x_1-x_2}$, but $\dfrac{y_2-y_1}{x_1-x_2}$ has the wrong sign. Take both differences in the same order.
2. "Run over rise". Slope is change in $y$ divided by change in $x$, never the other way round.
3. A vertical line has slope $0$. No: a horizontal line has slope $0$; a vertical line has no slope at all.
4. Perpendicular slope $=-m$ or $\tfrac1m$. You need both steps: the negative reciprocal, $-\tfrac1m$. Check that the product is $-1$.
5. Dropping the modulus โ or keeping it when solving. The formula with $|\ |$ gives the acute angle. When the angle is known and a slope is unknown, the modulus hides two equations; solving only one loses an answer.
6. Using the angle formula when $1+m_1m_2=0$. The fraction is undefined โ and that is the signal that the lines are perpendicular, not an error.
In JEE Main and JEE Advanced 2026 (both list the centroid, orthocentre and circumcentre of a triangle); not in the CBSE year-end exam. Both often ask for the special points of a triangle, and slopes find them quickly.
Centroid, orthocentre and circumcentre. For a triangle $ABC$: the centroid $G$ (where the medians meet) is $\left(\dfrac{x_1+x_2+x_3}{3},\dfrac{y_1+y_2+y_3}{3}\right)$; the orthocentre $H$ is where the altitudes meet, so $AH\perp BC$ and $BH\perp CA$; the circumcentre $O$ is equidistant from $A$, $B$, $C$. For every triangle, $G$ lies on the segment $HO$ with $HG:GO=2:1$ (the Euler line).
Worked example. Find $G$, $H$ and $O$ for $A(0,0)$, $B(6,0)$, $C(2,4)$, and check the $2:1$ property.
Solution. $G=\left(\tfrac83,\tfrac43\right)$. Let $H=(h,k)$. $m_{BC}=\tfrac{4}{2-6}=-1$, so $m_{AH}=1$: $\tfrac kh=1$, $k=h$. $m_{CA}=2$, so $m_{BH}=-\tfrac12$: $\tfrac{k}{h-6}=-\tfrac12$, $2k=6-h$. With $k=h$: $h=k=2$, so $H=(2,2)$. For $O=(a,b)$: $OA=OB$ gives $a=3$; $OA=OC$ gives $9+b^2=1+(b-4)^2$, so $8b=8$, $b=1$: $O=(3,1)$. Check: the point dividing $HO$ in the ratio $2:1$ is $\left(\tfrac{2\cdot3+1\cdot2}{3},\tfrac{2\cdot1+1\cdot2}{3}\right)=\left(\tfrac83,\tfrac43\right)=G$ โ.
Exercises
- 1 Find the distance between $(-3,4)$ and $(5,-2)$.
- 2 Find the mid-point of the segment joining $(-3,4)$ and $(5,-2)$.
- 3 Find the point dividing the join of $(2,-1)$ and $(8,5)$ internally in the ratio $2:1$.
- 4 Find the slope of the line through $(2,3)$ and $(6,11)$.
- 5 Find the slope of the line through $(-4,1)$ and $(2,-2)$.
- 6 Find the slope, if it exists, of the line through $(3,-5)$ and $(3,7)$.
- 7 Find the slope of the line through $(-1,4)$ and $(5,4)$. What kind of line is it?
- 8 Find the slopes of lines with inclinations $60^\circ$, $150^\circ$ and $0^\circ$.
- 9 Find the inclinations of lines with slopes $-\sqrt3$ and $1$.
- 1 Find $k$ if the line through $(k,2)$ and $(5,-4)$ has slope $-\tfrac32$.
- 2 Find $a$ if the line through $(-2,a)$ and $(4,2a+3)$ has inclination $45^\circ$.
- 3 Show that the line through $(a,0)$ and $(0,b)$, where $a\ne0$, has slope $-\tfrac ba$.
- 4 A wheelchair ramp must rise $0.9\ \text{m}$ and may be no steeper than slope $\tfrac1{12}$. What is the shortest horizontal run it can have?
- 5 A railway gradient is "1 in 150" (a rise of $1\ \text{m}$ per $150\ \text{m}$ of horizontal distance). How much does the track rise over $3\ \text{km}$ of horizontal distance, and what angle does it make with the horizontal (to two decimal places of a degree)?
- 6 The cross-section of a roof has eaves at $(0,0)$ and $(8,0)$ and its ridge at $(4,3)$ (in metres). Find the slopes of the two rafters and the pitch (the angle each makes with the horizontal).
- 1 Are the line through $(2,-3)$ and $(-4,0)$ and the line through $(1,5)$ and $(3,4)$ parallel? Are they the same line?
- 2 Show that the line through $(0,0)$ and $(2,3)$ is perpendicular to the line through $(1,1)$ and $(4,-1)$.
- 3 Write the slope of a line (a) parallel (b) perpendicular to a line of slope $-\tfrac45$.
- 4 Find $x$ if the line through $(x,-1)$ and $(2,5)$ is perpendicular to a line of slope $\tfrac32$.
- 5 Find $p$ if the line through $(p,1)$ and $(2p,5)$ is parallel to the line through $(1,1)$ and $(3,3)$.
- 6 Show that $A(-2,-1)$, $B(4,0)$, $C(3,3)$, $D(-3,2)$ form a parallelogram. Is it a rectangle?
- 7 Show that the triangle with vertices $P(-2,1)$, $Q(2,3)$, $R(4,-1)$ is right-angled and isosceles.
- 8 $A(0,0)$, $B(5,0)$, $C(8,4)$, $D(3,4)$. Show that $ABCD$ is a rhombus and that its diagonals are perpendicular.
- 1 Find the acute angle between lines with slopes $1$ and $0$.
- 2 Find the acute angle between lines with slopes $\sqrt3$ and $-\sqrt3$.
- 3 Find the acute angle between lines with slopes $\tfrac12$ and $3$.
- 4 Find the angle between lines with slopes $2$ and $-\tfrac12$.
- 5 Find, to two decimal places of a degree, the acute angle between lines with slopes $2$ and $3$.
- 6 Find the slopes of the lines that make an angle of $45^\circ$ with a line of slope $4$.
- 7 The tangent of the acute angle between two lines is $\tfrac13$, and one of them has slope $2$. Find the possible slopes of the other.
- 8 Find the three angles of the triangle with vertices $A(0,0)$, $B(4,0)$, $C(1,3)$ using slopes.
- 9 Two straight roads leave a town at the origin, one towards the point $(6,2)$ and the other towards $(2,5)$ (in km). Find the angle between the roads.
How this is examined: Board papers ask for a slope or an inclination (1โ2 marks), use slopes to prove that a figure is a parallelogram, rectangle or right triangle, and find an unknown coordinate from a parallel or perpendicular condition (2โ3 marks); the angle formula appears in both directions. JEE expects the two-answer case of the angle formula and quick work with right-angle conditions.
E1. Board ยท 1 mark The slope of a line perpendicular to the line through $(1,2)$ and $(3,8)$ is (A) $3$ (B) $-3$ (C) $\tfrac13$ (D) $-\tfrac13$
E2. Board ยท 2 marks Find the inclination of the line through $(1,0)$ and $(2,-\sqrt3)$, and the slope of a line perpendicular to it.
E3. Board ยท 3 marks The triangle with vertices $A(a,4)$, $B(1,1)$ and $C(5,3)$ is right-angled at $B$. Find $a$, and then find $\tan C$.
E4. Board ยท Case study A school builds a two-part ramp. Taking the foot of the ramp as the origin and measuring in metres, the first part runs straight from $O(0,0)$ to a landing at $L(10.8,\ 0.9)$, and the second part runs back from $L$ to the door at $D(4.8,\ 1.4)$. (i) Find the slope of $OL$ and say whether it meets the "no steeper than $1$ in $12$" rule. (1 mark) (ii) Find the slope of $LD$. (1 mark) (iii) Find the acute angle between the two parts of the ramp, correct to two decimal places of a degree. (2 marks)
E5. JEE Main A line makes an angle of $45^\circ$ with the line of slope $2$. The sum of all possible values of its slope is (A) $-\tfrac83$ (B) $\tfrac83$ (C) $-3$ (D) $\tfrac13$
E6. JEE Advanced Numerical answer. The points $A(1,1)$, $B(5,3)$ and $C(k,7)$ form a right-angled triangle. Find the sum of all real values of $k$.
Research question. How steep are the ramps, staircases and slopes around your school โ and do the ramps meet the "no steeper than $1$ in $12$" accessibility guideline?
Why it matters. Slope is a safety number. A ramp that is too steep is dangerous for a wheelchair user; staircases, roads, railway lines and drainage pipes all have slope limits written into building codes, and a drain with too little slope does not empty. Engineers check these numbers with exactly the rise-over-run calculation of this section.
What to do.
- Choose at least five sloping things: a ramp, a staircase (use one step: riser height and tread depth), a sloping road or path, a slide, a roof edge you can measure safely.
- For each, measure a rise and the matching horizontal run with a tape measure (for a long ramp, hold a straight plank level with a spirit level or a phone level app and measure the gap to the ramp). Compute the slope and $\theta=\tan^{-1}m$.
- Where possible, check the angle with a phone inclinometer app and compare with your calculation.
- Draw a scale diagram of the steepest and the gentlest item on squared paper, and mark the rise-and-run triangle.
- For every ramp, decide whether it meets the $1$ in $12$ guideline; if not, compute how long a compliant ramp of the same rise would need to be.
Tools: Tape measure, a spirit level or phone level app, a calculator or spreadsheet, squared paper
Hand in: A table (item, rise, run, slope, angle, app angle), the two scale drawings, and a short paragraph recommending any ramp improvements.
Going further. Find out what slope limits are used for highways in hilly areas and for main-line railways, and express each as a slope, an angle and a "1 in $n$" figure. Why do engineers prefer "1 in $n$" or a percentage to an angle?
๐งช Self-check quiz
Q1. The slope of the line through $(2,-1)$ and $(-2,7)$ is
Q2. The inclination of a line with slope $-1$ is
Q3. Lines with slopes $\tfrac23$ and $k$ are perpendicular. Then $k$ is
Q4. The acute angle between the lines with slopes $\sqrt3$ and $\tfrac1{\sqrt3}$ is
Q5. Which line has no slope?