Grover's Algorithm: Why is the amplitude of $\left|a\right>$ after the second iteration $\frac{1}{\sqrt{N}}(5-\frac{20}{N}+\frac{16}{N^{2}})$?
If I apply the Grover operator twice to the initial state of the system \begin{equation*}G^{2}\left(\begin{matrix}\operatorname{sin}(\frac{\theta}{2})\\ \operatorname{cos}(\frac{\theta}{2})\end{matrix}\right)\end{equation*} I get \begin{equation*}\left(\begin{matrix}\operatorname{cos}(2\theta) & \operatorname{sin}{2\theta}\\ -\operatorname{sin}(2\theta) & \operatorname{cos}(2\theta)\end{matrix}\right)\left(\begin{matrix}\operatorname{sin}(\frac{\theta}{2})\\ \operatorname{cos}(\frac{\theta}{2})\end{matrix}\right)=\left(\begin{matrix}\operatorname{sin}(\frac{3\theta}{2})\\ \operatorname{cos}(\frac{3\theta}{2})\end{matrix}\right)\end{equation*} Can you please explain to me how applying the oracle operator to this yields a phase of $\frac{1}{\sqrt{N}}(5-\frac{20}{N}+\frac{16}{N^{2}})$?