I agree with vincisonfire. Take the dot products of the direction vectors-the vectors multiplied by
.
(Actually, I see a distinct problem with "showing these two lines are perpendicular"- they are not! Are you sure you haven't lost a sign somewhere?)