Python | Sympy Line.is_parallel() method Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report In Sympy, the function is_parallel() is used to check whether the two linear entities are parallel or not. Syntax: Line.is_parallel(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: True: if l1 and l2 are parallel, False: otherwise. Example #1: Python3 1== # import sympy and Point, Line from sympy import Point, Line p1, p2 = Point(0, 0), Point(1, 1) p3, p4 = Point(3, 4), Point(6, 7) l1, l2 = Line(p1, p2), Line(p3, p4) # using is_parallel() method isParallel = Line.is_parallel(l1, l2) print(isParallel) Output: True Example #2: Python3 1== # import sympy and Point, Line from sympy import Point, Line p1, p2 = Point(0, 0), Point(1, 1) p3, p4 = Point(3, 4), Point(6, 6) l1, l2 = Line(p1, p2), Line(p3, p4) # using is_parallel() method isParallel = Line.is_parallel(l1, l2) print(isParallel) Output: False Comment More infoAdvertise with us Next Article Python | Sympy Line.is_parallel() method R ravikishor Follow Improve Article Tags : Python SymPy Python SymPy-Geometry Practice Tags : python Similar Reads Python | Sympy Line.parallel_line method In Sympy, the function parallel_line() is used to create a new Line parallel to the given linear entity which passes through the given point p. Syntax: Line.parallel_line(p) Parameters: p: Point Returns: Line Example #1: Python3 # import sympy and Point, Line from sympy import Point, Line p1, p2, p3 1 min read Python | Sympy Line.is_perpendicular method In Sympy, the function is_perpendicular() is used to check whether the two linear entities are perpendicular or not. Syntax: Line.is_perpendicular(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: True: if l1 and l2 are perpendicular, False: otherwise. Example #1: Python3 1== # import sympy 1 min read Python | Sympy Line.distance() method In Sympy, the function distance() is used to find the shortest distance between a given line and a given point. Syntax: Line.distance(other) Parameter: other: a point Returns: shortest distance between a line and a point Raises: NotImplementedError is raised if `other` is not a Point Example #1: Pyt 1 min read Python | Sympy Line.perpendicular_line method In Sympy, the function perpendicular_line() is used to create a new Line perpendicular to the given linear entity which passes through the given point p. Syntax: Line.perpendicular_line(p) Parameters: p: Point Returns:line Example #1: Python3 # import sympy and Point, Line from sympy import Point, L 1 min read Python | Sympy Plane.projection_line() method In Sympy, the function Plane.projection_line() is used to project the given line onto the given plane through the normal plane containing the line. Syntax: Plane.projection_line(line) Parameters: line: LinearEntity or LinearEntity3D Returns: Point3D, Line3D, Ray3D or Segment3D Example #1: Python3 1= 1 min read Like