# Fourier Transform questions

## Recommended Posts

I've been implementing a (Discrete) Fourier transform (and it's inverse) in C++ and was wondering about two things in particular,

1. How does e^-i (negative) differ from e^i when representing this using Euler's formula?

I know that anything to the power of a negative value is it's reciprocal (e.g. 2^-1 = 1/2) but I'm a bit confused whether this changes the Euler's formula (cos(w) + isin(w)) or not.

and

2. Why does the inverse Fourier transform get normalized at the end (i.e sum/numsamples) whereas the normal Fourier transform does not?

##### Share on other sites
[quote name='staticVoid2' timestamp='[url="tel:1320597004"]1320597004[/url]' post='[url="tel:4881088"]4881088[/url]']
I've been implementing a (Discrete) Fourier transform (and it's inverse) in C++ and was wondering about two things in particular,

1. How does e^-i (negative) differ from e^i when representing this using Euler's formula?

I know that anything to the power of a negative value is it's reciprocal (e.g. 2^-1 = 1/2) but I'm a bit confused whether this changes the Euler's formula (cos(w) + isin(w)) or not.[/quote]
e^-i = e^(-1)i = cos(-1) + isin(-1) = cos(1) - isin(1)
e^i = e^(1)i = cos(1) + isin(1)

[quote name='staticVoid2' timestamp='[url="tel:1320597004"]1320597004[/url]' post='[url="tel:4881088"]4881088[/url]']and

2. Why does the inverse Fourier transform get normalized at the end (i.e sum/numsamples) whereas the normal Fourier transform does not?
[/quote]

Which one gets normalized is a convention. You could multiply the normal one instead of dividing the inverse one. The reason you have to do it is (vaguely) because when going from time domain to frequency domain your "unit of measure" changes from s to rad/s.

##### Share on other sites
[quote name='staticVoid2' timestamp='1320597004' post='4881088']
I know that anything to the power of a negative value is it's reciprocal (e.g. 2^-1 = 1/2) but I'm a bit confused whether this changes the Euler's formula (cos(w) + isin(w)) or not.
[/quote]

Barsiwek has answered your questions, but I just wanted to elaborate a little on this point.

Euler's formula gives exp(ia) = cos(a) + i * sin(a), and exp(-ia) is the reciprocal of exp(ia), so

exp(-ia) = 1 / (cos(a) + i * sin(a))

But mostly we don't like having imaginary numbers in the denominator so you can use this little trick,

exp(-ia) = (1 / (cos(a) + i * sin(a))) * ((cos(a) - i * sin(a)) / (cos(a) - i * sin(a))

where the new term is the compliment of cos(a) + i * sin(a) over itself, i.e. it is one. But now if we multiply through

exp(-ia) = (cos(a) - i * sin(a)) / (cos^2(a) + sin^2(a))

and since cos^2(a) + sin^2(a) = 1,

exp(-ia) = cos(a) - i * sin(a).

So, just using Euler's formula you can see that taking the reciprocal also works (as it should).

-Josh

##### Share on other sites

So if e^-i is cos(w) - isin(w) does this mean you just negate the imaginary part?

I'm filtering the signal in the frequency domain to blur the image and it seems to be working but after looking at the code I've realized that I'm not
accounting for the e^-i at all. The fourier transform and it's inverse seem to be practically identical apart from the normalization part I perform in the inverse.

Edit:

Ok, A problem I was having was that the image was transposed on output. I changed cos(w) + isin(w) to cos(w) - isin(w) by negating the imaginary part (in the forward fourier transform) and it seems to be outputting correctly now. I take it all I had to do was negate this imaginary part?

##### Share on other sites
[quote name='staticVoid2' timestamp='1320930743' post='4882569']

So if e^-i is cos(w) - isin(w) does this mean you just negate the imaginary part?[/quote]
That should be e^(-iw). And yes, it does mean that, but you can deduce it yourself from Euler's identity and the fact that sin(-x) = -sin(x). You can answer most questions in Math yourself, and you should try to get in the habit of doing that.

##### Share on other sites
Thanks, I just never knew if e.g. (1 - i) was any different than (1 + (-i)) when talking about complex numbers.

##### Share on other sites
What is confusing me even more now is that my lecture has given me this definition of a Fourier transform:

[url="http://imageshack.us/photo/my-images/689/fourier1.gif/"][img]http://img689.imageshack.us/img689/6813/fourier1.gif[/img][/url]

and on Wikipedia it has it as:

[url="http://imageshack.us/photo/my-images/259/fourier2.gif/"][img]http://img259.imageshack.us/img259/5656/fourier2.gif[/img][/url]

And the inverse transforms are pretty much these two again switched around and they are integrating with respect to omega. Which one is correct?

##### Share on other sites
It's a matter of convention, and I believe different fields use different conventions.

I think applying the 1/(2*pi) scale during the inverse transform is more common. I have even see people using 1/sqrt(2*pi) in front of both, thus making the transform and its inverse only differ by the sign in front of "iwt". All these options only differ in scale and perhaps one complex conjugation, so it's no big deal.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628312
• Total Posts
2981999

• 9
• 9
• 13
• 11
• 13