Careers360 Logo
Equation of Straight Line: Formula, Forms and Examples

Equation of Straight Line: Formula, Forms and Examples

Edited By Komal Miglani | Updated on Sep 12, 2024 12:55 PM IST

We know that the equation of a straight line is linear in variables $x$ and $y$. The general form of the equation of a straight line is $a x+b y+c=0$, where $a, b, c$ belongs to $R$ and at least one of $a$ and $b$ is non-zero. We have different forms of the equation of straight lines depending upon through which point/points it is passing and in which direction it is drawn.

In this article, we will cover the concept of Equation of Straight Lines. This category falls under the broader category of Coordinate Geometry, which is a crucial Chapter in class 11 Mathematics. It is not only essential for board exams but also for competitive exams like the Joint Entrance Examination(JEE Main) and other entrance exams such as SRMJEE, BITSAT, WBJEE, BCECE, and more. A total of seventeen questions have been asked on JEE MAINS( 2013 to 2023) from this topic including three in 2013, four in 2019, two in 2020, two in 2021, one in 2022, and one in 2023.

What is a Straight Line?

It is a curve such that all points on the line segment joining any two points on it lie on it.

Every equation of first degree in x , and y represents a straight line. The general equation of a straight line is given as $a x+b y+c=0$ where $a, b$, and c are real numbers and at least one of a and b is non-zero.

Equation of Straight Line in Slope-Intercept form

The equation of the straight line in slope intercept form is given by $y=m x+c$

Derivation of Equation of Straight Line in Slope-Intercept form

Consider the given figure

$A B$ is a straight line with slope $m$ and intercept $c$ on the $Y$-axis. $P(x, y)$ is any point on the straight line. PL is perpendicular to X -axis and $M \mathrm{Q}$ is perpendicular to Y -axis
$
\begin{aligned}
& \angle \mathrm{PRL}=\angle \mathrm{PQM}=\theta, \quad \mathrm{OQ}=\mathrm{c} \\
& \mathrm{PM}=\mathrm{PL}-\mathrm{ML}=\mathrm{PL}-\mathrm{OQ}=\mathrm{y}-\mathrm{c} \\
& \mathrm{QM}=\mathrm{OL}=\mathrm{x}
\end{aligned}
$
$
\text { In } \triangle \mathrm{PQM}, \tan \theta=\frac{\mathrm{PM}}{\mathrm{QM}}=\frac{\mathrm{y}-\mathrm{c}}{\mathrm{x}}
$
$
\begin{aligned}
& \tan \theta=\mathrm{m}=\frac{\mathrm{y}-\mathrm{c}}{\mathrm{x}} \\
& \Rightarrow \mathrm{y}=\mathrm{mx}+\mathrm{c}
\end{aligned}
$

The equation of a straight line whose slope is given as $m$ and making $y$-intercept of length $c$ unit is $y=m x+c$.
If the straight line passes through the origin, then the equation of the straight line becomes $y=m x$
If Equation of straight line is $\mathrm{Ax}+\mathrm{By}+\mathrm{C}=0$, then
We can write $B y=-A x-C$
$
\mathrm{y}=\left(-\frac{\mathrm{A}}{\mathrm{B}}\right) \mathrm{x}+\left(-\frac{\mathrm{C}}{\mathrm{B}}\right)
$
compare with $\mathrm{y}=\mathrm{mx}+\mathrm{c}$
$
\begin{aligned}
& \text { slope }=m=-\frac{A}{B} \\
& y-\text { intercept }=c=-\frac{C}{B}
\end{aligned}
$

Equation of Straight Line in Point-Slope form

The equation of a straight line whose slope is given as ' $m$ ' and passes through the point $\left(x_1, y_1\right)$ is $\mathbf{y}-\mathbf{y}_1=\mathbf{m}\left(\mathbf{x}-\mathbf{x}_1\right)$.

Derivation of Equation of Straight Line in Point-Slope form

Let the equation of give line I with slope ' $m$ ' is
$
y=m x+c
$
$\left(x_1, y_1\right)$ lies on the line $i$
$
\mathrm{y}_1=\mathrm{mx}_1+\mathrm{c}
$

From (i) and (ii) [(ii) - (i)]
$
\mathrm{y}-\mathrm{y}_1=\mathrm{m}\left(\mathrm{x}-\mathrm{x}_1\right)
$

