We have

\(\vec A.\vec B\)= | A | | B | cos θ

Here | A | = \(\sqrt{1^2+1^2+(-2)^2}=\sqrt6\)

| B | =\(\sqrt{1^2+1^2+(-1)^2}=\sqrt3\)

\(\vec A.\vec B=(\hat i+\hat j-\hat k).(\hat i+\hat j-\hat k)\)

= 1 × 1 + 1 × 1 + (-2)(-1)

= 1 + 1 + 2 = 4

∴ cos θ = \(\frac{\vec A.\vec B}{|A||B|}=\frac{4}{\sqrt6\sqrt3}\)

cos θ = \(\frac{4}{\sqrt{18}}\)