• Written By Priya Wadhwa
  • Last Modified 24-01-2023

Angle Between Two Lines: Definition, Formulas and Examples

img-icon

Angle Between Two Lines: The intersection of two straight lines creates two sets of angles. The intersection creates obtuse and acute angles when the lines are not at right angles. This article discusses the basics of a straight line, including its definition, equation, equation of a straight line parallel to the /(X/)-axis, equation of a straight line parallel to the /(Y/)-axis, and slope-intercept form. We will also examine angles between two straight lines using the tangent formula, angles between two lines (in vector form), and the angle between two lines cosine formula.

Angle Between Two Lines

In a plane, two straight lines are either parallel, coincident, or intersect each other. When two straight lines meet at their point of intersection, they usually produce two angles. The first is an acute angle, and the second is an obtuse or equal angle. Both angles are supplementary to each other (the sum of two angles equals \(180°)\).
By definition, when we say angle between two straight lines, we mean the acute angle between the two lines.

Angle Between Two Lines
Let \(y = m_1 x + c_1\) and \(y = m_2 x + c_2\) be the equations of two lines in a plane where:
\(m_1 =\) slope of line \(1\)
\(c_1 = y -\)intercept made by line \(1\)
\(∴ m_1 =\rm{tan}\,θ_1\) and
\(m_2 = \rm{tan}\,θ_2\)
Let the angle between the lines two lines be \(?\) then,
Using triangle \(△ ABC\), we know that the sum of the angles in that triangle is equal to \(180°\).
\(θ + θ_1 + x = 180°\) ……..(i)
Furthermore, \(x + θ_2 = 180°\) ……..(ii)
since \(x\) and \(θ_2\) form a straight line.
Replace \(180°\) with \(x + θ_2\) in equation (i).
We get \(θ + θ_1 + x = x + θ_2\)
Subtract \(x\) from both sides, we get
\(θ + θ_1 + x – x = x – x + θ_2\)
\(θ + θ_1 = θ_2\)
Subtract \(θ_1\) from both sides, we get
\(θ + θ_1 – θ_1 = θ_2 – θ_1\)
\(θ = θ_2 – θ_1\)
Therefore, \(\rm{tan}⁡\,θ = \rm{tan}⁡(θ_1 – θ_2 )\)
\(\tan \theta = \left| {\frac{{\tan {\theta _1} – \tan {\theta _2}}}{{1 + \tan {\theta _1}\tan {\theta _2}}}} \right|\)
\(\tan \,\theta = \left| {\frac{{{m_1} – {m_2}}}{{1 + {m_1}{m_2}}}} \right|\)
Here, the value of \(\rm{tan}\,⁡θ\) will be positive if \(θ\) is acute and negative if \(θ\) is obtuse.

Straight Line

Any first-degree equation in two variables \(x\) and \(y\) of the form
\(ax + by + c = 0\) …(1)
where \(a, b, c\) are real numbers and at least one of \(a, b\) is non-zero represents a straight line in \(XY\) plane.
Straight Line

Equation of Coordinate Axes

The \(X-\)axis and \(Y-\)axis together are called coordinate axes. The \(x\) coordinate of every point on \(OY\) (\(Y-\)axis) is \(0\). Therefore the equation of \(OY\) (\(Y-\)axis) is \(x = 0\).
Equation of Coordinate Axes
The \(y\) coordinate of every point on \(OX\) (\(X-\)axis) is \(0\). Therefore the equation of \(OX\) (\(X-\)axis) is \(y = 0\).
Equation of Coordinate Axes

Equation of a Straight Line Parallel to \(X\)-axis

Let \(AB\) be a straight line parallel to \(X-\)axis, which is at a distance \(b\). Then \(y\) coordinate of every point on \(AB\) is \(b\). Therefore, the equation of \(AB\) is \(y = b\).
Equation of a Straight Line Parallel to X-axis
If \(b > 0\), then the line \(y = b\) lies above the \(X-\)axis.
If \(b < 0\), then the line \(y = b\) lies below the \(X-\)axis.
If \(b = 0\), then the line \(y = b\) is the \(X-\)axis itself.

Equation of a Straight Line Parallel to the \(Y\)-axis

Let \(CD\) be a straight line parallel to \(Y-\)axis, which is at a distance \(c\). Then \(x\) coordinate of every point on \(CD\) is \(c\). The equation of \(CD\) is \(x = c\).
Equation of a Straight Line Parallel to the Y-axis
If \(c > 0\), then the line \(x = c\) lies right to the side of the \(Y-\)axis.
If \(c > 0\), then the line \(x = c\) lies left to the side of the \(Y-\)axis.
If \(c = 0\), then the line \(x = c\) is the \(Y-\)axis itself.