The equation of a straight line whose slope is given as ' $m$ ' and passes through the point $\left(x_1, y_1\right)$ is $\mathbf{y}-\mathbf{y}_1=\mathbf{m}\left(\mathbf{x}-\mathbf{x}_1\right)$.

Equation of Straight Line in Two-point form

The equation of a straight line passing through the two given points $\left(x_1, y_1\right)$ and $\left(x_2, y_2\right)$ is given by
$
\mathbf{y}-\mathbf{y}_1=\left(\frac{\mathbf{y}_2-\mathbf{y}_1}{\mathbf{x}_2-\mathbf{x}_1}\right)\left(\mathbf{x}-\mathbf{x}_1\right)
$

Derivation of Equation of Straight Line in Two-point form

Let the equation of straight line I with slope ' $m$ ' be
$
y=m x+c
$

Points $\left(\mathrm{x}_1, \mathrm{y}_1\right)$ and $\left(\mathrm{x}_2, \mathrm{y}_2\right)$ pass through the given line I , then
$
\mathrm{y}_1=\mathrm{mx}_1+\mathrm{c}
$
$
y_2=m x_2+c
$

Subtract eq (ii) from eq (i)
$
y-y_1=m\left(x-x_1\right)
$

Subtract eq (iii) from eq (i)
$
y-y_2=m\left(x-x_2\right)
$

Divide eq (iv) by eq ( v )
$
\begin{aligned}
& \frac{\mathrm{y}-\mathrm{y}_1}{\mathrm{y}_2-\mathrm{y}_1}=\frac{\mathrm{x}-\mathrm{x}_1}{\mathrm{x}_2-\mathrm{x}_1} \\
& \Rightarrow \mathrm{y}-\mathrm{y}_1=\left(\frac{\mathrm{y}_2-\mathrm{y}_1}{\mathrm{x}_2-\mathrm{x}_1}\right)\left(\mathrm{x}-\mathrm{x}_{\mathbf{1}}\right)
\end{aligned}
$
also here $\mathrm{m}=\left(\frac{\mathrm{y}_2-\mathrm{y}_1}{\mathrm{x}_2-\mathrm{x}_1}\right)$

Area of Triangle

If $\mathrm{P}(\mathrm{x}, \mathrm{y}), \mathrm{Q}\left(\mathrm{x}_1, \mathrm{y}_1\right)$ and $\mathrm{R}\left(\mathrm{x}_2, \mathrm{y}_2\right)$ are collinear, then area of $\triangle \mathrm{PQR}=0$
i.e. $\left.\quad \frac{1}{2}\left|\begin{array}{ccc}x & y & 1 \\ x_1 & y_1 & 1 \\ x_2 & y_2 & 1\end{array}\right| \right\rvert\,=0$

Equation of Straight Line in Intercept form

The equation of a straight line which makes intercepts 'a' and 'b' on the X -axis and Y -axis respectively is given by
$
\frac{\mathrm{x}}{\mathrm{a}}+\frac{\mathrm{y}}{\mathrm{b}}=1
$

Derivation of Equation of Straight Line in Intercept form

A straight line that cuts the X -axis at $\mathrm{A}(\mathrm{a}, 0$ ) and the Y -axis at $\mathrm{B}(0, \mathrm{~b})$
Using the concept of two points form a line
Equation of a straight line through the two-point $A(a, 0)$ and $B(0, b)$
$
\begin{aligned}
& y-0=\frac{b-0}{0-a}(x-a) \\
& \Rightarrow-a y=b x-a b \\
& \Rightarrow b x+a y=a b
\end{aligned}
$
divide LHS and RHS by ab
$
\frac{x}{a}+\frac{y}{b}=1
$

Note:
For the general equation $A x+B y+C=0$
If $C \neq 0$, then $A x+B y+C=0$ can be written as
$
\begin{aligned}
& \mathrm{Ax}+\mathrm{By}=-\mathrm{C} \\
& \frac{\mathrm{x}}{-\frac{\mathrm{C}}{\mathrm{A}}}+\frac{\mathrm{y}}{-\frac{\mathrm{C}}{\mathrm{B}}}=1 \text { or } \frac{\mathrm{x}}{\mathrm{a}}+\frac{\mathrm{y}}{\mathrm{b}}=1
\end{aligned}
$
where, $a=-\frac{C}{A}$ and $b=-\frac{C}{B}$
Hence, the $x$-intercept is $-\frac{\mathrm{C}}{\mathrm{A}}$ and $y$-intercept is $-\frac{\mathrm{C}}{\mathrm{B}}$.

The normal form of a line

