let b = the slope of line B if line B is perpendicular to line A, then a = -1/b.
You can ask a new question or answer this question.