9.2 Various Forms of the Equation of a Line
A line is fixed by a point and a slope, by two points, by its slope and $y$-intercept, or by its two intercepts โ and each way of fixing it gives a form of its equation: $y-y_1=m(x-x_1)$, $y=mx+c$, $\dfrac xa+\dfrac yb=1$.
Water freezes at $0^\circ\text{C}$, which is $32^\circ\text{F}$, and boils at $100^\circ\text{C}$, which is $212^\circ\text{F}$. Both scales are evenly spaced, so if you plot every temperature as a point $(C,F)$ the points lie on one straight line โ and two points are enough to fix a line. From those two facts alone you can find the rule that converts any temperature, the reading of a fever of $37^\circ\text{C}$ in Fahrenheit, and the one temperature that reads the same on both scales. All that is needed is the equation of the line through two given points.
In Section 9.1 we described a line by its slope. Now we describe it completely, by an equation in $x$ and $y$ that its points satisfy and no other points do. There are several standard forms, one for each common way of fixing a line: by a point and a slope, by two points, by the slope and the point where it crosses the $y$-axis, or by the two points where it crosses the axes. You will learn each form, why it is true, and how to choose the quickest one for the information you are given.
Equations of Lines; Horizontal and Vertical Lines
An equation of a line $L$ is an equation in $x$ and $y$ such that a point $(x,y)$ lies on $L$ if and only if its coordinates satisfy the equation. So every point of $L$ satisfies it, and no point off $L$ does.
Both halves matter. The equation $y=2x$ is satisfied by $(1,2)$, so $(1,2)$ is on that line; it is not satisfied by $(2,1)$, so $(2,1)$ is not. To test whether a point lies on a line, substitute its coordinates.
The horizontal line through $(x_1,y_1)$ โ the line parallel to the $x$-axis โ has equation $$y=y_1,$$ and the vertical line through $(x_1,y_1)$ โ parallel to the $y$-axis โ has equation $$x=x_1.$$ In particular the $x$-axis is $y=0$ and the $y$-axis is $x=0$.
Reason. Every point of the horizontal line is at the same height as $(x_1,y_1)$, so it has $y$-coordinate $y_1$, whatever its $x$-coordinate; and any point with $y$-coordinate $y_1$ is on that line. The vertical case is the same with the roles of $x$ and $y$ swapped. $\blacksquare$
(b) Find the equation of the line parallel to the $y$-axis and $4$ units to the right of it, and of the line parallel to the $x$-axis and $5$ units below it.
The Point-Slope and Two-Point Forms
Through a given point there is exactly one line with a given inclination, hence exactly one non-vertical line with a given slope. Its equation comes straight from the slope formula.
The line through $P(x_1,y_1)$ with slope $m$ has equation $$y-y_1=m(x-x_1).$$
Proof. Call the line $L$, and let $Q(x,y)$ be any point other than $P$. If $Q$ is on $L$, then $Q$ is not directly above or below $P$ (that would make $L$ vertical), so $x\ne x_1$, and by Theorem 9.1 the slope of $PQ$ is $\dfrac{y-y_1}{x-x_1}=m$; multiplying by $x-x_1$ gives $y-y_1=m(x-x_1)$. Conversely, if $Q$ satisfies $y-y_1=m(x-x_1)$ then $x\ne x_1$ (otherwise $y=y_1$ too and $Q=P$), so $PQ$ has slope $m$; the line $PQ$ passes through $P$ with slope $m$, so it is $L$, and $Q$ lies on $L$. Finally $P$ itself satisfies the equation ($0=m\cdot0$). $\blacksquare$
The line through $P(x_1,y_1)$ and $Q(x_2,y_2)$, where $x_1\ne x_2$, has equation $$y-y_1=\dfrac{y_2-y_1}{x_2-x_1}\,(x-x_1).$$ (If $x_1=x_2$, the line is the vertical line $x=x_1$.)
Proof. By Theorem 9.1 the line has slope $m=\dfrac{y_2-y_1}{x_2-x_1}$; now use the point-slope form at $P$. $\blacksquare$
(b) Find the equation of the line through $(1,-1)$ and $(3,5)$. Does $(-1,-7)$ lie on it?
The Slope-Intercept Form
If a line meets the $x$-axis at $(a,0)$, the number $a$ is its $x$-intercept; if it meets the $y$-axis at $(0,b)$, the number $b$ is its $y$-intercept. Intercepts are signed numbers, not lengths: a line crossing the $y$-axis at $(0,-3)$ has $y$-intercept $-3$.
(i) The line with slope $m$ and $y$-intercept $c$ has equation $$y=mx+c.$$ (ii) The line with slope $m$ and $x$-intercept $d$ has equation $$y=m(x-d).$$ (iii) Conversely, for any real numbers $m$ and $c$, the equation $y=mx+c$ is the equation of the line with slope $m$ and $y$-intercept $c$.
Proof. (i) The line passes through $(0,c)$ with slope $m$, so by Theorem 9.6 its equation is $y-c=m(x-0)$, i.e. $y=mx+c$. (ii) Similarly through $(d,0)$: $y-0=m(x-d)$. (iii) The line with slope $m$ and $y$-intercept $c$ has equation $y=mx+c$ by (i), so the points satisfying $y=mx+c$ are exactly the points of that line. $\blacksquare$
Part (iii) is how you read a line: make $y$ the subject, and the coefficient of $x$ is the slope and the constant is the $y$-intercept. For example $3x-4y+12=0$ gives $4y=3x+12$, $y=\tfrac34x+3$: slope $\tfrac34$, $y$-intercept $3$. Every non-vertical line can be written as $y=mx+c$; a vertical line $x=x_1$ cannot, because it has no slope.
(b) Find the equation of the line with inclination $60^\circ$ that meets the $x$-axis at $(2,0)$.
(c) Find the slope and both intercepts of the line $3x-4y+12=0$, and use them to sketch it.
The Intercept Form
The line with $x$-intercept $a$ and $y$-intercept $b$, where $a\ne0$ and $b\ne0$, has equation $$\dfrac xa+\dfrac yb=1.$$
Proof. The line passes through $(a,0)$ and $(0,b)$, and $a\ne0$, so by the two-point form $$y-0=\dfrac{b-0}{0-a}(x-a),\quad\text{i.e.}\quad ay=-bx+ab.$$ So $bx+ay=ab$, and dividing by $ab\ne0$ gives $\dfrac xa+\dfrac yb=1$. $\blacksquare$
The intercept form is the quickest way to sketch a line โ the intercepts are written in the equation โ and the natural form whenever a problem talks about where a line cuts the axes. It needs both intercepts to be non-zero: it cannot describe a line through the origin, or a line parallel to an axis.
(b) Find the equation of the line through $(2,3)$ whose two intercepts are equal and non-zero.
(c) The segment of a line between the axes is bisected at $(2,3)$. Find the line, and the area of the triangle it makes with the axes.
- A point and a slope (or an inclination, or "parallel/perpendicular to a given line" โ which gives the slope): point-slope form.
- Two points: find the slope, then point-slope form (this is the two-point form). Check with the second point.
- The slope and the $y$-intercept, or a question asking for the slope of a given line: slope-intercept form.
- Where the line cuts the axes (intercepts, their sum, a mid-point of the segment between the axes, the triangle with the axes): intercept form.
- Parallel to an axis: $x=x_1$ or $y=y_1$ โ the slope-based forms cannot give a vertical line.
1. Sign slips with negative coordinates. Through $(-3,-2)$: $y-(-2)=m(x-(-3))$, i.e. $y+2=m(x+3)$ โ not $y-2=m(x-3)$.
2. Reading the slope before making $y$ the subject. In $2x+3y=6$ the slope is not $2$ or $3$: $y=-\tfrac23x+2$, so $m=-\tfrac23$.
3. Intercept form with the wrong number on the right. $\dfrac x3+\dfrac y2=1$ has intercepts $3$ and $2$; the equation $2x+3y=6$ is the same line, but $2x+3y=1$ is not. Always get "$=1$" before reading off intercepts.
4. Treating an intercept as a length. Intercepts are signed: $\dfrac x{-3}+\dfrac y2=1$ meets the $x$-axis at $(-3,0)$. Lengths (for areas) are $|a|$ and $|b|$.
5. Forgetting the vertical line. "The line through $(2,5)$ and $(2,-1)$" is $x=2$. It has no slope and no $y=mx+c$ form; trying the two-point form divides by zero.
The general equation of a line and its normal form are taught and tested in school, but not in the year-end board exam; JEE Main and JEE Advanced both list the equation of a line in its various forms, which includes these.
The general equation. Every form in this section rearranges to $$Ax+By+C=0\qquad(A,\ B\text{ not both }0),$$ and every such equation is a line. To read it: if $B\ne0$, then $y=-\tfrac ABx-\tfrac CB$, so the slope is $-\tfrac AB$ and the $y$-intercept is $-\tfrac CB$; if $B=0$ the line is vertical, $x=-\tfrac CA$. If $A$, $B$, $C$ are all non-zero, $\dfrac{x}{-C/A}+\dfrac{y}{-C/B}=1$ is its intercept form.
The normal form. Drop the perpendicular $OM$ from the origin to the line. If $OM$ has length $p\ge0$ and makes the angle $\omega$ with the positive $x$-axis, then $M=(p\cos\omega,\,p\sin\omega)$ and the line is $$x\cos\omega+y\sin\omega=p.$$ Why: when $\sin\omega\ne0$, $OM$ has slope $\tan\omega$, so the line has slope $-\tfrac{\cos\omega}{\sin\omega}$; the point-slope form through $M$ is $y-p\sin\omega=-\tfrac{\cos\omega}{\sin\omega}(x-p\cos\omega)$, and multiplying by $\sin\omega$ and using $\sin^2\omega+\cos^2\omega=1$ gives $x\cos\omega+y\sin\omega=p$. (When $\sin\omega=0$ the line is vertical, $x=\pm p$, which the formula also gives.)
From general to normal form. Write $Ax+By=-C$ and divide by $\sqrt{A^2+B^2}$, with the sign chosen so that the right-hand side is not negative. Then $\cos\omega$ and $\sin\omega$ are the coefficients of $x$ and $y$, and $p=\dfrac{|C|}{\sqrt{A^2+B^2}}$ โ the distance of the origin from the line, as Section 9.3 will confirm.
Worked example 1. Reduce $\sqrt3\,x+y-8=0$ to normal form, and find its slope and intercepts.
Solution. $\sqrt3\,x+y=8$ and $\sqrt{3+1}=2$, so $\tfrac{\sqrt3}{2}x+\tfrac12y=4$. Then $\cos\omega=\tfrac{\sqrt3}2$, $\sin\omega=\tfrac12$: $\omega=30^\circ$, $p=4$, i.e. $x\cos30^\circ+y\sin30^\circ=4$. Slope $-\tfrac AB=-\sqrt3$; intercepts $\tfrac{8}{\sqrt3}$ on the $x$-axis and $8$ on the $y$-axis. Check: $M=(4\cos30^\circ,4\sin30^\circ)=(2\sqrt3,2)$ lies on the line, since $\sqrt3\cdot2\sqrt3+2-8=0$ โ.
Worked example 2. Reduce $x-y+4=0$ to normal form.
Solution. $x-y=-4$ has a negative right side, so divide by $-\sqrt2$: $-\tfrac1{\sqrt2}x+\tfrac1{\sqrt2}y=2\sqrt2$. Now $\cos\omega=-\tfrac1{\sqrt2}$ and $\sin\omega=\tfrac1{\sqrt2}$, so $\omega=135^\circ$ and $p=2\sqrt2$: $x\cos135^\circ+y\sin135^\circ=2\sqrt2$. Check: $\tfrac{|4|}{\sqrt{1+1}}=2\sqrt2$ โ, and the foot $M=(-2,2)$ satisfies $-2-2+4=0$ โ.
In JEE Advanced 2026 (lines through the point of intersection of two given lines) and JEE Main 2026 (intersection of lines, concurrence of three lines); not in the CBSE year-end exam. Both use it constantly to avoid finding intersection points.
Lines through the intersection of two lines. Write two intersecting lines as $L_1\equiv a_1x+b_1y+c_1=0$ and $L_2\equiv a_2x+b_2y+c_2=0$. For each number $\lambda$, the equation $$L_1+\lambda L_2=0$$ is a line (it is of the first degree in $x$, $y$ unless the $x$ and $y$ terms cancel), and it passes through the intersection point of $L_1$ and $L_2$, because there $L_1=0$ and $L_2=0$. Choosing $\lambda$ to meet one more condition picks out the required line. Three lines are concurrent (pass through one point) exactly when the third passes through the intersection of the other two.
Worked example. Find the line through the intersection of $x+y-5=0$ and $2x-y-1=0$ that passes through $(1,-1)$.
Solution. Take $(x+y-5)+\lambda(2x-y-1)=0$. At $(1,-1)$: $(1-1-5)+\lambda(2+1-1)=0$, so $-5+2\lambda=0$, $\lambda=\tfrac52$. Multiply through by $2$: $2(x+y-5)+5(2x-y-1)=0$, i.e. $12x-3y-15=0$, or $4x-y-5=0$. Check: the given lines meet at $(2,3)$ (add them: $3x=6$), and $4(2)-3-5=0$ โ; also $4(1)-(-1)-5=0$ โ.
Exercises
- 1 Parallel to the $x$-axis through $(-3,5)$.
- 2 Parallel to the $y$-axis through $(-3,5)$.
- 3 Through the origin with slope $-2$.
- 4 Through $(4,-2)$ with slope $\tfrac34$.
- 5 Through $(-1,2)$ with inclination $135^\circ$.
- 6 Through $(2,-3)$ and $(-4,6)$.
- 7 Through $(1,1)$ and $(1,-4)$.
- 8 With slope $2$ and $y$-intercept $-3$.
- 9 With slope $-\tfrac13$ and $x$-intercept $4$.
- 1 Find the slope and $y$-intercept of $2x+3y=6$.
- 2 Write $2x+3y=6$ in intercept form and read off its intercepts.
- 3 Find the intercepts of $4x-5y+20=0$.
- 4 Find the slope and $y$-intercept of $x=7y+1$.
- 5 Does the point $(3,-1)$ lie on the line $2x-5y=11$?
- 6 The point $(k,4)$ lies on the line through $(1,2)$ and $(3,5)$. Find $k$.
- 7 Show that the lines $y=3x-2$ and $6x-2y+7=0$ are parallel and distinct.
- 1 Find the line with intercepts $3$ and $-4$ on the $x$- and $y$-axes.
- 2 Find the line through $(3,4)$ with equal non-zero intercepts.
- 3 Find the line through $(3,4)$ whose intercepts are equal in size but opposite in sign.
- 4 Find the line through $(2,1)$ whose $x$-intercept is twice its $y$-intercept (both non-zero).
- 5 The part of a line between the axes has mid-point $(3,-2)$. Find the line.
- 6 Find the area of the triangle that the line $3x+4y=12$ forms with the coordinate axes.
- 7 A line through $(2,2)$ cuts the positive $x$- and $y$-axes and forms with them a triangle of area $9$ square units. Find all such lines.
- 1 Find the perpendicular bisector of the segment joining $(1,3)$ and $(5,-1)$.
- 2 Find the line through $(2,-1)$ perpendicular to $y=2x+5$.
- 3 Find the line through $(-3,2)$ parallel to $4x-3y+1=0$.
- 4 In the triangle $A(-2,0)$, $B(4,2)$, $C(1,5)$, find the altitude from $C$.
- 5 In the same triangle, find the median from $C$.
- 6 A cab company's fare is a linear function of the distance travelled. A $3\ \text{km}$ ride costs $\text{โน}\,70$ and a $7\ \text{km}$ ride costs $\text{โน}\,142$. Find the fare $F$ for a ride of $d$ km, the fare for $10\ \text{km}$, and the meaning of the constant term.
- 7 A spring is $25\ \text{cm}$ long when a $1\ \text{kg}$ mass hangs from it and $31\ \text{cm}$ long with $4\ \text{kg}$. Assuming the length is linear in the mass, find the natural (unloaded) length and the mass that stretches it to $40\ \text{cm}$.
- 8 A machine bought for $\text{โน}\,6$ lakh is valued at $\text{โน}\,4.2$ lakh after $3$ years, its value falling linearly with time. Find the value $V$ (in lakh) after $t$ years, and when the value reaches zero.
- 1 Reduce $3x-4y+10=0$ to slope-intercept form and to intercept form.
- 2 Reduce $x+\sqrt3\,y-6=0$ to normal form; find $p$ and $\omega$.
- 3 Reduce $x-y=4$ to normal form; find $p$ and $\omega$ (with $0^\circ\le\omega\lt360^\circ$).
- 4 Find the line whose perpendicular from the origin has length $5$ and makes the angle $135^\circ$ with the positive $x$-axis.
- 5 Use the normal form to find the distance of the origin from $3x+4y+15=0$, and the foot of the perpendicular.
How this is examined: Board papers ask for the equation of a line from a point and a slope, from two points or from intercepts (1โ2 marks), and for medians, altitudes and perpendicular bisectors of a triangle (3โ5 marks); case studies set up a linear model from two data points. JEE adds intercept conditions that lead to quadratics and asks which of several lines satisfy all the conditions.
E1. Board ยท 1 mark The $x$- and $y$-intercepts of the line $3x-2y+6=0$ are (A) $-2$ and $3$ (B) $2$ and $-3$ (C) $3$ and $-2$ (D) $-3$ and $2$
E2. Board ยท 2 marks Find the equation of the line through $(-2,5)$ parallel to the line joining $(1,1)$ and $(4,-5)$.
E3. Board ยท 3 marks The vertices of a triangle are $A(2,5)$, $B(-4,-1)$ and $C(6,1)$. Find the equations of the median and the altitude through $A$.
E4. Board ยท Case study A temperature sensor in a weather station gives an output voltage $V$ (in volts) that is linear in the temperature $T$ (in $^\circ\text{C}$). It reads $0.50\ \text{V}$ at $20^\circ\text{C}$ and $0.80\ \text{V}$ at $80^\circ\text{C}$. (i) Find $V$ in terms of $T$. (1 mark) (ii) What voltage does it give at $50^\circ\text{C}$? (1 mark) (iii) What temperature corresponds to $1.00\ \text{V}$, and what does the $V$-intercept of the line mean? (2 marks)
E5. JEE Main A line through $(2,3)$ meets the axes at $A$ and $B$, and $(2,3)$ is the mid-point of $AB$. The equation of the line is (A) $3x+2y=12$ (B) $2x+3y=13$ (C) $3x-2y=0$ (D) $x+y=5$
E6. JEE Advanced One or more options correct. A line passes through $(1,2)$ and the sum of its intercepts on the axes is $6$. The line can be (A) $2x+y=4$ (B) $x+y=3$ (C) $x+2y=5$ (D) $4x+y=6$
Research question. Does your phone charge at a steady rate โ is battery percentage a linear function of time โ and can a two-point line predict when it will reach $80\%$?
Why it matters. Engineers, economists and scientists constantly fit straight lines to data and use them to predict: fuel use against distance, sales against price, sensor voltage against temperature. The two-point form is the simplest such model. Knowing where a straight-line model works and where it fails is just as important as the model itself โ phone batteries are a good example, because charging deliberately slows down near full.
What to do.
- Start charging a phone at around $20\%$. Every $5$ minutes for about $45$ minutes, record the time $t$ (minutes) and the battery percentage $p$.
- Plot the points $(t,p)$ on squared paper or in a spreadsheet.
- Choose two of your early readings and find the line through them with the two-point form, $p-p_1=\dfrac{p_2-p_1}{t_2-t_1}(t-t_1)$. Interpret the slope (percentage points per minute).
- Use your line to predict when the phone reaches $80\%$, then keep charging and record when it actually does.
- Compare: where do the data points leave your line? Repeat with two different starting points and see how much the prediction changes.
Tools: A phone and charger, a clock or timer, squared paper or a spreadsheet
Hand in: Your table and graph with the fitted line drawn, the equation and the meaning of its slope, your prediction and the actual time, and a paragraph on when the linear model is good and when it is not.
Going further. Use a spreadsheet's trend-line (least squares) tool and compare its slope with your two-point slope. Why is a line through all the data better than a line through two chosen points?
๐งช Self-check quiz
Q1. The line through $(1,-3)$ with slope $2$ is
Q2. The slope and $y$-intercept of $3x+y=7$ are
Q3. The line with $x$-intercept $2$ and $y$-intercept $-5$ is
Q4. The line through $(-4,7)$ parallel to the $y$-axis is
Q5. Which line passes through both $(2,-1)$ and $(-1,5)$?