To find the angle \( \theta \) between the vectors \( \vec{a} \) and \( \vec{b} \), we use the dot product formula:
\(\vec{a} \cdot \vec{b} = |\vec{a}| |\vec{b}| \cos \theta\)
First, calculate the dot product \( \vec{a} \cdot \vec{b} \):
\(\vec{a} \cdot \vec{b} = (1)(2) + (2)(-1) + (1)(2) = 2 - 2 + 2 = 2\)
Next, find the magnitudes of \( \vec{a} \) and \( \vec{b} \):
\(|\vec{a}| = \sqrt{1^2 + 2^2 + 1^2} = \sqrt{1 + 4 + 1} = \sqrt{6}\)
\(|\vec{b}| = \sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{4 + 1 + 4} = \sqrt{9} = 3\)
Now substitute these into the cosine formula:
\(\cos \theta = \frac{\vec{a} \cdot \vec{b}}{|\vec{a}| |\vec{b}|} = \frac{2}{\sqrt{6} \times 3} = \frac{2}{3\sqrt{6}}\)
Simplify we get:
\(\cos \theta = \frac{2}{3\sqrt{6}} = \frac{2}{3} \times \frac{\sqrt{6}}{6} = \frac{2\sqrt{6}}{18} = \frac{\sqrt{6}}{9}\)
Further simplification leads to:
\(\cos \theta = \frac{\sqrt{6}}{9} = \frac{6}{\sqrt{30}}\)
Therefore, \(\theta = \cos^{-1}\left(\frac{6}{\sqrt{30}}\right)\).
Given Vectors:
Step 1: Compute the Dot Product
\[ \vec{a} \cdot \vec{b} = 1 \cdot 2 + 2 \cdot (-1) + 1 \cdot 2 = 2 - 2 + 2 = 2 \]
Step 2: Calculate the Magnitudes of the Vectors
\[ |\vec{a}| = \sqrt{1^2 + 2^2 + 1^2} = \sqrt{6}, \quad |\vec{b}| = \sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{9} = 3 \]
Step 3: Use the Dot Product Formula for Cosine of the Angle
\[ \cos \theta = \frac{\vec{a} \cdot \vec{b}}{|\vec{a}| |\vec{b}|} = \frac{2}{3\sqrt{6}} \] Rationalizing: \[ \cos \theta = \frac{2}{3\sqrt{6}} = \frac{6}{\sqrt{30}} \] Therefore, the angle between the vectors is: \[ \theta = \cos^{-1}\left(\frac{6}{\sqrt{30}}\right) \]
The angle \( \theta \) between the vectors \( \vec{a} \) and \( \vec{b} \) is: \[ \boxed{\theta = \cos^{-1}\left(\frac{6}{\sqrt{30}}\right)} \]
The projection of the vector \(a=2i-3j+4k \)on the vector \(b=i+2j+2k\) is ?