# 11c.3. Angles

Let us first recall the dot product formula that is very useful in calculating angles between vectors:
$$\cos \theta = \displaystyle \frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}| \, |\mathbf{b}|}.$$

### Angle between two lines

We will use the dot product formula to calculate the angle between two lines. Two things to take note:
• Use the direction vectors. NOT the position vectors of the points on the lines. (Do you know why?)
• When we work with infinite lines, we are often interested in acute angles. The dot product formula sometimes give us obtuse angles. To obtain an acute angle, we can either use the formula $180^\circ - \theta$ if we obtain an obtuse angle, or add an extra modulus to our dot product formula (cosines of acute angles are positive).

### Angle between two planes

To find the angles between two planes, we use the same formula. Observe that the angle between two planes will be the same as the angle between the normal vectors of the planes. Hence we will use the normal vectors (do not use direction vectors) of the planes.

### Angle between a line and a plane

The situation for the angle between a line and a plane is slightly more complicated, so be careful. We use the direction vector when working with lines, and the normal vector when working with planes. Applying the dot product formula on these two vectors will give us the angle between them. We denote this by $\alpha$.
If we look at the picture, we will see that $\alpha$ is not quite the angle between the line and the plane. It is off by $90^\circ$.

One solution will be to use the formula $90^\circ - \alpha$ after we obtain $\alpha$ from the dot product formula. An alternative, is to use the trigonometric formula $\sin (90^\circ - \alpha) = \cos \alpha$. If we denote the angle between a line and a plane by $\theta$, we get the formula:

### Solution to examples

$\displaystyle \cos \theta = \frac{\left | \begin{pmatrix} 1 \\ 2 \\ -3 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ -2 \\ 1 \end{pmatrix} \right |}{\left | \begin{pmatrix} 1 \\ 2 \\ -3 \end{pmatrix} \right| \, \left | \begin{pmatrix} 1 \\ -2 \\ 1 \end{pmatrix} \right | } \\ \displaystyle \theta = \cos^{-1} \frac{|-6|}{\sqrt{14}\sqrt{6}} \\ = 49.1^\circ$.

$\displaystyle \sin \theta = \frac{\left | \begin{pmatrix} 1 \\ 2 \\ -3 \end{pmatrix} \cdot \begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix} \right |}{\left | \begin{pmatrix} 1 \\ 2 \\ -3 \end{pmatrix} \right| \, \left | \begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix} \right | } \\ \displaystyle \theta = \sin^{-1} \frac{|-19|}{\sqrt{14}\sqrt{38}} \\ = 55.5^\circ$.

$\displaystyle \cos \theta = \frac{\left | \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix} \right |}{\left | \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix} \right| \, \left | \begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix} \right | } \\ = \displaystyle \frac{|4|}{\sqrt{3}\sqrt{38}} \\ = \displaystyle \frac{4}{\sqrt{114}}$