Use the law of cosines to find the angle Q between the given vectors.

v = 3i + j w = 2i - j

To use the law of cosines to find the angle between two vectors, you first need to find the dot product of the vectors and the magnitudes of each vector.

The dot product of two vectors v and w is given by the formula:
v · w = |v| |w| cos(Q)

where |v| and |w| are the magnitudes of vectors v and w, and Q is the angle between the vectors.

In this case, the two given vectors are:
v = 3i + j
w = 2i - j

To find the dot product of v and w, we need to multiply the corresponding components of each vector and sum them up:

v · w = (3 * 2) + (1 * -1)
= 6 + (-1)
= 5

Next, we need to calculate the magnitudes of the vectors. The magnitude of a vector v = xi + yj is calculated by taking the square root of the sum of squares of its components:
|v| = sqrt(x^2 + y^2)

For vector v = 3i + j:
|v| = sqrt(3^2 + 1^2)
= sqrt(9 + 1)
= sqrt(10)

Similarly, for vector w = 2i - j:
|w| = sqrt(2^2 + (-1)^2)
= sqrt(4 + 1)
= sqrt(5)

Now, we can substitute the obtained values into the law of cosines formula to solve for the angle Q:

5 = sqrt(10) * sqrt(5) * cos(Q)

Dividing both sides by sqrt(10) * sqrt(5):

cos(Q) = 5 / (sqrt(10) * sqrt(5))

Simplifying the right side:

cos(Q) = 1 / sqrt(2)

To find the angle Q, take the inverse cosine (also known as arccos) of both sides:

Q = arccos(1 / sqrt(2))

Using a calculator, we find that:

Q ≈ 45 degrees

Therefore, the angle Q between vectors v and w is approximately 45 degrees.