A straight line is an endless one-dimensional figure that has no width. It is a combination of endless points joined on both sides of a point. A straight line does not have any curve in it. It can be horizontal, vertical, or slanted.
Let’s understand what is equation of a straight line in coordinate geometry and how to derive it.
What is Equation of a Straight Line?
The equation of a line is a degree-$1$ equation in variables $x$ and $y$ which represents the relation between the coordinates of every point $(x, y)$ on the line. The equation of a straight line is satisfied by all points lying on it.
There are four basic different ways of writing the equation of a straight line based on the parameters known for the line. The following are the different ways of writing equation of a straight line.
- Point Slope Form: $(y – y_1) = m(x – x_1)$
- Two Point Form: $(y -y_1) = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$
- Slope-intercept Form: $y = mx + c$
- Intercept Form: $\frac{x}{a} + \frac{y}{b} = 1$
What is the Slope of a Line?
The slope of a line is the measure of the steepness and the direction of the line. Finding the slope of lines in a coordinate plane can help in predicting whether the lines are parallel, perpendicular, or none without actually using a compass.
The slope of any line can be calculated using any two distinct points lying on the line. The slope of a line formula calculates the ratio of the ‘vertical change’ to the ‘horizontal change’ between two distinct points on a line.

The slope of a line is defined as the change in the $y$-coordinate with respect to the change in the $x$-coordinate of that line. The net change in the $y$-coordinate is denoted by $\triangle y$, while the net change in the $x$-coordinate is denoted by $\triangle x$. So the change in $y$-coordinate with respect to the change in $x$-coordinate can be written as $m = \frac{\triangle x}{\triangle y}$, where $m$ is the slope of a line.
Note: The slope of line $m$ is also written as $\tan \theta$, where $\theta$ is the angle of inclination of the line.
The slope of a line is calculated using two points lying on a straight line. Using the two points lying on a line, we can apply the slope of a line formula.
Consider coordinates of these two points as $\text{P}_1 = (x_1, y_1)$ and $\text{P}_2 = (x_2, y_2)$.
Since the slope is the change in $y$-coordinate with respect to the change in $x$-coordinate of that line, so putting the values of $\triangle y$ and $\triangle x$, i.e.,
$\triangle y = y_2 – y_1$
$\triangle x = x_2 – x_1$
Hence, using these values in a ratio, we get Slope = $m = \tan \theta = \frac{y_2 – y_1}{x_2 – x_1}$
Examples on Slope of a Line
Example 1: Find the slope of a line passing through the points $(2, 4)$, and $(1, 2)$.
Slope of a line passing through the points $(2, 4)$, and $(1, 2)$ is $m = \frac{2 – 4}{1 – 2} = \frac{-2}{-1} = 2$.
Example 2: Find the slope of a line passing through the points $(3, 7)$, and $(9, 1)$.
Slope of a line passing through the points $(3, 7)$, and $(9, 1)$ is $m = \frac{1 – 7}{9 – 3} = \frac{-6}{6} = -1$.
Point Slope Form Equation of Line
Point slope form is used to represent a straight line using its slope and a point on the line. That means, the equation of a line whose slope is $m$ and which passes through a point $(x_1, y_1)$ is found using the point-slope form.
The equation of the point-slope form is $y − y_1 = m (x − x_1)$
where,
$(x, y)$ is a random point on the line(which should be kept as variables while applying the formula).
$(x_1, y_1)$ is a fixed point on the line.
$m$ is the slope of the line.
Derivation of Point Slope Form Equation of Line
We will derive this from the point-slope form equation of line using the equation for the slope of a line. Let us consider a line whose slope is $m$. Let us assume that $(x_1, y_1)$ is a known point on the line. And let $(x, y)$ be any other random point on the line whose coordinates are not known.

