# How to perform an operation on a signal which depends on 2 variables?

How do we perform DFT when the input signal depends on 2 variables (like in a image the color of the pixel depends on both $$x$$ and $$y$$)

• You mean like a Multidimensional DFT ?
– Jdip
Dec 20, 2022 at 13:36
• Yes multidimensional DFT. Dec 20, 2022 at 13:47
• My answer got answered should I delete the question? Dec 20, 2022 at 14:08
• No. @Jdip should have actually answered the question, instead of putting the answer in a comment. Stackexchange is here for everyone; don't delete your questions when they get answered! Dec 20, 2022 at 18:09
• @TimWescott I wasn’t sure what the question was about, and if indeed the OP was looking for a 2D DFT, didn’t think it was worth a full answer. I’ve seen others put answers in the comments when they’re “obvious” and don’t require detailed explanations. But duly noted! I’ll make sure to actually answer next time, however short the answer is.
– Jdip
Dec 20, 2022 at 18:51

So if you have some signal $$a(x, y)$$, the Fourier transform of it would be
$$A(\omega_x, \omega_y) = \mathcal F_y \{\mathcal F_x \{a(x, y)\}\},$$ where I'm letting $$\mathcal F_x$$ mean the Fourier transform over $$x$$ and $$\mathcal F_y$$ mean the Fourier transform over $$y$$.