1
$\begingroup$

I'm trying to understand Fourier Transforms, so I thought I'd try to explain the following in an english sentence, but I can't.

If I bury myself in equations, I can trick myself into understanding the theory, but clearly I don't understand since I can't explain this simple picture (I realize it's not a periodic function, but I was hoping that by fully internalizing the theory, I would be able to explain what's going on in this picture).

I plotted 1000 random sorted integers between 0 and 1000 (in blue) and then plotted the discrete Fourier transform against that (in red). What is the meaning of the resulting graphs? I'm not even sure what the axes are.

enter image description here

$\endgroup$
5
  • 2
    $\begingroup$ I wonder if this would be more appropriate for the Mathematics SE site. Do you see this question as statistical? $\endgroup$
    – gung
    May 4, 2016 at 1:21
  • $\begingroup$ @gung I'll move. Sorry. $\endgroup$
    – huhhuh
    May 4, 2016 at 1:31
  • $\begingroup$ No need to apologize. Please don't cross post, though. That is against SE policy. Flag your question to be migrated. If you do post there, delete this one. $\endgroup$
    – gung
    May 4, 2016 at 1:48
  • $\begingroup$ I can't reproduce. Do you know what you are doing? $\endgroup$ May 4, 2016 at 9:56
  • $\begingroup$ @mathreadler I'm literally just sorting a [list of 1000 unique random ints] and then applying fft to that list. $\endgroup$
    – huhhuh
    May 4, 2016 at 17:54

2 Answers 2

1
$\begingroup$

You did not choose the easiest function to understand fourier transforms.

I advise you to begin with fourier series, which is applicable for any periodic function (such that its fourier series exists and converges, that includes all periodic continuous functions)

Try the fourier transform of a sum of sines.

Then, if you want to, you can calculate the fourier series of a square or triangle function, (it will have an infinite number of non-null points).

Try to sum the first twenty terms of a fourier series (for the triangle function for instance).

Then try some fourier transforms.

$\endgroup$
1
$\begingroup$

Lets notice some key aspects of the DFT graph first:

1) It "seems" to be periodic, and unfortunately the original spatial graph does not have slope 1 (i.e. f(x) = x), so the period is not 1000, but instead something around 630?

2) It looks "strongest" around the endpoints. Because we are dealing with the discrete FT, if it is "strong" at the left end point, it will be strong at the right too.

3) I am not sure why the transformed plot is zero-ed out at $-500,$ this seems off to me. One would expect the fourier transformed data ${\hat f(n)}$ to be approximately 500 for very small $n.$ Why? Because the mean value of $f(x)$ is $500$.

Now to discuss what these things mean. The Fourier Transform (Discrete FT) is transforming your spatial function $f(x)$ to a reciporical space function ${\hat f}(n).$ This isn't magic, just look at the dimensions of the units in the transform, \begin{equation} {\hat f}(n) = \int f(x) e^{inx} \; dx. \end{equation} The exponential must be raised to a dimensionless quantity, so $n$ has the dimensions of $1/$length, if $x$ has dimensions length. This means the $y$ axis of the transform graph has units proportional to $1/x.$ Also, if $x$ has units of time, then the Fourier space is commonly referred to as frequency space. In physics, it many times is presented as momentum space.

How to interpret the result: Since variable $n$ can be though of as frequency, the $y$ axis is the relative "strength" of that frequency in your function $f.$ For example, if $f$ was the addition of two sine waves of different frequency, its ${\hat f}$ would have 2 nonzero values corresponding to those two frequencies. The DFT is typically a dirty looking graph, simply because you deal with non-smooth data, but the intepretation is the same. Your original $f$ can be decomposed (or written as) a combination of low frequency waves, and ${\hat f}$ is telling you how strong those frequencies are present in $f.$

The last point corresponding to (1) above that I wanted to make was the periodicity. Built into the DFT is the assumption that your data is periodic, with the period of the size of your data. Meaning if you have $f$ defined on $0< x < 1000,$ the DFT assumes your function repeats after $x$ passes 1000. This is why the DFT graph appears periodic as well. Generally, it shouldn't be interpreted that there are "really strong" high frequencies in your original $f.$

$\endgroup$
1
  • $\begingroup$ Good answer but probably needs more practice and trial and error first to know what we are doing. $\endgroup$ May 4, 2016 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .