Conditions for two line to be parallel or perpendicular