The only way I have been able to understand it:<p>- Functions can be thought of as vectors in an inner product space (<a href="https://www.youtube.com/watch?v=TgKwz5Ikpc8" rel="nofollow">https://www.youtube.com/watch?v=TgKwz5Ikpc8</a>)<p>- the "inner product" operation (integral of the product of the two functions): imagine what would happen as you approximate functions as discrete vector with a very high number of dimensions/co-ordinates and computed the dot-product between those two vectors, but scale the result to be invariant of how many dimensions you used to approximate it => you get the integral formula<p>- Now, it's just normal linear algebra:<p>- The "length" of one of these vectors can now be thought of as the square root of the inner product of the function with itself<p>- The "distance" between two functions can now be thought of by subtracting one function from the other, to get a new "vector/function", and compute its length<p>- The cosine of the "angle" between two functions is the dot product between two functions scaled to have length 1<p>- The functions describing a sine or cosine wave are vectors which have a inner-product against themselves of 1, and a dot-product against any other frequencies of 0<p>- Thus the different frequency functions/vectors form an orthonormal basis<p>- This means that you can find the co-ordinates of any function by taking the inner product of the function against each fourier basis function<p>- The "co-ordinates" of your function w.r.t. the orthonormal basis can be computed by taking the inner product against each basis function/vector<p>- This will be the point that minimizes the distance to your actual function<p>- These "co-ordinates" are the fourier co-efficients for the fourier series representation of your function<p>- For non-periodic functions, you can take the limit as your period goes to infinity, that gives you the fourier transform representation.<p>Or, in short:<p>1. Functions can be thought of as vectors in an inner product space (<a href="https://www.youtube.com/watch?v=TgKwz5Ikpc8" rel="nofollow">https://www.youtube.com/watch?v=TgKwz5Ikpc8</a>)<p>2. The Fourier series functions form an orthonormal set of basis vectors<p>3. Now just use normal linear algebra to work out the co-ordinates of your function w.r.t 2