Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Relationship Between the Lines
Perpendicular
The slopes multiply to −1 (m₁ · m₂ = −1)
Slope of Line 1 (m₁) 2
Slope of Line 2 (m₂) -0.5
Product (m₁ · m₂) -1

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}$$
Advertisement
Two parallel lines with equal slopes and two perpendicular lines crossing at a right angle
Parallel lines share the same slope; perpendicular lines meet at 90° with slopes that multiply to -1.

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.

Coordinate plane showing one line with slope 2 and a perpendicular line with slope negative one-half
Example: slopes of 2 and -1/2 multiply to -1, confirming the lines are perpendicular.

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.

Last updated: