Python | Sympy Line.angle_between method Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report In Sympy, the function angle_between() is used to return the non-reflex angle formed by rays emanating from the origin with directions the same as the direction vectors of the linear entities. Syntax: Line.angle_between(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: angle: angle in radians Notes: From the dot product of vectors v1 and v2 it is known that: dot(v1, v2) = |v1|*|v2|*cos(A) where A is the angle formed between the two vectors. We can get the directional vectors of the two lines and readily find the angle between the two using the above formula. Example #1: Python3 1== # import sympy and Point, Line, pi from sympy import Point, Line, pi # using Line() method l1 = Line((0, 0), (1, 0)) l2 = Line((0, 0), (1, 1)) # using angle_between() method rad = l1.angle_between(l2) print(rad) Output: pi/4 Example #2: Python3 1== # import sympy and Point, Line, pi from sympy import Point, Line, pi # using Line() method l1 = Line((0, 0), (1, 0)) l3 = Line((1, 1), (0, 0)) # using angle_between() method rad = l1.angle_between(l3) print(rad) Output: 3*pi/4 Comment More infoAdvertise with us Next Article Python | Sympy Line.are_concurrent method R ravikishor Follow Improve Article Tags : Python Python SymPy-Geometry Practice Tags : python Similar Reads Python | Sympy Line.smallest_angle_between method In Sympy, the function smallest_angle_between() is used to return the non-obtuse angle at the intersection of lines. Syntax: smallest_angle_between(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: angle [angle in radians] Example #1: Python3 1== # import sympy and Point, Line, pi from symp 1 min read Python | Sympy Line.intersection() method In Sympy, the function intersection() is used to find the intersection with another geometrical entity. Syntax: Line.intersection(o) Parameters: o: Point or LinearEntity Returns: intersection: list of geometrical entities Example #1: Python3 1== # import sympy and Point, Line from sympy import Point 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.are_concurrent method In Sympy, the function are_concurrent() is used to check whether the given linear entities(lines) are concurrent or not. Two or more linear entities are concurrent if they all intersect at a single point. Syntax: Line.are_concurrent(lines) Parameters: lines: a sequence of linear entities. Returns: T 1 min read sympy.cot() method In Python The cotangent of an angle is defined as the length of the adjacent sides of an angle divided by the length of the opposite side of the angle. The Sympy cot() function in Python is a trigonometric function that is used to find the value of cot theta. In this article, we will see how the cot() functio 2 min read Python | sympy.atan() method In sympy, atan() method is an inverse tangent function. Using the atan(x) method in the sympy module, we can compute the inverse tangent or arctangent of x. Syntax : sympy.atan(x) Return : Returns the arc tangent of x Code #1: Below is the example using atan() method to find the inverse tangent func 1 min read Like