The equation of a straight line on which the length of the perpendicular from the origin is $p$ and this normal makes an angle $\theta$ with the positive direction of $X$-axis is given by
$
\mathbf{x} \cos \theta+\mathbf{y} \sin \theta=\mathbf{p}
$

Derivation of the normal form of a line

$A B$ is the straight line and the length of the perpendicular from the origin to the line is $p$ (i.e. $O N=p$ ).
Line $A B$ cuts $X$-axis and $Y$-axis at points $Q$ and $R$ respectively

$
\begin{aligned}
& \quad \angle \mathrm{NOX}=\theta \\
& \angle \mathrm{NQO}=90^{\circ}-\theta \\
& \therefore \angle \mathrm{NQX}=180^{\circ}-\left(90^{\circ}-\theta\right)=90^{\circ}+\theta \\
& \text { Slope } m=\tan \left(90^{\circ}+\theta\right)=-\cot (\theta) \\
& \text { In triangle } N O L \\
& O L=x=\text { p. } \cos \theta, N L=y=p \cdot \sin \theta \\
& \text { Point } N(\text { p.cos } \theta, \text { p.sin } \theta)
\end{aligned}
$

Using Slope-point form, the equation of line $A B$ is
$
\begin{aligned}
& y-p \cdot \sin \theta=-\frac{\cos \theta}{\sin \theta}(x-p \cdot \cos \theta) \\
& x \cdot \cos \theta+y \cdot \sin \theta=p
\end{aligned}
$

The parametric form of a line

The equation of a straight line passing through the point $\left(x_1, y_1\right)$ and making an angle $\theta$ with the positive direction of the $X$-axis is
$
\frac{\mathrm{x}-\mathrm{x}_1}{\cos \theta}=\frac{\mathrm{y}-\mathrm{y}_1}{\sin \theta}=\mathrm{r}
$

where r is the directed distance between the points $(\mathrm{x}, \mathrm{y})$ and $\left(\mathrm{x}_1, \mathrm{y}_1\right)$.

Derivation of the Parametric form of a line

$A B$ is a straight line passing through the point $P\left(x_1, y_1\right)$ that meets the $X$-axis at $R$ and makes an angle $\theta$ with the positive direction of the $X$-axis.

Let $Q(x, y)$ be any point on the line $A B$ at a distance ' $r$ ' from $P$
As from the figure
$
\begin{aligned}
& \mathrm{PN}=\mathrm{ML}=\mathrm{OL}-\mathrm{OM}=\mathrm{x}-\mathrm{x}_1 \\
& \mathrm{QN}=\mathrm{QL}-\mathrm{NL}=\mathrm{QL}-\mathrm{PM}=\mathrm{y}-\mathrm{y}_1 \\
& \text { In } \Delta \mathrm{NPQ} \\
& \cos \theta=\frac{\mathrm{PN}}{\mathrm{PQ}}=\frac{\mathrm{x}-\mathrm{x}_1}{\mathrm{r}} \\
& \sin \theta=\frac{\mathrm{QN}}{\mathrm{PQ}}=\frac{\mathrm{y}-\mathrm{y}_1}{\mathrm{r}}
\end{aligned}
$

From the above two equation
$
\frac{\mathrm{x}-\mathrm{x}_1}{\cos \theta}=\frac{\mathrm{y}-\mathrm{y}_1}{\sin \theta}=\mathrm{r}
$

Also,
$
\begin{aligned}
& \mathrm{x}=\mathrm{x}_1+\mathrm{r} \cos \theta \\
& \mathrm{y}=\mathrm{y}_1+\mathrm{r} \sin \theta
\end{aligned}
$

are parametric equations of straight-line AB

Equation of line parallel to the x-axis

Let the line pass through point $\mathrm{A}\left(x_1, y_1\right)$ and be parallel to the axis, i.e., horizontal.
Here, the slope of a line is zero or we can say that $\mathrm{m}=0 \mathrm{so}$, the equation of the line is $\mathrm{y}-y_1=0$ or $\mathrm{y}=y_1$
For any point on the line, the value of ordinate is, i.e., each $y_1$ point on the line is at a distance $y_{1 \mid}$ from the $x$-axis.
So the equation of locus is $\mathrm{y}=y_1$
Let the line pass through point $\mathrm{A}\left(x_1, y_1\right)$ and be parallel to the y -axis, ie., vertical.
Here, the slope of the line is infinity, ie,
So, the equation of the line is $\mathrm{x}=x_1$

