Working FFT and IFFT for Square Matrix