We know that the equation for the slope of a line is $\text{Slope } = \frac{\text{Difference in } y- \text{coordinates}}{\text{Difference in } x- \text{coordinates}}$.
$=> m = \frac{y – y_1}{x – x_1}$
Multiplying both sides by $(x – x_1)$, we get $m(x – x_1) = y – y_1$
This can be written as $y – y_1 = m(x – x_1)$
Examples On Point Slope Form Equation of Line
Example 1: Find the equation of a line with slope $m = 3$ and passing through a point $(-2, 5)$.
Equation of line with slope $m$ and passing through a point $(x_1, y_1)$ is $y – y_1 = m(x – x_1)$.
Therefore equation of a line with slope $m = 3$ and passing through a point $(-2, 5)$ is $y – 5 = 3(x – (-2))$
$=> y – 5 = 3(x + 2)$
$=> y – 5 = 3x + 6$
$=>-3x + y = 6 + 5$
$=>-3x + y = 11$
$=>3x – y = -11$ or $3x – y + 11 = 0$
Example 2: Find the equation of a line with slope $m = \frac{2}{3}$ and passing through a point $(1, -1)$.
Equation of line with slope $m$ and passing through a point $(x_1, y_1)$ is $y – y_1 = m(x – x_1)$.
Therefore equation of a line with slope $m = \frac{2}{3}$ and passing through a point $(1, -1)$ is $y – (-1) = \frac{2}{3}(x – 1)$
$=> y + 1 = \frac{2}{3}(x – 1)$
$=> 3(y + 1) = 2(x – 1)$
$=> 3y + 3 = 2x – 2$
$=> -2x + 3y = – 2 – 3$
$=> -2x + 3y = – 5$
$=> 2x – 3y = 5$
Two Point Form Equation of Line
Two point form is one of the important forms used to represent a straight line algebraically. The two-point form of a line is used for finding the equation of a line given two points $(x_1, y_1)$ and $x_2, y_2)$ on it.
The two-point form of a line passing through these two points is $y – y_1 = \frac{y_2 – y_1}{x_2 – x_1}(x – x_1)$.
Derivation of Two Point Form Equation of Line

Let us consider two fixed points $\text{A}(x_1, y_1)$ and $B(x_2, y_2)$ on the line in a coordinate plane. Further let $\text{C}(x, y)$ be any random point on the line.
Since $\text{A}$, $\text{B}$, and $\text{C}$ lie on the same line, therefore Slope of $\overleftrightarrow{\text{AC}}$ = Slope of $\overleftrightarrow{\text{AB}}$.
$=> \frac{y – y_1}{x – x_1} = \frac{y_2 – y_1}{x_2 – x_1}$
Multiplying both sides by $x – x_1$, we get
$=> \frac{y – y_1}{x – x_1} \times (x – x_1) = \frac{y_2 – y_1}{x_2 – x_1} \times (x – x_1)$
$=> y – y_1 = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$
Examples on Two Point Form Equation of Line
Example 1: Find the equation of a line passing through the points $(2, 2)$ and $(9, 9)$.
Equation of a line passing through the points $(x_1, y_1)$ and $(x_2, y_2)$ is $y – y_1 = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$.
Therefore equation of a line passing through $(2, 2)$ and $(9, 9)$ is $y – 2 = \frac{9 -2}{9 – 2} (x – 2)$
$=> y – 2 = \frac{7}{7} (x – 2)$
$=> y – 2 = 1 \times (x – 2)$
$=> y – 2 = x – 2$
$=> y = x$
$=> x – y = 0$
Example 2: Find the equation of a line passing through the points $(-5, 2)$ and $(3, -4)$.
Equation of a line passing through the points $(x_1, y_1)$ and $(x_2, y_2)$ is $y – y_1 = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$.
Therefore equation of a line passing through $(-5, 2)$ and $(3, -4)$ is $y – 2 = \frac{-4 – 2}{3 – (-5)} (x – (-5))$
$=> y – 2 = \frac{-6}{3 + 5} (x + 5)$
$=> y – 2 = \frac{-6}{8} (x + 5)$
$=> y – 2 = -\frac{3}{4} (x + 5)$
$=> 4(y – 2) = -3(x + 5)$
$=> 4y – 8 = -x – 15$
$=> x + 4y = – 15 + 8$
$=> x + 4y = – 7$ or $=> x + 4y + 7 = 0$
Slope-intercept Form Equation of Line
The slope-intercept form of a line is used when we know the slope of a line $m$ and the intercept $(0, c)$ made by the line on $y$-axis.
Note: $y$-intercept is a point where the line crosses $y$-axis.

The above image shows the equation of the line $y = mx + c$, where $m$ is the slope of the line, and $c$ is the $y$-intercept of the line. This line cuts the $y$-axis at the point $(0, c)$ which is at a distance of $c$ units from the origin. The inclination of this line with reference to the $x$-axis or a line parallel to the $x$-axis is known by its slope or $m$ value.
Derivation of Slope-intercept Form Equation of Line
The equation slope-intercept form of line can be derived from the slope formula. Here we take a point $(0, c)$ on the $y$-axis, and an arbitrary point $(x, y)$ on the line. Using these two points, we find the slope $m$ of the line.
$m = \frac{y – c}{x – 0}$
$=> m = \frac{y – c}{x}$
$=> mx = y – c$
$mx + c = y$
$y = mx + c$
Examples on Slope-intercept Form Equation of Line
Example 1: Find the equation of a line with $y$-intercept as $-3$ and slope $\frac{1}{2}$.
The equation of a line in slope-intercept form is $y = mx + c$, where $m$ is the slope of a line and $c$ is the $y$-intercept.
Therefore the equation of a line with $y$-intercept as $-3$ and slope $\frac{1}{2}$ is $y = \frac{1}{2}x + (-3)$
$=> y = \frac{1}{2}x + (-3)$
$=> y = \frac{1}{2}x – 3$
Intercept Form Equation of Line
The intercept form of the equation of a line has an equation $\frac{x}{a} + \frac{y}{b} = 1$, where $a$ is the $x$-intercept, and $b$ is the $y$-intercept. The $x$-intercept is the shortest distance of the point on the $x$-axis from the origin, where the line cuts the $x$-axis, and the $y$-intercept is the shortest distance of the point on the $y$-axis from the origin, where the line cuts the $y$-axis. Also considering the points, the line cuts the x-axis at the point $(a, 0)$, and it cuts the $y$-axis at the point$(0, b)$.

