Parallel and perpendicular lines

Comparing the slopes of two lines tells you whether they are parallel or perpendicular.

Two lines with equal slopes are parallel and never meet. For example y=2x1y = 2x - 1 and y=2x+3y = 2x + 3 both have slope 22: they rise at the same rate as xx increases, so they stay a fixed distance apart and never cross. Indeed, setting 2x1=2x+32x - 1 = 2x + 3 gives 1=3-1 = 3, which no xx satisfies, so there is no solution.

Two lines whose slopes multiply to 1-1 meet at a right angle. If mm is the slope perpendicular to a line of slope 22, then 2m=12m = -1, so m=12m = -\dfrac{1}{2}. The line with slope 12-\dfrac{1}{2} through (1,1)(1, 1) is y=3x2y = \dfrac{3 - x}{2}, and it crosses y=2x1y = 2x - 1 at (1,1)(1, 1) at a right angle.

In summary, for two lines with slopes m1,m2m_1, m_2: they are parallel if m1=m2m_1 = m_2, and perpendicular if m1m2=1m_1 m_2 = -1. The graph shows two parallel lines of slope 22 and one line perpendicular to them, with the large dot at their right-angle crossing (1,1)(1, 1).