Slope-Intercept Form

Every straight line that is not vertical will cut the \(Y-\)axis at a single point. The \(y\) coordinate of this point is called \(y\) intercept of the line.
A line with slope m and \(y\) intercept \(c\) can be expressed through the equation:
\(y = mx + c\)
We call this equation the slope-intercept form of the equation of a line.
If a line with slope \(m\), \(m ≠ 0\) makes \(x\) intercept \(d\), then the equation of the straight line is \(y = m(x-d)\).
\(y = mx\) represent the equation of a straight line with slope \(m\) and passing through the origin.

Condition for Perpendicular Lines

The two lines are perpendicular means \(θ = 90°\).
\(\tan \,\theta = \left| {\frac{{{m_1} – {m_2}}}{{1 + {m_1}{m_2}}}} \right|\)
\( \Rightarrow \cot \,\theta = \left| {\frac{{1 + {m_1}{m_2}}}{{{m_1} – {m_2}}}} \right|\)
\( \Rightarrow \cot \frac{\pi }{2} = \left| {\frac{{1 + {m_1}{m_2}}}{{{m_1} – {m_2}}}} \right|\)
\( \Rightarrow 1 + m_1 m_2 = 0\)
\( \Rightarrow m_1 m_2 = – 1\)
Thus, the lines are perpendicular if the product of their slope is \(- 1\).

Condition for Parallel Lines

The two lines are parallel means, \(θ = 0°\)
\(\tan \,\theta = \left| {\frac{{{m_1} – {m_2}}}{{1 + {m_1}{m_2}}}} \right|\)
\( \Rightarrow \tan \,0 = \left| {\frac{{{m_1} – {m_2}}}{{1 + {m_1}{m_2}}}} \right|\)
\( \Rightarrow |{m_1} – {m_2}| = 0\)
\( \Rightarrow {m_1} = {m_2}\)
Thus, the lines are parallel if their slopes are equal.

Angle Between Two Lines – Cosine Formula

Angle Between Two Lines - Cosine Formula
Let the direction cosines of the two lines are \((l_1, m_1, n_1)\) and \((l_2, m_2, n_2)\) respectively. The direction cosines of a line are the angles between the line and either of the three coordinate axes. Now, let \(θ\) be the angle between the lines. Then,
\(\cos \,\theta = \frac{{\left| {{l_1}{l_2} + {m_1}{m_2} + {n_1}{n_2}} \right|}}{{\sqrt {l_1^2 + m_1^2 + n_1^2} \sqrt {l_2^2 + m_2^2 + n_2^2} }}\)
If we want to find the angle in terms of \(\rm{sin}\,⁡θ\), we can use the formula:
\(\rm{sin}^2⁡ θ = 1 – \rm{cos}^2⁡ θ\) and then we can replace \(\rm{cos}\,⁡θ\) in the formula above.

Angle Between Two Lines in Vector Form \((3-D)\)

Angle Between Two Lines in Vector Form (3-D)
The angle between two lines can be found in a three-dimensional space using dot product of vectors.
Consider two vectors \(\overrightarrow b \) and \(\overrightarrow d \), then the acute angle \(θ\) between two straight lines is given by:
\(\theta = {\cos ^{ – 1}}\frac{{\left| {\overrightarrow b \cdot \overrightarrow d } \right|}}{{\left| {\overrightarrow b } \right|\left| {\overrightarrow d } \right|}}\)
Where \(\overrightarrow b \) and \(\overrightarrow d \) are considered as the direction vectors of the two lines as shown above.

Solved Examples – Angle Between Two Lines

Q.1. Find the angle between the pair of lines given by: \(\overrightarrow r = 3\widehat i + 2\widehat j – 4\widehat k + \lambda \left({\widehat i + 2\widehat j + 2\widehat k } \right)\) and \(\overrightarrow r = 5\widehat i – 2\widehat j + \mu \left({3\widehat i + 2\widehat j + 6\widehat k } \right)\)
Ans: Here \( {b_1} = \widehat i + 2\widehat j + 2\widehat k \) and \( {b_2} = 3\widehat i + 2\widehat j + 6\widehat k \)
The angle \(θ\) between the two lines is given by
\(\cos \theta = \left| {\frac{{\overrightarrow {{b_1}} .\overrightarrow {{b_2}} }}{{\left| {\overrightarrow {{b_1}} } \right|\left| {\overrightarrow {{b_2}} } \right|}}} \right| = \frac{{\left( {\hat i + 2\hat j + 2\hat k} \right)\left( {3\hat i + 2\hat j + 6\hat k} \right)}}{{\sqrt {1 + 4 + 4} ~\sqrt {9 + 4 + 36} }}\)
\( = \left| {\frac{{3 + 4 + 12}}{{3 \times 7}}} \right| = \frac{{19}}{{21}}\)
Hence, \(\theta = {\cos ^{ – 1}}\left({\frac{{19}}{{21}}} \right)\)

