Lines are perpendicular to each other if the angle between them is a right angle.
Two lines in the plane with gradients \(m_{1}\) and \(m_{2}\) are perpendicular if and only if \(m_{1}m_{2}=-1\). (Vertical and horizontal lines are also perpendicular, but vertical lines do not have a gradient.)
Two lines in the plane with equations \(a_1x+b_1y+c_1=0\) and \(a_2x+b_2y+c_2=0\) are perpendicular if and only if \(a_1a_2+a_2b_2=0\).
If the direction vectors of two lines are \(\mathbf{d}_1\) and \(\mathbf{d}_2\), then the lines are perpendicular if and only if the dot product \(\mathbf{d}_1\cdot\mathbf{d}_2=0\).