'is the given geometric entity perpendicualar to the given plane?
Parameters
LinearEntity3D or Plane
Returns
Boolean
Examples
>>> from sympy import Plane, Point3D
>>> a = Plane(Point3D(1,4,6), normal_vector=(2, 4, 6))
>>> b = Plane(Point3D(2, 2, 2), normal_vector=(-1, 2, -1))
>>> a.is_perpendicular(b)
True'

def is_perpendicular(self, l):

    from sympy.geometry.line import LinearEntity3D
    if isinstance(l, LinearEntity3D):
        a = Matrix(l.direction_ratio)
        b = Matrix(self.normal_vector)
        if a.cross(b).is_zero:
            return True
        else:
            return False
    elif isinstance(l, Plane):
        a = Matrix(l.normal_vector)
        b = Matrix(self.normal_vector)
        if (a.dot(b) == 0):
            return True
        else:
            return False
    else:
        return False
