What This Calculator Does
This tool tells you whether two straight lines are parallel, perpendicular, or neither, based solely on their slopes. In coordinate geometry, the slope (m) describes the steepness and direction of a line. By comparing two slopes you can instantly classify how the lines relate without graphing them.
How to Use It
Enter the slope of the first line (m₁) and the slope of the second line (m₂). The calculator compares them and reports the relationship, along with the product \(m_1 \cdot m_2\) so you can see the reasoning. If a line is given in the form \(y = mx + b\), the slope is the coefficient \(m\). For a line through two points, $$\text{slope} = \frac{y_2 - y_1}{x_2 - x_1}$$
The Formula Explained
Two non-vertical lines are parallel when their slopes are equal: \(m_1 = m_2\). They are perpendicular when the product of their slopes is exactly −1: \(m_1 \cdot m_2 = -1\), which is the same as saying each slope is the negative reciprocal of the other. If neither condition holds, the lines simply intersect at some angle and are classified as neither.
$$\begin{cases} \text{Parallel} & m_1 = m_2 \\[0.5em] \text{Perpendicular} & m_1 \cdot m_2 = -1 \\[0.5em] \text{Neither} & \text{otherwise} \end{cases}$$
Worked Example
Suppose Line 1 has slope \(m_1 = 2\) and Line 2 has slope \(m_2 = -0.5\). The product is $$2 \times (-0.5) = -1$$ which satisfies the perpendicular condition. So these two lines are perpendicular. If instead \(m_2\) were also 2, the slopes would be equal and the lines would be parallel.
FAQ
What about vertical lines? A vertical line has an undefined slope, so the slope method does not apply directly. Two vertical lines are parallel, and a vertical line is perpendicular to any horizontal line (slope 0).
Do parallel lines ever meet? No. Parallel lines have the same slope and never intersect (unless they are the same line).
Why does perpendicular give −1? Rotating a line by 90° turns its slope into the negative reciprocal, so multiplying the original slope by the rotated one yields −1.