Q.2. Find the equation of the line which passes through the point \((1, 2)\) and is parallel to the line \(x + 2y – 3 = 0\).
Ans: Let the equation of the line is \(y = mx + c\)
Since the lines are parallel, the slope of the required line would be the same as that of the given line \(x + 2y – 3 = 0\).
Slope of the line \(x + 2y – 3 = 0\) is
\(m = – \frac{1}{2}\)
Now, the line passes through the point \((1, 2)\), so it will satisfy the equation \(y = mx + c\)
\(2 = – \frac{1}{2} \times 1 + c\)
\( \Rightarrow c = 2 + \frac{1}{2} = \frac{5}{2}\)
Therefore, the equation of the line is:
\(y = – \frac{1}{2}x + \frac{5}{2}\)
\(2y = – x + 5\)
Or \(x + 2y – 5 = 0\)

Q.3. By vector method, prove that \(\rm{cos}⁡(α + β) = \rm{cos}\,⁡α\,\rm{cos}\,⁡β – \rm{sin}\,⁡α\,\rm{sin}\,⁡β\).
Ans: Let \(\widehat a = \overrightarrow {OA} \) and \(\widehat b = \overrightarrow {OB} \) be the unit vectors and which make angles \(α\) and \(β\), respectively, with positive \(X-\)axis, where \(A\) and \(B\) are as in the figure. Draw \(AL\) and \(BM\) perpendicular to the \(X-\)axis.

Then \(|\overrightarrow {OL} | = |\overrightarrow {OA} |\cos \alpha = \cos \alpha \), \(|\overrightarrow {LA} | = |\overrightarrow {OA} |\sin \alpha = \sin \alpha \)
So, \(\overrightarrow {OL} = |\overrightarrow {OL} |\hat \imath = \cos \alpha \hat \imath \), \(\overrightarrow {LA} = \sin \alpha ( – \overrightarrow j )\)
Therefore, \(\hat a = \overrightarrow {OA} = \overrightarrow {OL} + \overrightarrow {LA} = \cos \alpha \hat \imath – \sin \alpha \overrightarrow j \) …….(1)
Similarly, \(\hat b = \cos \beta \hat i + \sin \beta \hat j\) …….(2)
The angle between \(\hat a\) and \(\hat b\) is \(α + β\)
\(\hat a \cdot \hat b = |\hat a||\hat b|\cos (\alpha + \beta ) = \cos (\alpha + \beta )\) …….(3)
On the other hand, from (1) and (2)
\(\hat a \cdot \hat b = (\cos \alpha \hat \imath – \sin \alpha \hat j ) \cdot (\cos \beta \hat \imath + \sin \beta \hat j ) = \cos \alpha \cos \beta – \sin \alpha \sin \beta \) ……..(4)
From (3) and (4), we get \(\cos (\alpha + \beta ) = \cos \alpha \cos \beta – \sin \alpha \sin \beta \)

Q.4. Find the angle between the straight lines \(3x + y + 12 = 0\) and \(x + 2y – 1 = 0\).
Ans: To find the slope of a line, we will convert it into slope intercept form
\(y = mx + c\)
For the line \(3x + y + 12 = 0\)
\(y = – 3x – 12\)
Slope \(m_1 = − 3\)
For the line \(x + 2y − 1 = 0\)
\(y = \frac{1}{2}x + \frac{1}{2}\)
Slope \( {m_2} = – \frac{1}{2}\)
Substituting the values of \(m_1\) and \(m_2\) in the formula for the angle between two lines, when we know the slopes of two sides, we have,
\(\tan \theta = \left| {\frac{{\left({{m_2} – {m_1}} \right)}}{{1 + {m_1}{m_2}}}} \right|\)
\(\tan \theta = \left| {\frac{{ – \frac{1}{2} – ( – 3)}}{{1 + \left({ – \frac{1}{2}} \right)( – 3)}}} \right|\)
\(\tan \theta = \left| {\frac{{\frac{5}{2}}}{{1 + \frac{3}{2}}}} \right| = |1|\)
Therefore, \(? = \rm{tan}^{− 1}(1) = 45°\)

