Perpendicular Line Calculator


This online Perpendicular Line Calculator finds the equation of the line that is perpendicular to a given line. You have to specify the parameters a and b of the original line y = ax + b as well as the coordinates of the point (x0,y0) through which the perpendicular line y = px + q passes. After clicking the Calculate button you will get the parameters p and q and the graph of the perpendicular line.


Precision: decimal places

Original line: y = ax + b
a:
b:
Second line passes through:
x0:
y0:
Perpendicular line: y = px + q
p:
q:


Perpendicular Line Definition

A line is said to be perpendicular to another line if the two lines intersect at a right angle (90 degrees or \(\pi\)/2 radians).

Let’s define two linear functions in the two-dimensional plane. The first function describes the first (original) line equation:

$$y = ax + b.$$

The second function will describe the perpendicular line equation:

$$y = px + q.$$

The parameters \(a\) and \(p\) are the slopes of these two lines. It can be easily shown the the perpendicular line slope \(p\) is the negative reciprocal of the original line slope \(a\):

$$p = \ – \frac {1}{a}.$$

If we know that the perpendicular line passes through the point \((x_0,y_0)\) on the plane, then we can easily find the parameter \(q\):

$$q = y_0 + \frac {x_0}{a}.$$

Plugging the known parameters \(a\), \(b\), \(x_0\), \(y_0\) to our Perpendicular Line Calculator you will get instantly the perpendicular line parameters \(p\) and \(q\). You will get also a graph that shows the original line, the line perpendicular to it and the point through which the perpendicular line passes.

Note, that the method described above works nicely except for a vertical original line. But it works for a horizontal original line which can be expressed by a formula \(y = b\). In this case the perpendicular line is a vertical line which can not be expressed using finite parameters \(p\) and \(q\). This perpendicular line equation is \(x = x_0.\)


Related calculators

Check out our other math calculators such as Parallel Line Calculator or Polar Coordinates Calculator.