I've been trying to learn the Discrete Fourier Transformation (DFT) and the Inverse DFT (IDFT).
From Wikipedia, I gather we can define the matrix transformations for the DFT as follows. Let $\omega= e^{-2\pi i/N}$ and let $$\mathbf{W}= \left[\frac{\omega^{jk}}{\sqrt{N}}\right]_{j,k=0,\cdots,N-1}$$
Then we can take a vector $\mathbf{x}$ and transform it via
$$\mathbf{X} = \mathbf{W}\mathbf{x}$$
Source: https://en.wikipedia.org/wiki/DFT_matrix
Question 1: Does the DFT always involve a $\frac{1}{\sqrt{N}}$ term? I noticed that in many cases it seems defined without that, e.g.
Source: https://en.wikipedia.org/wiki/Discrete_Fourier_transform
Now, $\mathbf{W}$ is a unitary matrix and therefore $\mathbf{W}^{*}\mathbf{W}=\mathbf{I}_{N}$. I have read that the IDFT is then defined as
$$\mathbf{x} = \frac{1}{N}\mathbf{W}^{*}\mathbf{X}$$
Source: https://www.kth.se/social/upload/50919490f2765474b1890dde/lec2.pdf
Ok, so if we put these together
$$\mathbf{x} = \frac{1}{N}\mathbf{W}^{*}\mathbf{X} = \frac{1}{N}\mathbf{W}^{*}\left(\mathbf{W}\mathbf{x}\right)=\frac{1}{N}\mathbf{I}_{N}\mathbf{x}=\frac{1}{N}\mathbf{x}$$
which obviously doesn't make any sense.
Question 2: What is wrong with my definitions of the DFT and IDFT such that it isn't inverting properly?
