Difference between 2D DFT's and 1D DFT's of Linearized Matrices I have recently left the safe and easy MATLAB environment and begun to use CUDA-C/C++ for image processing.   Since CUDA doesn't allow 2D arrays to be passed into kernels I am now used to linearizing my gray-scale images (2D matrices) into 1D arrays before processing them.  I seem to have no problem applying 1D-DFT's to my linearzied arrays.  This leads me to wonder why people use 2D-DFT's at all?   Why not just linearize your matrices into 1D-arrays and apply 1D-DFT's?

Can 1D-DFT's always operate on 2D-data by simply laying the matrix out into a 1D array?
The DFT is "Separable Operator" (Also the classic Fourier Transform) and hence can be applied on the Rows and Columns of the image separately (It can be generalized to N dimension and not only 2).
Yet, if you create  1D signal from your image (Let's say by Column Stack) and apply 1D DFT you don't get the information you would by using 2D DFT (By going on the Row and them Columns).  

Remember, Fourier Transform is all about synthesizing the signal using different functions. In this case if it is 2D signal you want to build it using 2D Signals.

You need to play with the indices to first apply it on each row and later on each column.