### Instruction: A line is parameterized by
\[\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ -2 \end{pmatrix} + t \begin{pmatrix} 3 \\ 4 \end{pmatrix}.\]A second line is parameterized by
\[\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} -8 \\ 12 \end{pmatrix} + u \begin{pmatrix} 1 \\ 3 \end{pmatrix}.\]If $\theta$ is the acute angle formed by the two lines, then find $\cos \theta.$.### Response: So let's first find the direction vector of the first line.
That's given by $\begin{pmatrix} 3 \\ 4 \end{pmatrix}$.
Right. Now let's find the direction vector of the second line.
That's given by $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$.
Now let's take the dot product of those two vectors.
That's $3\cdot 1 + 4\cdot 3 = 3 + 12 = 15$.
Let's also find the magnitude of the first vector.
That's $\sqrt{3^2 + 4^2} = 5$.
And let's also find the magnitude of the second vector.
That's $\sqrt{1^2 + 3^2} = \sqrt{10}$.
Now we can find the cosine of the angle by using the formula $\cos \theta = \frac{\text{dot product of the two vectors}}{\text{magnitude of the first vector} \times \text{magnitude of the second vector}}$.
So we have $\cos \theta = \frac{15}{5\sqrt{10}} = \frac{3}{\sqrt{10}}$.
Let's rationalize the denominator.