If vectors $\mathbf{a}$ and $\mathbf{b}$ are given and $|\mathbf{a}|=|\mathbf{b}| = 1$, find the angle between $\mathbf{a}$ and $\mathbf{b}$ so that vectors $\mathbf{p}=\sqrt{3}\, \mathbf{a}-\mathbf{b}$ and $\mathbf{q}=-\mathbf{a}+\sqrt{3}\, \mathbf{b}$ are perpendicular.
I don't really know how to begin solving this problem. Any input is appreciated.
The given answer is $\dfrac{\pi}{6}$.
So we know that via the inner product; if $\vec{p}$ and $\vec{q}$ are perpendicular, then:
$$\vec{p}\cdot\vec{q}=0$$
Therefore, substituting the given expressions for $\vec{p}$ and $\vec{q}$ into this, we require:
$$(\sqrt{3}\vec{a} - \vec{b})\cdot(-\vec{a}+\sqrt{3}\vec{b}) = 0$$
Expanding this, we have:
$$-\sqrt{3}(\vec{a}\cdot\vec{a}) +(\vec{b}\cdot\vec{a}) + 3(\vec{a}\cdot\vec{b}) - \sqrt{3}(\vec{b}\cdot\vec{b}) = 0$$
However, we also know that for any vector $\vec{v}$, $\vec{v}\cdot\vec{v} = \|\vec{v}\|^{2}$. And we know that $\|\vec{a}\| = \|\vec{b}\| = 1$. Thus:
$$-\sqrt{3} + 4(\vec{a}\cdot\vec{b}) - \sqrt{3} = 0 \implies 4(\vec{a}\cdot\vec{b}) = 2\sqrt{3} \implies \vec{a}\cdot\vec{b} = \frac{\sqrt{3}}{2}$$
Going to our definition of the dot product: $\vec{u}\cdot\vec{v} = \|\vec{u}\|\|\vec{v}\|\cos(\theta_{uv})$. Therefore:
$$\cos(\theta_{uv})=\frac{\sqrt{3}}{2} \implies \theta_{uv} = \cos^{-1}\left(\frac{\sqrt{3}}{2}\right) = \frac{\pi}{6}$$