m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}m=x2−x1y2−y1. Parallel: m1=m2m_1 = m_2m1=m2; perpendicular: m1m2=−1m_1 m_2 = -1m1m2=−1.