# 2-D DFT of a matrix PxP and 1-D DFT of a vector of size P^2?

What is the difference between the following two things:

• make a 2-D Discrete Fourier Transform of a certain matrix A[p,p],

• first reshape this matrix into a 1-D vector a[p^2,1], and compute the 1-D DFT of this vector?

Matlab shows the result is completely different, but I don't understand why, and is there a way to say how this two things can be equivalent? The second question is more important.

Thank you.

-
You have two different ways to transform $9$ given numbers into $9$ new numbers and ask why the result is not the same. You might also ask why $\sqrt{x+y}$ is not $=\sqrt{x}+\sqrt{y}$. Try to understand the underlying structures and ideas! –  Christian Blatter Dec 26 '12 at 20:06