How can you tell if two lines are perpendicular

let a = the slope of line A

let b = the slope of line B

if line B is perpendicular to line A, then a = -1/b.