Preface

We've probably all heard of the Fourier Series → but do we know what exactly it is?

In this blog post, I'll try distilling these concepts one by one. Hopefully, by the end, you know what's happening when you hear these terms, either in Machine Learning literature or Math-related content.

But, before we touch Fourier series, let's look at what sequences and series are for a bit of intuition.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c9067f38-8c2a-4353-a907-4b1824397689/Untitled.png

Note: It'd be nice if you can follow along with a pen and piece of paper. Whenever you're stuck on a particular equation or expression, you can annotate the math.


What's a Sequence

You can skip this if you know what I'm talking about.

Before we cover what a Series is, let's look at Sequences. Sequences are an infinite or finite bunch of terms that come one after another. Most sequences follow some kind of pattern → a general rule that allows you to find the next term in said sequence.

Let's look at all the odd numbers. It's a sequence.

$$ 1,~3,~5,~7,~9,~11,~13,~15,~... $$

So is all the even numbers.

$$ 2,~4,~6,~8,~10,~12,~14,~... $$

So is this other thing:

$$ 1,~4,~9,~16,~25,~36,~49,~64,~81,~... $$

Do you see a trend in these sequences? All of them have some sort of number pattern. You can come up with a general formula to get the $n^{\text{th}}$ term in the sequence.

General Formulas

For the odd numbers, the formula is $2n-1$. To get any term at an index $n$, we substitute that value of $n$ into $2n-1$ to calculate it. For instance, the 4$^{\text{th}}$ term in the series would be $2(4)-1 = 7$ and the 100$^{\text{th}}$ term would be $2(100)-1 = 199$. Rightfully so.

For the even numbers, the general formula is $2n$. For the last one, it's $n^2$. For all cases, the initial value of $i$ is $1$. Go ahead and substitute different values of $n$ to get the $n^{\text{th}}$ term of the sequence.