I'm having trouble with an algebra exercise. I'm supposed to determine whether the matrix $U$ given by: $$ U = \frac{1}{\sqrt{n}} \pmatrix{u_{0,0} & u_{0,1} & ... & u_{0,(n-1)}\\ u_{1,0} & u_{1,1} & ... & u_{1,(n-1)}\\ ... & ... & ...& ...&\\ u_{(n-1),0} & u_{(n-1),1} & ... & u_{(n-1),(n-1)}} $$ where $ u_{i,j} = \omega^{i-j} $ and $ \omega = e^{2\pi i/n} $ is unitary with $ n=4 $. Assuming that the $i$ in the second expression represents the imaginary constant and not an iterator for scrolling the matrix rows, I have computed the matrix with $ n = 4 $ to be: $$ A_4= \frac{1}{2} \pmatrix{1 & -i & -1 & i\\ i & 1 & -i & -1\\ -1 & i & 1 & -i\\ -i & -1 & i & 1\\} $$
which is definitely hermitian, but not unitary. If I instead assume $ i $ to be the same as the iterator in the previous expression, I get: $$ B_4= \frac{1}{2} \pmatrix{0 & 0 & 0 & 0\\ \pi & 0 & -\pi & -2\pi\\ 4\pi & 2\pi & 0 & -2\pi\\ 9\pi & 6\pi & 3\pi & 0\\} $$ which is singular, so not in any way unitary! The exercise is quite unclear with it's variables, but there is no way I can figure out to make this matrix unitary... which seems to be the case since in the next section I have to prove that it is in fact unitary with $n$ equal to any positive integer. Any help?
I suspect this is a typo and it should be $\omega^{i\cdot j}$. The resulting matrix is unitary, and its unitarity is relevant for the discrete Fourier transform. Also, the indexing of the matrix elements is unconventional (the indices would usually start at $1$), and that wouldn’t make a difference for $i-j$, but it does for $i\cdot j$.