Q.5. If \(P (-2, 1)\), \(Q (2,3)\) and \(R (-2, -4)\) are three points, find the angle between the straight lines \(PQ\) and \(QR\).
Ans: The slope of \(PQ\) is given by
\(m = \frac{{{y_2} – {y_1}}}{{{x_2} – {x_1}}}\)
\({m_1} = \frac{{3 – 1}}{{2 – \left({ – 2} \right)}}\)
\({m_1} = \frac{2}{4}\)
Therefore, \({m_1} = \frac{1}{2}\)
The slope of \(QR\) is given by
\( {m_2} = \frac{ { – 4 – 3}}{ { – 2 – 2}}\)
\({m_2} = \frac{7}{4}\)
Therefore, \({m_2} = \frac{7}{4}\)
Substituting the values of \(m_1\) and \(m_2\) in the formula for the angle between two lines, when we know the slopes of two sides, we have:
\(\tan \theta = \pm \frac{{\left({{m_2} – {m_1}} \right)}}{{1 + {m_1}{m_2}}}\)
\(\tan \theta = \pm \frac{{\left( {\left( {\frac{7}{4}} \right) – \left( {\frac{1}{2}} \right)} \right)}}{{1 + \left( {\frac{1}{2}} \right)\left( {\frac{7}{4}} \right)}}\)
\(\tan \theta = \pm \left( {\frac{2}{3}} \right)\)
Therefore, \(\theta = {\tan ^{ – 1}}\left({\frac{2}{3}} \right)\)

Summary

This article discussed the basics of a straight line like definition, equation of a straight line, equation of a straight line parallel to \(X-\)axis, equation of a straight line parallel to \(Y-\)-axis, slope-intercept form of a line.
Furthermore, we have learnt the angle between two straight lines using the tangent formula, angle between two lines (in vector form), angle between two lines cosine formula with solved examples.

Frequently Asked Questions (FAQ) – Angle Between Two Lines

Let’s look at some of the commonly asked questions about angle between two lines:

Q.1. How do you find the acute angle between two lines?
Ans: Let \(y = m_1 x + c_1\) and \(y = m_2 x + c_2\) be the equations of two lines in a plane where:
\(m_1 =\) slope of line \(1\)
\(c_1 = y -\)intercept made by line \(1\)
\(m_2 =\) slope of line \(2\)
\(c_2 = y -\)intercept made by line \(2\)
\(∴\,m_1 = \tan θ_1\) and
\(m_2 = \tan θ_2\)
Let the angle between the two lines be \(θ\) then,
\(\tan \theta = \left|{\frac{{{m_1} – {m_2}}}{{1 + {m_1}{m_2}}}} \right|\)

Q.2. What is the equation of a straight line parallel to the \(X-\)axis?
Ans: Let \(AB\) be a straight line parallel to \(X-\)axis, which is at a distance ‘\(b\)’. Then \(y\) coordinate of every point on \(AB\) is \(b\). Therefore, the equation of \(AB\) is \(y = b\).
If \(b > 0\), then the line \(y = b\) lies above the \(X-\)axis.
If \(b < 0\), then the line \(y = b\) lies below the \(X-\)axis.
If \(b = 0\), then the line \(y = b\) is the \(X-\)axis itself.

Q.3. What is the angle between two lines when direction cosines are given?
Ans: Let the direction cosines of the two lines be \((l_1, m_1, n_1)\) and \((l_2, m_2, n_2)\) respectively. Recall that the direction cosines of a line are the angles between the line and either of the three coordinate axes. Now, let \(θ\) be the angle between the lines. Then, \(\cos \,\theta = \frac{{\left| {{l_1}{l_2} + {m_1}{m_2} + {n_1}{n_2}} \right|}}{{\sqrt {l_1^2 + m_1^2 + n_1^2} \sqrt {l_2^2 + m_2^2 + n_2^2} }}\)

Q.4. What is the angle between two lines in vector form?
Ans: Consider two vectors \(\overrightarrow b \) and \(\overrightarrow d \)
then the acute angle \(θ\) between two straight lines is given by:
\(\theta = {\cos ^{ – 1}}\frac{{|\vec b \cdot \vec d|}}{{|\vec b||\vec d|}}\)

Q.5. What is the value of the product of slopes of two perpendicular lines?
Ans: The product of slopes of two perpendicular lines is \(-1\).

Unleash Your True Potential With Personalised Learning on EMBIBE