Calculate the angle between two lines

Online calculator for calculating the angle between two lines in the coordinate system


On this page the angle between two lines in a coordinate system is calculated. To do this, enter the X / Y coordinates of the two lines. It doesn't matter which point is first and which is second. The result will be the same.


Angle calculator

 
 Position of the 1st line
Point A (x, y)
Point B (x, y)
Position of the 2nd line
Point C (x, y)
Point D (x, y)
Decimal places
 Result
Angle

Picture 1


Calculation of the angle by vector calculation


Lines with a common starting point


The angle between two straight lines with a common starting point can be determined by vector calculation. To determine the angle, the scalar product of the vectors and their magnitude must first be calculated.


Calculate scalar product


The scalar product for the two vectors

\( \vec{a}=\left(\matrix{a_1\\a_2} \right) \) and \(\vec{b}=\left(\matrix{b_1\\b_2}\right)\)
is calculated according to the formula

\( \vec{a}·\vec{b}= a_1·b_1 + a_2·b_2 \)

The individual elements of the vectors are multiplied with one another and the products are added. The sum of the addition is the scalar product of the vector.

Picture 2


Calculate magnitude


The magnitude of a vector can be calculated using the Pythagorean theorem. After that, the square of the hypotenuse is equal to the sum of the squares of the legs.

The magnitude of the vector \( \left(\matrix{a_1\\a_2}\right)\) is calculated as \( \vec{|a|}=\sqrt{a_1^2+a_2^2}\)


Example


We are looking for the angle \(α\) between \( \left(\matrix{5\\7}\right)\) and \( \left(\matrix{5\\3}\right)\)

\(\vec{a} · \vec{b} = 5·5 + 7·3 = 25+21=46 \)

\(|\vec{a}|=\sqrt{5^2+7^2}=\sqrt{25+49}=\sqrt{74}=8.6 \)

\(|\vec{b}|=\sqrt{5^2+3^2}=\sqrt{25+9}=\sqrt{34}=5.83 \)

\(\displaystyle cos(α)=\frac{46}{8.6 ·5.83}= 0.91747\)

\(α=acos(0.91747)=23.44°\)


Lines without points of contact


If the lines do not have a common starting point, you can move them so that the starting points touch. If the two X or Y coordinates of a line are changed by the same value, they will shift in position. The direction and the angle do not change.

To move the two lines from Figure 3 to a common starting point, the vectors of the end points are simply subtracted.

\(\displaystyle a=\left( \matrix{4\\5}\right)-\left(\matrix{-1\\-2}\right)=\left( \matrix{4-(-1)\\5-(-2)}\right)=\left(\matrix{5\\7}\right)\)


\(\displaystyle b=\left( \matrix{7\\2}\right)-\left(\matrix{2\\-1}\right)=\left( \matrix{7-2\\2-(-1)}\right)=\left(\matrix{5\\3}\right)\)

By subtracting, we get two vectors as shown in Figure 2 above. Now the angle can be calculated as in example 1 above.

Picture 3



1D Graphics Functions

Angle between two linesAngle between two vectorsCenter of a straight lineDistance of two pointsDistance of a point and a lineRise over RunSlope of a lineStraight line equationCircular arcHelixKoch snowflake

2D Graphics Functions

Angles

From Degree, Min, Sec to DecimalFrom Degree to PercentAngle sumAngles from side lengths

Triangles

Bisector of a triangleEquilateral triangleRight trianglesRight triangle from 1 side, 1 angleIsosceles right trianglesIsosceles trianglesTriangle area from 2 sides, 1 angleTriangle area from 1 side, 2 anglesTriangle, Incircle, given 3 sidesTriangle area given base and heightTriangle vertices, 3 x/y points

Quadrilateral

SquareRectangleGolden RectangleRectangle to SquareRhombus, given varios parameterRhombus area from diagonal e, fParallelogram from 2 sides, 1 angleParallelogram area from side and heightCyclic QuadrilateralGeneral QuadrilateralConcave QuadrilateralArrowhead QuadrilateralCrossed SquareFrameKiteKite Area from 2 diagonalHalf Square KiteRight KiteSymmetrical TrapezoidUnsymmetrica TrapezoidRight Angle TrapezoidTrapezoid-AreaTrapezoid AngleTri-equilateral Trapezoida

Polygons

TriangleSquarePentagonHexagonHeptagonOctagonNonagonDecagonHendecagonDodecagonHexadecagonN-GonPolygon ringConcave hexagonAxial Symmetric PentagonStretched HexagonStretched Octagon PentagramHexagramOctagramStar of Lakshmi

Circular

AnnulusAnnulus sectorCircleCircular anglesCircular arcsCircular sectorCircular segmentEllipseParabolic archSquaring the Circle

3D Graphics Functions

Angular

Cuboid Square Pillar Antiprism Hexagonal prism Triangular prism Regular prism Oblique prism Ramp Anticube Wedge Right Wedge RhombohedronParallelepipedTetrahedron, irregularTetragonal TrapezohedronPentagonal TrapezohedronPrismatoidStellated Octahedron Stellated DodecahedronGreat Stellated DodecahedronGreat Dodecahedron

Platonic solids

TetrahedronCubeOctahedronDodecahedron Icosahedron

Pyramids

Triangular PyramidPyramidPentagonal PyramidHexagonal PyramidHeptagonal PyramidRegular PyramidPyramid, truncated, squarePyramid, truncated, rectangularPyramid FrustumTriangular BipyramidPentagonal BipyramidHexagonal BipyramidRegular BipyramidTriangular Pyramid

Archimedean solids

CuboctahedronIcosidodecahedronRhombicosidodecahedronRhombicuboctahedronSnub cubeTruncated cubeSnub dodecahedronTruncated cuboctahedronTruncated dodecahedronTruncated icosahedronTruncated icosidodecahedronTruncated octahedronTruncated tetrahedron

Catalan solids

Disdyakis TriacontahedronDeltoidal HexecontahedronDeltoidal IcositetrahedronHexakis OctahedronPentagonal IcositetrahedronPentakis DodecahedronRhombic DodecahedronRhombic TriacontahedronTetrakis HexahedronTriakis OctahedronTriakis TetrahedronTriakis Icosahedron

Johnson solids

Square PyramidPentagonal PyramidTriangular CupolaSquare CupolaPentagonal CupolaRotundaElongated Triangular PyramidElongated Square PyramidElongated Pentagonal PyramidTriangular BipyramidPentagonal BipyramidElongated Square BipyramidGyrobifastigiumGyroelongated Square DipyramidSnub Disphenoid

Round solids

SphereSpherical capSpherical sectorSpherical segmentSpherical ringSpherical wedgeSpherical cornerSpheroidTriaxial ellipsoidEllipsoid volumeSpherical shellSolid anglesTorusSpindle torusOloidElliptic Paraboloid

Cones

ConeTruncated coneElliptic coneTruncated elliptic coneBiconeDouble conePointed pillarRounded cone

Cylinder

CylinderOblique cylinderTruncated cylinderCylindrical wedgeHollow cylinderHalf cylinderCylindrical sectorCylindrical segmentElliptical cylinderBicylinderTricylinderHyperboloid





Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?