Derivation of Intercept Form Equation of Line
The intercept form of the equation of the line can be derived from the other forms of equations of a line. Here we derive the intercept form of the equation of the line from the two-point form of the equation of a line.
The equation of a line passing through the two points $(a, 0)$, and $(0, b)$ can be found using the two-point form of the equation of a line. The equation of the line passing through the two points $(a, 0)$, and $(0, b)$ respectively is $y – 0 = \frac{b – 0}{0 – a}(x – a)$
$=> y = \frac{b}{- a}(x – a)$
$=> -ay = b(x – a)$
$=> -ay = bx – ab$
$=> ab = bx + ay$
$=> bx + ay = ab$
$=> \frac{bx + ay}{ab} = 1$
$=> \frac{bx}{ab} + \frac{ay}{ab} = 1$
$=> \frac{x}{a} + \frac{y}{b} = 1$
Examples on Intercept Form Equation of Line
Example 1: Find the equation of a line making an intercept of $-2$ on $x$-axis and an intercept of $5$ on $y$-axis.
Equation of a line in intercept form is $\frac{x}{a} + \frac{y}{b} = 1$, where $a$ and $b$ are the intercepts made by the line on $x$ and $y$ axis respectively.
Therefore equation of a line making an intercept of $-2$ on $x$-axis and an intercept of $5$ on $y$-axis is $\frac{x}{-2} + \frac{y}{5} = 1$
$=> -\frac{x}{2} + \frac{y}{5} = 1$
Practice Problems
- Find the equation of a line
- having a slope $-\frac{3}{4}$ and passing through a point $(2, 5)$
- having a slope $2$ and passing through a point $(-4, 1)$
- Find the equation of a line passing through the points
- $(-4, 2)$ and $(7, 10)$
- $(2, 5)$ and $(-1, 5)$
- Find the equation of a line with a
- slope $-1$ and $y$-intercept $1$
- slope $2$ and $y$-intercept $7$
- Find the equation of a line making
- $x$-intercept $1$ and $y$-intercept $-1$
- $x$-intercept $-3$ and $y$-intercept $9$
FAQs
What is the equation of a line in coordinate geometry?
The equation of a line is a single representation of numerous points on the line. The general form of the equation of a line is of the form $ax + by + c = 0$ and any point on the line satisfies this equation.
There are a few other forms of equations of line such as
a. Point Slope Form: $(y – y_1) = m(x – x_1)$
b. Two Point Form: $(y -y_1) = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$
c. Slope-intercept Form: $y = mx + c$
d. Intercept Form: $\frac{x}{a} + \frac{y}{b} = 1$
What is the equation of a line parallel to the x-axis?
The equation of a line parallel to the $x$-axis is of the form $y = a$, which cuts the $y$-axis at the point $(0, a)$.
What is the equation of a line parallel to the y-axis?
The equation of a line parallel to the $y$-axis is of the form $x = a$, which cuts the $x$-axis at the point $(a, 0)$.
What is the equation of a line in slope-intercept form?
The slope-intercept form of the equation of a line is $y = mx + c$, where $m$ is the slope of the line, and $c$ is the $y$-intercept of the line.
What is the equation of a line passing through two points?
The equation of a line in two-point form is $(y – y_1) = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$. Here $\frac{y_2 – y_1}{x_2 – x_1}$ is the slope of the line and this line is passing through the two points $(x_1, y_1)$, and $(x_2, y_2)$. This two-point form is an interpretation of the point-slope form.
What is $c$ in the slope-intercept form of the equation of a line?
The $c$ in the slope-intercept form of the equation of a line $y = mx + c$ is the $y$-intercept of the line. The line cuts the $y$-axis at the point $(0, c)$, and $c$ is the distance of the point on the $y$-axis from the origin.
Conclusion
A straight line is an endless one-dimensional figure that has no width. There are various forms of the equation of a line. The four most common forms of the equation of line are Point Slope Form: $(y – y_1) = m(x – x_1)$, Two Point Form: $(y -y_1) = \frac{y_2 – y_1}{x_2 – x_1} (x – x_1)$, Slope-intercept Form: $y = mx + c$, and Intercept Form: $\frac{x}{a} + \frac{y}{b} = 1$.