So my task is to compute the discrete fourier transform of a 4-dimensional real vector $x$, which is an easy task. But then I need to count the amount of operations that it took and compare it to how many it would take using the fast fourier transform instead.
The vector that was used: $x = [\pi, \frac{\pi}{2}, 0, \frac{\pi}{2}]^T$
The transform was done as the following:
$y = F_4x = \frac{1}{2} \begin{pmatrix}1 & 1 & 1 & 1 \\ 1 & -i & -1 & i \\ 1 & -1 & 1 & -1 \\ 1 & i & -1 & -1\end{pmatrix} \begin{pmatrix} \pi \\ \frac{\pi}{2} \\ 0 \\ \frac{\pi}{2}\end{pmatrix} = \begin{pmatrix} \pi \\ \frac{\pi}{2} \\ 0 \\ \frac{\pi}{2}\end{pmatrix}$
So to count the operations that were necessary, I counted for each row 4 multiplications, 3 additions and one extra multiplication when multiplying in the 1/2.
This leads to $4*(4+3+1)=32$ operations. Now in theory DFT has the complexity $O(n^2)$ which in this case would be $16$. Meanwhile the correct answer according to my material is supposed to be $4*2(4+3)=56$ operations which I don't understand.
The complexity of the fast fourier transform is $O(nlog_2 n)$, but in my material the operations are counted as $2nlog_2n$ which I don't understand either.