Source: http://www-personal.umich.edu/~hyunjinp/notes/n-dft.pdf