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

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

v•w = |v| |w|cos Ø

v•w = 6 - 1 = 5
5 = √10√5cosØ
cosØ = 5/√50
Ø = 45°

To find the angle Q between the given vectors v and w using the law of cosines, we can use the formula:

cos(Q) = (v ⋅ w) / (|v| |w|)

Let's calculate step by step:

1. Calculate the dot product of the vectors v and w, denoted by (v ⋅ w). The dot product is calculated by multiplying the corresponding components of the vectors and adding them up.

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

2. Calculate the magnitudes (lengths) of the vectors v and w. The magnitude of a vector is calculated using the Pythagorean theorem.

|v| = sqrt(3² + 1²) = sqrt(9 + 1) = sqrt(10)
|w| = sqrt(2² + (-1)²) = sqrt(4 + 1) = sqrt(5)

3. Substitute the values into the formula for the law of cosines:

cos(Q) = (v ⋅ w) / (|v| |w|)
cos(Q) = 5 / (sqrt(10) * sqrt(5))

4. Simplify the expression:

cos(Q) = 5 / (sqrt(10) * sqrt(5))
cos(Q) = 5 / sqrt(50)
cos(Q) = 5 / (sqrt(25 * 2))
cos(Q) = 5 / (5 * sqrt(2))
cos(Q) = 1 / sqrt(2)

5. Take the inverse cosine (arccos) of both sides to isolate Q:

Q = arccos(1 / sqrt(2))

Using a calculator, we find:

Q ≈ 0.7854 radians or ≈ 45 degrees

Therefore, the angle Q between the given vectors v and w is approximately 0.7854 radians or 45 degrees.