Equation of line parallel or perpendicular to the given line

Let the given line be $a x+b y+c=0$
The slope of the line is $-\mathrm{a} / \mathrm{b}$ Then the slope of the line parallel to the given line is $-\mathrm{a} / \mathrm{b}$ So, the equation of the line parallel to the given line is $\mathrm{ax}+\mathrm{by}+\mathrm{c}=0$ The value of c can be obtained using some condition given in question.

Now, the slope of the line perpendicular to the given line is b/a So, the equation of the line perpendicular to the given line is $\mathrm{bx}-\mathrm{ay}+\mathrm{c}=0$

Solved Examples Based on Equation of Straight Line

Example 1: Let the equations of two adjacent sides of a parallelogram ABCD be $2 x-3 y=-23$ and $5 x+4 y=23$. If the equation of its one diagonal AC is $3 \mathrm{x}+7 \mathrm{y}=23$ and the distance of A from the other diagonal is d , then $50 \mathrm{~d}^2$ is equal to $\qquad$ [JEE MAINS 2023]

Solution

A \& C point will be $(-4,5) \&(3,2)$
midpoint of AC will be $\left(-\frac{1}{2}, \frac{7}{2}\right)$
equation of diagonal BD is
$
\begin{aligned}
& y-\frac{7}{2}=\frac{\frac{7}{2}}{-\frac{1}{2}}\left(\mathrm{x}+\frac{1}{2}\right) \\
& \Rightarrow 7 x+y=0
\end{aligned}
$

Distance of A from diagonal BD
$
\begin{aligned}
& =d=\frac{23}{\sqrt{50}} \\
& \Rightarrow \quad 50 d^2=(23)^2 \\
& 50 d^2=529
\end{aligned}
$

Hence, the answer is 529

Example 2: Let ABC be a triangle with $\mathrm{A}(-3,1)$ and $\angle A C B=\theta, 0<\theta<\frac{\pi}{2}$. If the equation of the median through B is $2 x+y-3=0$ and the equation of angle bisector of C is $7 x-4 y-1=0$, then tan $\theta$ is equal to [JEE MAINS 2021]

Solution

Let $C$ be $(p, q)$
$
\therefore E \text { is }\left(\frac{p-3}{2}, \frac{q+1}{2}\right)
$

It lies on $2 x+y-3=0$
$
\begin{aligned}
& \Rightarrow p-3+\frac{q+1}{2}-3=0 \\
& \Rightarrow 2 p+q=11---(i)
\end{aligned}
$

Also (p.q) lies on $7 x-4 y-1=0$
$
7 p-4 q-1=0-----(i i)
$

From (i) \& (ii) $\Rightarrow \mathrm{C}(3,5)$
$\therefore$ Slope of $A C=\frac{5-1}{3+3}=\frac{2}{3}_{\&}$
Slope of $C F=\frac{7}{4}$
Angle between ACandC $F=\frac{\theta}{2}$
$
\begin{aligned}
& \Rightarrow \tan \frac{\theta}{2}=\left|\frac{\frac{2}{3}-\frac{7}{4}}{1+\frac{2}{3}, \frac{7}{4}}\right| \Rightarrow \tan \frac{\theta}{2}=\frac{1}{2} \\
& \Rightarrow \tan \theta=\frac{2 \tan \frac{\theta}{2}}{1-\tan ^2 \frac{\theta}{2}}=\frac{4}{3}
\end{aligned}
$

Hence, the answer is $\frac{4}{3}$

Example 3: Let the normal at a point P on the curve $y^2-3 x^2+y+10=0$ intersect the y -axis at $\left(0, \frac{3}{2}\right)$. If m is the slope of the tangent at P to the curve, then $|m|_{\text {is equal to }}$
[JEE MAINS 2020]

Solution:
$
\begin{gathered}
2 y y^{\prime}+y^{\prime}-6 x=0 \\
y^{\prime}=\frac{6 x}{2 y+1}
\end{gathered}
$
$\frac{-1}{y^{\prime}}=\frac{-(2 y+1)}{6 x}$ (slope of the normal)
Equation of the normal $y-y_1=\frac{-\left(2 y_1+1\right)}{6 x_1}\left(x-x_1\right)$
Normal intersect at $(0,3 / 2)$
$
\begin{aligned}
& \frac{3}{2}-y_1=\frac{-\left(2 y_1+1\right)}{6 x_1}\left(0-x_1\right) \\
& 8 y_1-8=0 \\
& y_1=1 \\
& x_1= \pm 2 \\
& |m|=4
\end{aligned}
$

