(i) Find direction vectors for \(\overrightarrow{AB}\) and \(\overrightarrow{CD}\):
\(\overrightarrow{AB} = (5 - 4)\mathbf{i} + (-2 - 0)\mathbf{j} + (-2 - 1)\mathbf{k} = \mathbf{i} - 2\mathbf{j} - 3\mathbf{k}\)
\(\overrightarrow{CD} = (-1 - 1)\mathbf{i} + (0 - 1)\mathbf{j} + (-4 - 0)\mathbf{k} = -2\mathbf{i} - \mathbf{j} - 4\mathbf{k}\)
Calculate the cosine of the angle:
\(\cos \theta = \frac{\overrightarrow{AB} \cdot \overrightarrow{CD}}{|\overrightarrow{AB}| |\overrightarrow{CD}|}\)
\(\overrightarrow{AB} \cdot \overrightarrow{CD} = (1)(-2) + (-2)(-1) + (-3)(-4) = -2 + 2 + 12 = 12\)
\(|\overrightarrow{AB}| = \sqrt{1^2 + (-2)^2 + (-3)^2} = \sqrt{14}\)
\(|\overrightarrow{CD}| = \sqrt{(-2)^2 + (-1)^2 + (-4)^2} = \sqrt{21}\)
\(\cos \theta = \frac{12}{\sqrt{14} \times \sqrt{21}} = \frac{12}{\sqrt{294}}\)
\(\theta = \cos^{-1}\left(\frac{12}{\sqrt{294}}\right) \approx 45.6^{\circ} \text{ or } 0.796 \text{ radians}\)
(ii) Use line equations:
\(\overrightarrow{r} = \overrightarrow{OA} + \lambda \overrightarrow{AB} = (4 + \lambda)\mathbf{i} + (-2\lambda)\mathbf{j} + (1 - 3\lambda)\mathbf{k}\)
\(\overrightarrow{r} = \overrightarrow{OC} + \mu \overrightarrow{CD} = (1 - 2\mu)\mathbf{i} + (1 - \mu)\mathbf{j} + (-4\mu)\mathbf{k}\)
Equate components and solve:
\(4 + \lambda = 1 - 2\mu\)
\(-2\lambda = 1 - \mu\)
\(1 - 3\lambda = -4\mu\)
Solving gives \(\lambda = -1\), \(\mu = 1\), showing lines intersect.
(iii) Find \(\overrightarrow{PQ}\) for a general point \(Q\) on \(AB\):
\(\overrightarrow{PQ} = (3 - 5\lambda)\mathbf{i} + (5 + 2\lambda)\mathbf{j} + (6 + 3\lambda)\mathbf{k}\)
Calculate \(\overrightarrow{PQ} \cdot \overrightarrow{AB}\) and equate to zero:
\((3 - 5\lambda) + (-4\lambda) + (-18 - 9\lambda) = 0\)
Solve for \(\lambda\):
\(-18\lambda = -18 \Rightarrow \lambda = -2\)
\(\overrightarrow{PQ} = -5\mathbf{i} + 4\mathbf{j} + \mathbf{k}\)
\(|\overrightarrow{PQ}| = \sqrt{(-5)^2 + 4^2 + 1^2} = \sqrt{42}\)
\(\text{Distance} = \frac{|\overrightarrow{PQ} \times \overrightarrow{AB}|}{|\overrightarrow{AB}|} = \sqrt{3}\)