If you want to quickly solve a problem in geometry, give this perpendicular line calculator a try. It finds the equation of a (yet undefined) line that is perpendicular to a given line and passes through a given point. Additionally, it calculates the coordinates of the intersection point of the two lines. All you have to do is input the coordinates of any point and the coefficients describing the given line, and our perpendicular line equation calculator will do the math for you!
In this article, we will explain how to find a perpendicular line using basic principles of maths. We will also provide you with a simple example to illustrate how the method works.
Make sure to check out the parallel line calculator, too!
How to find a perpendicular line?
Every straight line in a two-dimensional space can be described by a simple line equation:
y = ax + b
where a and b are coefficients, x is the x-coordinate, and y is the y-coordinate. Every line is uniquely defined if the values of a and b are known.
Let's assume that you know the following information:
- The equation of the given line is
y = mx + r. You know the values of m and r and are looking for a line perpendicular to this one.
- You also know the coordinates of the point your line is supposed to pass through. They are x₀ and y₀.
The slope of any line is equal to the value of a coefficient. If two lines are perpendicular, the product of their slopes equals -1. Hence,
a * m = -1
a = -1 / m
To find the b coefficient (also known as the y-intercept), you have to substitute the coordinates (x₀,y₀) and the value of a into the equation of your line:
y = ax + b
y₀ = -1 * x₀ / m + b
b = y₀ + 1 * x₀ / m
Perpendicular line equation: an example
How do these calculations look in practice? Let's assume that you want your line to pass through the point (3,5) and be perpendicular to the line
y = 2x - 2. You can find the perpendicular line equation when following these steps:
- Identify the slope (m) and the y-intercept (r) of the given line. In this case,
m = 2and
r = -2.
- Calculate the slope of your line. It is equal to
a = -1 / m = -1/2 = -0.5
- Input this value into the line equation
y = ax + b:
y = -0.5x + b
- Substitute the coordinates (3,5) for the values of x and y:
5 = -0.5 * 3 + b
5 = -1.5 + b
b = 6.5
- As the last step, input the b coefficient into the line equation:
y = -0.5x + 6.5
Don't believe it? Check the result with this perpendicular line calculator!
Finding the intersection point
Once you know the equation of the new line, finding the intersection point between it and the first (given) line is a straightforward task. All you have to do is find a point with coordinates (xₐ,yₐ) such that it lies on each of the two lines.
Consider the example we've just analyzed. We found two perpendicular lines:
y = 2x - 2 and
y = -0.5x + 6.5. These two equations form a system of equations with two unknowns - the coordinates of the point of intersection.
Let's solve this system of equations:
yₐ = 2xₐ - 2
yₐ = -0.5xₐ + 6.5
Multiplying the second equation by 4, you get
yₐ = 2xₐ - 2
4yₐ = -2xₐ + 26
Adding the two equations together,
5yₐ = 24
yₐ = 4.8
xₐ = 0.5yₐ + 1 = 2.4 + 1 = 3.4
The coordinates of the point of intersection are (3.4, 4.8).
Of course, you don't have to carry out these tedious calculations all by yourself - our perpendicular line calculator can do the same in just a few seconds!