Matching orientations of 2-d arrays of values -- using fft? I was discussing the following problem (a subproblem of a personal project I'm working on) with a professor: we're given two 2-d arrays of values. We know them to be identical, but they might not be oriented corrected -- i.e., 0 0 7 0 7 7 0 7 0 7 0 8 0 9 9 0 and 0 7 8 0 7 0 0 9 0 7 7 9 0 7 0 0 I'm working with much much bigger arrays, and was saying that checking to see if they line up, recalculating/turning and checking again was going to be a huge time sink. He suggested that I look into Fast Fourier Transforms. I'm an undergrad, currently taking Diff Eq, and I've never dealt with fourier transforms. So far, it seems to me that in order to use FFTs, I'll have to extrapolate (somehow? I think using diff eqs?) a function describing arrays, and then, using another function (the fourier transform), transform one function into another function, so that I'm just comparing functions. (Does that make any sense?) As is probably obvious, I'm having a hard time understanding fourier transforms and how this relates. Can anyone help point me in the right direction? Thanks!