Perpendicular Line Calculator
Find the equation, slope, and intercept of a perpendicular line passing through a given point with step-by-step math and 2D plot.
How to Find the Equation of a Perpendicular Line
In coordinate geometry, two lines in a Cartesian plane are perpendicular if they intersect at a right angle ($90^\circ$ or $\pi/2\text{ radians}$). The defining algebraic relationship between the slopes $m_1$ and $m_2$ of two non-vertical perpendicular lines is that their slopes are negative reciprocals of one another:
$$m_1 \times m_2 = -1 \iff m_2 = -\frac{1}{m_1}$$
Given an initial line and a specific point $(x_0, y_0)$, you can uniquely determine the perpendicular line passing through that point.
Step-by-Step Calculation Process
1. Find the Slope of the Original Line ($m_1$)
Extract or compute the slope depending on how the original line is given:
- Slope-Intercept Form ($y = m_1 x + b_1$): The slope is the coefficient $m_1$.
- Standard Form ($Ax + By = C$): Solve for $y = -\frac{A}{B}x + \frac{C}{B}$, so $m_1 = -\frac{A}{B}$.
- Two Points $(x_1, y_1)$ and $(x_2, y_2)$: Compute $m_1 = \frac{y_2 - y_1}{x_2 - x_1}$.
2. Compute the Perpendicular Slope ($m_2$)
Take the negative reciprocal: $m_2 = -\frac{1}{m_1}$.
3. Special Cases: Horizontal and Vertical Lines
- Horizontal Lines ($y = c$, slope $m_1 = 0$): The perpendicular line is vertical with equation $x = x_0$ (slope undefined).
- Vertical Lines ($x = c$, slope $m_1 = \text{undefined}$): The perpendicular line is horizontal with equation $y = y_0$ (slope $m_2 = 0$).
4. Write the Equation in Various Forms
- Point-Slope Form: $$y - y_0 = m_2(x - x_0)$$
- Slope-Intercept Form: $$y = m_2 x + b_2, \quad \text{where } b_2 = y_0 - m_2 x_0$$
- Standard Form: $$-m_2 x + y = b_2 \implies A'x + B'y = C'$$
Worked Example
Find the equation of the line perpendicular to $y = 2x + 1$ that passes through $(4, 2)$.
- Original slope: $m_1 = 2$
- Perpendicular slope: $m_2 = -\frac{1}{2} = -0.5$
- Point-slope form: $y - 2 = -0.5(x - 4)$
- Slope-intercept form: $y = -0.5x + 2 + 2 \implies y = -0.5x + 4$
- Intersection point with original line: $2x + 1 = -0.5x + 4 \implies 2.5x = 3 \implies x = 1.2, \; y = 3.4$
Related Coordinate Geometry Tools
Explore more tools for lines, points, and linear algebra:
- Midpoint Calculator — Find the center point and perpendicular bisector between two coordinates.
- Right Triangle Calculator — Compute triangle properties formed by perpendicular legs.
- Area of Triangle with Coordinates Calculator — Calculate polygon area from Cartesian points.
Frequently Asked Questions
What is the negative reciprocal of a slope?
The negative reciprocal of a number m is -1/m. To find it, invert the fraction (flip numerator and denominator) and change the sign. For example, the negative reciprocal of 3 is -1/3, and the negative reciprocal of -2/5 is 5/2.
How do you find the line perpendicular to a horizontal line?
A horizontal line has the equation y = c and a slope of 0. Any perpendicular line to it is a vertical line with an undefined slope and equation x = x0, where x0 is the x-coordinate of the point it passes through.
How do you find the intersection of two perpendicular lines?
Set their slope-intercept equations equal to each other (m1·x + b1 = m2·x + b2) and solve for x: x = (b2 - b1) / (m1 - m2). Then substitute x back into either line equation to find y.
What is the shortest distance from a point to a line?
The shortest distance from a point (x0, y0) to a line Ax + By = C is measured along the perpendicular line segment connecting the point to the line, given by d = |A·x0 + B·y0 - C| / √(A² + B²).