Hence, the answer is 4.

Example 4: Two sides of a rhombus are along the lines, $x-y+1=0$ and $7 x-y-5=0$. If its diagonals intersect at $(-1,-2)$, then which one of the following is a vertex of this rhombus?
[JEE MAINS 2016]

Solution: Slope point form of a straight line -
$
\begin{aligned}
& y-y_1=m\left(x-x_1\right) \\
& m \rightarrow \text { slope }
\end{aligned}
$
$\left(x_1, y_1\right) \rightarrow$ point through which the line passes

The point of intersection of AB and AD is $A(1,2)$
$
\begin{aligned}
& \text { Let } \mathrm{C} \text { be }\left(x_1, y_1\right) \\
& \frac{x_1+1}{2}=-1 \\
& \text { and } \frac{y_1+2}{2}=-2 \\
& x=-3 ; y=-6 \\
& C(-3,-6)
\end{aligned}
$

Slope of
$
A C=\frac{2+2}{1+1}=2
$

Hence, the slope of
$
B D=\frac{-1}{2}
$
equation of
$
\begin{aligned}
& \text { equation of } B D \Rightarrow \frac{y+2}{x+1}=\frac{-1}{2} \\
& 2 y+4=-x-1 \\
& B D: x+2 y+5=0
\end{aligned}
$

Point $\left(\frac{1}{3},-\frac{8}{3}\right)$ satisfies the line BD
Hence, the answer is $\left(\frac{1}{3},-\frac{8}{3}\right)$

Example 5: Let PS be the median of the triangle with vertices P(2, 2), Q(6,-1), and R(7, 3). The equation of the line passing through (1,-1) and parallel to PS is : [JEE MAINS 2014]

Solution: |Slope point form of a straight line -
$
\begin{aligned}
& y-y_1=m\left(x-x_1\right) \\
& m \rightarrow \text { slope }
\end{aligned}
$
$\left(x_1, y_1\right) \rightarrow$ point through which the line passes

the midpoint of $O R$ is $\left(\frac{13}{2}, 1\right)$
The slope of $\mathrm{PS}=\frac{-1}{\frac{9}{2}}=\frac{-2}{9}$
and line passes through $(1,-1)$
$\frac{y+1}{x-1}=\frac{-2}{9}$
$2 x+9 y+7=0$
Hence, the answer is $2 x+9 y+7=0$.

Summary

The equation of a straight line provides a relationship between variables and constants. It describes the characteristics of the line like its slope and intercept. Understanding different types of equations of straight lines is necessary as it helps in various geometrical and algebraic problems.The equation of straight lines passing through a given point and making a specified angle with a given line can be determined using principles of coordinate geometry and trigonometry.

Frequently Asked Questions (FAQs)

1. What is a straight line?

It is a curve such that all points on the line segment joining any two points on it lie on it. Every equation of first degree in $x$, and $y$ represents a straight line. The general equation of a straight line is given as ax + by $+\mathrm{c}=0$ where $\mathrm{a}, \mathrm{b}$, and c are real numbers and at least one of a and b is non-zero.

2. What is the equation of a straight line if slope and intercept are given?

The equation of a straight line whose slope is given as $m$ and making $y$-intercept of length $c$ unit is $y=m x+c$. If the straight line passes through the origin, then the equation of the straight line becomes $y=$ mx .

3. What is the equation of a straight line whose slope is given as ' $m$ ' and passes through the point $\left(x_1, y_1\right)$ ?

The equation of a straight line whose slope is given as ' $m$ ' and passes through the point $\left(x_1, y_1\right)$ is $\mathbf{y}-\mathbf{y}_1=\mathbf{m}\left(\mathbf{x}-\mathbf{x}_1\right)$.

4. What is the equation of a straight line that makes intercepts ' $a$ ' and ' $b$ ' on the X -axis and Y -axis respectively?

 The equation of a straight line which makes intercepts 'a' and 'b' on the X -axis and Y -axis respectively is given by
$
\frac{\mathrm{x}}{\mathrm{a}}+\frac{\mathrm{y}}{\mathrm{b}}=1 \text {. }
$

5. What is the equation of a line perpendicular to the given line?

Equation of line perpendicular to the given line. Let the given line $b e ~ a x+b y+c=0$. The slope of the line is $-a / b$. Then the slope of the line parallel to the given line is $-a / b$ Activate Windows $\qquad$

Articles

Back to top