#NEWLINE# def is_perpendicular( l1 , l2 ) : #NEWLINE# #INDENT# 'Are two linear entities perpendicular?\n\n        Parameters\n        ==========\n\n        l1 : LinearEntity\n        l2 : LinearEntity\n\n        Returns\n        =======\n\n        True : if l1 and l2 are perpendicular,\n        False : otherwise.\n\n        See Also\n        ========\n\n        coefficients\n\n        Examples\n        ========\n\n        >>> from sympy import Point, Line\n        >>> p1, p2, p3 = Point(0, 0), Point(1, 1), Point(-1, 1)\n        >>> l1, l2 = Line(p1, p2), Line(p1, p3)\n        >>> l1.is_perpendicular(l2)\n        True\n\n        >>> p4 = Point(5, 3)\n        >>> l3 = Line(p1, p4)\n        >>> l1.is_perpendicular(l3)\n        False\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# ( a1 , b1 , c1 ) = l2 . coefficients #NEWLINE# ( a2 , b2 , c2 ) = l2 . coefficients #NEWLINE# return bool ( ( simplify ( ( ( a1 * a2 ) + ( b1 * b2 ) ) ) == 0 ) ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return False