A straight line can be considered as a line passing through at least two points and remains straight all the time. In xy plane a straight line equation contains variables x and y and a constant [under certain conditions only one variable may exist].
Equation from x-axis and y-axis intercept:
\frac{x}{a} + \frac{y}{b} = 1x-axis intercepting point (a, 0) and y-axis intercepting point (0, b)
The value of a and b can be positive or negative based on the following condition:
If the line intersects at positive x-axis, then a is positive, otherwise negative. If the line intersects at positive y-axis, then b is positive, otherwise negative Following figures shows different intersecting point and corresponding straight line equation.
![](https://i0.wp.com/math-poster.com/wp-content/uploads/2021/11/line_ypos.png?resize=624%2C336&ssl=1)
\; \frac{x}{-3} + \frac{y}{7} = 1 \; \frac{x}{3} + \frac{y}{7} = 1
![](https://i0.wp.com/math-poster.com/wp-content/uploads/2021/11/line_yneg.png?resize=623%2C280&ssl=1)
\; \frac{x}{-3} + \frac{y}{-7} = 1 \; \frac{x}{3} + \frac{y}{-7} = 1
Equation from slope:
y = mx + cWhere m is the slope or gradient of the straight line and c is the y-axis intercept. Slope can be determined by taking two points in the straight line and calculating ratio of change in y to change in x as shown in the following figure.
![](https://i0.wp.com/math-poster.com/wp-content/uploads/2021/11/yismx.png?resize=487%2C363&ssl=1)
If c = 0, the equation becomes y = mx This is the straight line equation passing through the origin (0,0)
Exercise:
Suppose a straight line equation be given by,
\frac{x}{10} + \frac{y}{20} = 1What is the slope of above equation?
Solution: Multiplying both sides of equation with 20 we get,
2x + y = 20 y = -2x + 20So slope, m= -2
Exercise:
Suppose we have a straight line equation
y = 2x + 20What is the x-axis and y-axis intercept?
Solution: Above equation can be written as
\frac{x}{-10} + \frac{y}{20} = 1So, the line intercepts negative x-axis at 10 and positive y-axis at 20.
Equation of line parallel to x-axis and y-axis:
Equation of a straight line parallel to x-axis is given by
y = bHere b is the unit distance from x-axis. For example in the following figure y = 3 is parallel to x-axis with every point on this line is at 3 unit distance from x-axis.
Equation of a straight line parallel to y-axis is given by
x = aHere a is the unit distance from y-axis. For example in the following figure x = 7 is parallel to y-axis with every point on this line is at 7 unit distance from y-axis.
![](https://i0.wp.com/math-poster.com/wp-content/uploads/2021/11/xy_axis_parallel.png?resize=623%2C431&ssl=1)
Straight line equation passing through two points:
The equation of a straight line passing through the points (x1, y1) and (x2, y2) is given by
\frac{y-y_2}{y_2-y_1} = \frac{x-x_2}{x_2-x_1}Exercise:
Derive the straight line equation passing through the points (20, 0) and (-7, 3).
Let (x1, y1) = (20, 0) and (x2, y2) = (-7, 3)
So, the above equation becomes
\frac{y-3}{3-0} = \frac{x-(-7)}{-7-20}or, 3x + 21 = -27y + 81
or, 3x + 27y - 60 = 0
Straight line equation parallel to another straight line:
Straight line parallel to another straight line ax + by + c = 0 is given by ax + by + k = 0 where k is another constant which need to be determined from other conditions. All parallel straight lines have equal slope.
Exercise:
Determine the straight line equation which is parallel to 2x + 3y - 18 = 0 and passes through the point (1, -3).
Let the equation be 2x + 3y + k = 0
Since it passes through the point (1, -3), substituting this value we get,
2×1 + 3×(-3) + k = 0or, k = 7
So the straight line is 2x + 3y + 7 = 0
Let’s find the slope of the original line and the parallel line:
Original line: 3y = -2x + 18
or, y = -\frac{2}{3}x + 6
So slope, m_1 = -\frac{2}{3}
New Line: 3y = -2x + 7
or, y = -\frac{2}{3}x + \frac{7}{3}
So slope, m_2 = -\frac{2}{3}
Hence m_1 = m_2
Straight line equation perpendicular to another straight line:
Straight line perpendicular to another straight line ax + by + c = 0 is given by bx - ay + k = 0 where k is another constant which need to be determined from other conditions. If two lines are perpendicular to each other, then product of their slope is -1
Exercise:
Determine the straight line equation which is perpendicular to 2x + 3y - 18 = 0 and passes through the point (1, -3).
Let the equation be 3x - 2y + k = 0
Since it passes through the point (1, -3), substituting this value we get,
3×1 – 2×(-3) + k = 0
or, k = -9
So the straight line is 3x - 2y - 9 = 0
Let’s find the slope of the original line and the perpendicular line
Original line: 3y = -2x + 18
or, y = -\frac{2}{3}x + 6
So slope m_1 = -\frac{2}{3}
New line: 2y = 3x - 9
or, y = \frac{3}{2}x - \frac{9}{2}
So slope m_2 = \frac{3}{2}
Hence m_1m_2 = - 1
Length of the perpendicular line drawn from (x1, y1) onto line ax + by + c = 0 is given by,
\frac{|ax_1 + by_1 + c|}{\sqrt(a^2 + b^2)}Exercise:
Find the length of perpendicular from point (-3,7) to line 2x - 3y + 20 = 0
Distance = \frac{|2\cdot(-3) + (-3)\cdot7 + 20|}{\sqrt(2^2 + (-3)^2)}
= \frac{|-7|}{\sqrt{13}}
= \frac{7}{\sqrt{13}}