(i) The vectors \(\mathbf{OA} = 2\mathbf{i} + \mathbf{j} + 2\mathbf{k}\) and \(\mathbf{OB} = 3\mathbf{i} - 2\mathbf{j} + p\mathbf{k}\) are perpendicular if their dot product is zero:
\((2\mathbf{i} + \mathbf{j} + 2\mathbf{k}) \cdot (3\mathbf{i} - 2\mathbf{j} + p\mathbf{k}) = 0\)
\(2 \times 3 + 1 \times (-2) + 2 \times p = 0\)
\(6 - 2 + 2p = 0\)
\(2p = -4\)
\(p = -2\)
(ii) For \(p = 6\), the vectors are \(\mathbf{OA} = 2\mathbf{i} + \mathbf{j} + 2\mathbf{k}\) and \(\mathbf{OB} = 3\mathbf{i} - 2\mathbf{j} + 6\mathbf{k}\). The dot product is:
\((2\mathbf{i} + \mathbf{j} + 2\mathbf{k}) \cdot (3\mathbf{i} - 2\mathbf{j} + 6\mathbf{k}) = 6 - 2 + 12 = 16\)
The magnitudes are:
\(|\mathbf{OA}| = \sqrt{2^2 + 1^2 + 2^2} = \sqrt{9} = 3\)
\(|\mathbf{OB}| = \sqrt{3^2 + (-2)^2 + 6^2} = \sqrt{49} = 7\)
Using the cosine formula:
\(16 = 3 \times 7 \times \cos \theta\)
\(\cos \theta = \frac{16}{21}\)
\(\theta \approx 40^\circ\)
(iii) The vector \(\mathbf{AB} = (3\mathbf{i} - 2\mathbf{j} + p\mathbf{k}) - (2\mathbf{i} + \mathbf{j} + 2\mathbf{k}) = \mathbf{i} - 3\mathbf{j} + (p - 2)\mathbf{k}\).
The length of \(\mathbf{AB}\) is 3.5:
\(\sqrt{1^2 + (-3)^2 + (p-2)^2} = 3.5\)
\(1 + 9 + (p-2)^2 = 12.25\)
\((p-2)^2 = 2.25\)
\(p-2 = \pm 1.5\)
\(p = 3.5\) or \(p = 0.5\)