 You surely know the Taylor expansion with which we can approximate function f at a point by a simpler Taylor series. The more terms we take in the Taylor series, the better the approximation becomes in the vicinity of the chosen point. As you can see, the Taylor series represented by this gray function is a good approximation of the function f in the vicinity of the expansion point. However, if we move further away from the point, we see that the Taylor series is not a good approximation there. So the Taylor expansion is a method with which we can approximate a function only locally. But if we care about approximating a function on a whole interval, then we need a Fourier series of the function. As we will see, the Fourier series is a linear combination of simple periodic basis functions, like cosine and sine, or complex exponentials, which in some can approximate the function f within an interval. In the following we assume an interval of the length L. We can represent a vector living in an n-dimensional vector space as a linear combination of basis vectors eK spanning the vector space. You should know this from linear algebra. By the way, this is a modern, much better notation for the old sum sign sigma. With the help of a basis, we can represent every possible vector in this vector space. Here vk are the components of the vector in the chosen basis. The components are not unique. By choosing a different basis, the vector will have different components. We can also apply this concept of linear combination to infinite-dimensional vectors. A function f of x can be interpreted as such an infinite-dimensional vector, which we can then represent as a linear combination. We interpret the function values f of x0, f of x1, f of x2, and so on up to f of x0 plus L as components of f. Here we cheated a bit because the argument x is a real number, and theoretically there are infinitely many values, for example between x0 and x1. Nevertheless, this is still a good way to think of a function as a vector with infinitely many components. In a linear combination for a function, the basis vectors are called basis functions. In optics, the basis functions are also called Fourier modes. The components vk of a finite vector become Fourier coefficients fk tilde if we represent a function and not a finite vector as a linear combination. If we represent a function as such a linear combination of basis functions, then we refer to this sum as a Fourier series of f. You can determine the Fourier coefficients in the same way as you determine the vector components in linear algebra. How does this work again in linear algebra? To get the k-th component of a finite-dimensional vector v, we have to form the scalar product between the k-th basis vector and the vector v. The scalar product of two finite-dimensional vectors is the first component of the k-th basis vector multiplied by the first component of v plus the product of the second components plus the product of the third components and so on. We can write down the sum more compactly with a summation sign. Here we sum over the index j. If we do not work with finite-dimensional vectors but with functions, then we have to form the scalar product between the k-th basis function and the function f to get the k-th Fourier coefficient of f. To indicate that we are working here with an infinite-dimensional vector space, we call this operation not a scalar product but inner product and write it in bracket notation as physicists. Let's first write out the inner product analogously to the finite-dimensional case. The only difference is that we interpret the components of the function as function values, f of x0, f of x1 and so on. We also interpret the components of the basis functions as function values. Here we sum up to the point x equals x0 plus l because Fourier series in general can only be constructed for functions in a finite interval. But don't take this summation mathematically too seriously because we only want to motivate the formula for the inner product for functions. We can compactly write the summation over the function argument with a sum sign. And here we have a problem. How should this summation work at all for a function? The summation index x is a continuous variable in the case of functions. Even between the points x0 and x1, there are theoretically infinitely many other function values which we have simply omitted here. But we can easily eliminate this problem. Because we are dealing with a continuous summation here, we simply have to replace the sum sign with an integral. In order to use this inner product for complex valued functions f, we have to complex conjugate the first argument in the integral. If we would not complex conjugate it, this integral would not be a proper inner product in the case of complex valued functions because it would not satisfy the mathematical properties of an inner product. Therefore, never forget the asterisk. So, hopefully now you understand how to determine the Fourier coefficients and how this formula is obtained. You simply have to form the inner product of the function f with the basis functions. In other words, you have to calculate this integral. Let's move on to the basis functions. Which basis functions can we use for the Fourier series? All those that satisfy the properties of a basis. To call a set of vectors, or as in our case a set of functions, a basis, they must satisfy two conditions. First, the basis functions must be orthonormal. That is orthogonal to each other and normalized. Second, the set of basis functions must be complete. In other words, they must span the space in which the functions f live. A typical basis used in physics are the complex exponential functions 1 over square root of l times eikx. The factor 1 over square root of l ensures that the basis functions are normalized. For each different wave number k, you get a different basis vector. Maybe you have seen another basis for the Fourier series, like cosine and sine. As I said, we are free to choose a basis. Here we just choose complex exponentials as a basis, because they can be written nice and compact, especially for explaining the Fourier series. The Fourier series in this basis of exponentials would then look like this. Let's look at the first property of basis functions, orthonormality. We can check the orthonormality by taking two basis functions with k and k prime and forming the inner product. For the two functions to be orthonormal, their inner product, that is this integral, must yield 1 if k equals k prime. In other words, it yields 1 if we take the inner product of a function with itself. And the inner product must yield 0 if k is not equal to k prime. So if we really take two different functions, we can combine the two cases into one equation if we use a chronicle delta. The second property that the set of function must fulfill in order to be a basis is the completeness relation. With this relation, we make sure that we can represent every function as a linear combination of the chosen basis functions. We can easily show that the set of exponential functions is orthonormal and complete. However, only under one condition. The exponential functions must be l-periodic if we want to represent a function in the interval of the length l as a Fourier series. l-periodic means that the value of the exponential function at the beginning of the interval is equal to the value of the exponential function at the end of the interval. This periodic boundary condition has the consequence that the wave number k cannot be arbitrary but can only take the values 2 pi times n divided by l, where n is an integer. The proof of orthonormality and completeness does not bring much insight, so I'll leave the proof out of the video and you'll find it in the related lesson, linked in the video description. Now you should have a solid intuitive understanding of a Fourier series and how to theoretically construct it for a function. Let's do an example. Let's look at a sawtooth function between 0 and 1, which is defined piecewise as minus x in the range between 0 and 1 half and is 1 minus x in the range between 1 half and 1. The total interval length is l equals 1. Thus, the normalization factor for the exponential basis functions is also 1. When determining Fourier series, we always have to do two things. First, choose a basis, we have already done that, and insert it into the Fourier series. Second, calculate the Fourier coefficients and insert them into the Fourier series as well. You determine the kth Fourier coefficient with the inner product between the kth basis function and the sawtooth function. In other words, we need to calculate this integral. Since the sawtooth function is defined piecewise, we split the integral. In the first integral, we insert minus x and integrate between 0 and 1 half. In the second integral, we put 1 minus x and integrate between 1 half and 1. With integration by parts or with an integral calculator, you can solve the two integrals. As a result, you get 1 divided by i k times e to the power of minus i k over 2. As we know, the wave number k takes only discrete values 2 pi n divided by l. In our case, l is equal to 1. If we insert concrete values for the integer n, we get the individual Fourier coefficients we are looking for. Thus, we have determined all Fourier coefficients for the chosen basis. Let's just insert the Fourier coefficients into the Fourier series and combine the two exponential functions. We are done. This is the Fourier series for the sawtooth function in the considered interval. With this Fourier series for the sawtooth function, we basically got two advantages. First, we can stop the summation in the Fourier series at a certain n value and get an arbitrarily good approximation for the sawtooth function. For example, here you see an approximation where we summed up to n equals 1. But the approximation becomes even better if we sum up to n equals 20. The second advantage is, since we have determined the Fourier coefficients, we know which building blocks the sawtooth function is composed of. This breaking down of the function into individual components is called Fourier analysis. But we will take a closer look at that in another video. With this in mind, may the physics be with you.