# 24. Markov Matrices; Fourier Series

**Channel:** MIT OpenCourseWare
**Source:** https://www.youtube.com/watch?v=lGGDIGizcQ0
**Transcript page:** https://www.withtranscript.ai/video/lGGDIGizcQ0

## Chapters

- 0:07 — Chapter 1 (0:07)
- 4:53 — Chapter 2 (4:53)
- 8:05 — Chapter 3 (8:05)
- 11:45 — Chapter 4 (11:45)
- 16:52 — Chapter 5 (16:52)
- 17:32 — Chapter 6 (17:32)
- 21:17 — Chapter 7 (21:17)
- 26:43 — Chapter 8 (26:43)
- 35:42 — Chapter 9 (35:42)
- 41:17 — Chapter 10 (41:17)
- 44:40 — Chapter 11 (44:40)
- 47:34 — Chapter 12 (47:34)

## Transcript

**[0:07]:** 2 1 and okay, here is a lecture on the applications of eigenvalues and if I can, so that will be Markov matrices. I'll I'll I'll tell you what a Markov matrix is. So this matrix A will be a Markov matrix. And uh I'll explain how they come in applications. And and then if I have time, I would like to say a little bit about Fourier series, which is a fantastic application of the projection chapter. Okay. What's a Markov matrix? Can I just write down a typical Markov matrix? Say 0.1 0.2 0.7 0.01 0.990, let's say, 0.3 0.3 0.4. Okay. There's a a totally just invented Markov matrix. What what makes it a Markov matrix? Two properties that that this matrix has. So two properties are one every entry is greater equals zero. All entries

**[1:35]:** greater than or equal to zero. And of course when I square the matrix, the entries will still be greater or equal zero. I'm going to be interested in the powers of this matrix. And this property of course is going to stay there. It it really Markov matrices you'll see are connected to probability ideas and probabilities are never negative. The other property, do you do you see the other property in there? If I add down the columns, what answer do I get? One. So all columns add to one. All columns add to one.

**[2:28]:** And actually when I square the matrix, that will be true again. So that uh the powers of my matrix are all Markov matrices. And I'm interested in always the eigenvalues and the eigenvectors. And this question of steady state will come up. You remember we had steady state for differential equations last time. When what was the steady state? What was the eigenvalue? What was the eigenvalue in the differential equation case that led to a steady state? It was lambda equals zero. When you remember that we did an example and one of the eigenvalues was lambda equals zero. And that so then we had an e to the zero t a constant one as time went on, there that thing stayed steady. Now what in the powers case, it's not a zero eigenvalue. Actually with powers of a matrix, a zero eigenvalue, that part is going to die right away.

**[3:36]:** It's an eigenvalue of one. That's all important. So this steady state will correspond will be totally connected with an eigenvalue of one and its eigenvector. In fact, the steady state will be the eigenvector for that eigenvalue. Okay. So that's what's coming. Now for some reason then that we that we have to see, this matrix has an eigenvalue of one. This property that the columns all add to one turns out guarantees that one is an eigenvalue. So that you can actually find the eigenvalue find that eigenvalue of a Markov matrix without computing any determinants of A minus lambda I, that matrix will have an eigenvalue of one and we want to see why. And then the other thing is So the key points, let me let me write these underneath. The key points are the key points are lambda equal one is an eigenvalue.

**[4:53]:** I'll add in a little an additional well, thing about eigenvalues. Key point two, the other eigenvalues all other eigenvalues are in magnitude smaller than one. In absolute value smaller than one. Well, there could be some exceptional case when when an eigen another eigenvalue might have magnitude equal one. It never has an eigenvalue larger than one. So these two facts somehow we ought to linear algebra ought to tell us. And then of course, linear algebra is going to tell us what the what's what happens if I take if you remember when I solve when I when I multiply by A time after time, the Kth thing is A to the K U naught. And I'm asking what's special about this these powers of A? And very likely the the quiz will have a problem to compute to to compute some powers of A or or applied to an initial vector.

**[6:08]:** So you remember the general form? The general form is that there's some amount of the first eigenvalue to the Kth power times the first eigenvector. And a another amount of the second eigenvalue to the Kth power times the second eigenvector and so on. I just uh my conscience always makes me say at least once per lecture that this requires a complete set of eigenvectors. Otherwise, we might not be able to expand U naught in the eigenvectors and we couldn't get started. But once we're started with U naught when K is zero then every A brings in these lambdas. And now you can see what the steady state is going to be. If lambda one is one so lambda one equals one to the Kth power and these other eigenvalues are smaller than one. So I've sort of scratched over the equation there to we had this term, but what happens to that term if the lambda is smaller than one?

**[7:20]:** Then the as we take powers, as we iterate, as we as we go forward in time, this goes to zero, right? Can I just I mean scratched over it, I might as well scratch further. Uh that term and all the other terms are going to zero because all the other eigenvalues are smaller than one and the steady state that we're approaching is just whatever there was this was this was the this is the X1 part of U of of the initial condition U zero is the steady state.

**[8:05]:** This much we know from general from you know, what we've already done. Uh So I I want to see why let's at least see number one, why one is an eigenvalue. And then there's actually in this chapter we're interested not only in eigenvalues but also eigenvectors. And there's something special about the eigenvector. Let me write down what that is. The eigenvector X1 X1 is the eigenvector and all its components are positive. So the steady state is positive if the start was. If the start was so well, actually in in general I this might have a might have some component zero always, but no negative components in that eigenvector. Okay, can I come to that point? How can I look at that matrix? So that was just a example. How could I be sure how can I see that a matrix if the columns add to zero add to one, sorry.

**[9:24]:** If the columns add to one this property means that lambda equal one is an eigenvalue. Okay. So let's let's just think that through. What am I saying about let me let me look at A and if I believe that one is an eigenvalue, then I should be able to subtract off one times the identity and then I would get a matrix that's what minus 0.9 minus 0.01 and minus 0.6 when I took the ones away and the other parts of course are still what they were. And this is still .2 and .7. And okay, what's uh what's up with this matrix now? I've shifted the matrix this Markov matrix by one by the identity. And what do I want to prove? I What is it that I believe this matrix about this matrix? I believe it's singular. Singular well, if if A - I is singular, that tells me that one is an eigenvalue, right?

**[10:39]:** The eigenvalues are the numbers that I subtract off, the shifts, the numbers that I subtract from the diagonal to make it singular. Now, why is that matrix singular?

**[10:53]:** I We could compute its determinant, but but we want to see a reason that would work for every Markov matrix, not just this particular random example. So, what is it about that matrix? Well, I guess you could look at its columns now. What do they add up to? Zero. The columns add to zero. So,

**[11:20]:** all columns Oh, let me put all columns now of of of A - I add to zero. And then I want to realize that this means A - I is singular.

**[11:45]:** Okay. Why? So, I could have You know, that could be a quiz question, a sort of theoretical quiz question. If I give you a matrix and I tell you all its columns add to zero, give me a reason cuz it is true that the matrix is singular. Okay, I guess actually now what I think of you know, I'm thinking of two or three ways to see that. Uh

**[12:17]:** How would you do it? We don't want to take its determinant somehow. For the matrix to be singular, well, it means that these three columns are dependent, right? The determinant will be zero when those three columns are dependent. You see, we're we're at a point in this course now where we have several ways to look at an idea. We can take the determinant. Here we don't want to. But we met singular before that. Those columns are dependent. So, how do I see that those columns are dependent? They all add to zero. Um

**[12:56]:** Let's see. Ooh. Well, oh, actually, what combin- I Another thing I know is that the I would like to be able to show is that the rows are dependent. Maybe that's easier. If I know that all the columns add to zero, that that's my information, how do I see that those three rows are linearly dependent? What what combination of those rows gives the zero row? How how could I combine those three rows, those three row vectors, to produce the zero row vector? And that would tell me those rows are dependent, therefore the columns are dependent, the matrix is singular, the determinant is zero. Well, you see it. I just add the rows. One times that row plus one times that plus one times that row the zero row. The rows are dependent. In a way that 1 1 1 because it's multiplying the rows is like an eigenvector in the It's a It's in the left null space, right?

**[14:10]:** 1 1 1 is in the left null space. It's It's singular because the rows are dependent.

**[14:23]:** And can I just keep the reasoning going because this vector 1 1 1 is It's not in the null space of the matrix, but it's in the null space of the transpose. Is in the null space of the transpose. And that's good enough. If If we have a square matrix, if we have a square matrix and the rows are dependent, that matrix is singular. So, it turned out that the immediate uh guy we could identify was 1 1 1. Of course, the there will be somebody in the null space, too. And actually, who will it be? So, what's So, So, now I want to ask about the null space of of the matrix itself. What combination of the columns gives zero? I I don't want to compute it because I just made up this matrix and I We will take It would take me a while.

**[15:27]:** It looks sort of doable cuz it's 3 by 3, but my point is what what vector is it? If we Once we found it, what have we got that's in the in the null space of A? It's the eigenvector, right? That's where we find X1. Then X1, the eigenvector, is in the null space of A. That's the eigen- eigenvector corresponding to the eigenvalue one. Right? That's how we find eigenvectors. So, those three columns must be dependent. Some combination of columns of those three columns is the zero column and that the three components in that combination are the eigenvector. And that guy is the steady state. Okay. So, I'm happy about the the the thinking here. But I haven't given I haven't completed it cuz I haven't found X1. But it's there. Can I Another thought came to me as I was doing this. A another little comment that you about eigenvalues and eigenvectors because of A and A transpose.

**[16:45]:** What can you tell me about eigenvalues of A

**[16:52]:** of A and eigenvalues of A transpose?

**[17:01]:** Whoops.

**[17:04]:** They're the same. This So, this is a little comment. We It's It's useful since eigenvalues are generally not easy to find, it's always useful to know some cases where you've got them. Where And And this is If you know the eigenvalues of A, then you know the eigenvalues of A transpose. Eigenvalues of A transpose are the same.

**[17:32]:** And can I just like review why that is? So, to find the eigenvalues of A, this would be determinant of A - lambda I = 0. That gives me an eigenvalue of A.

**[17:53]:** Now, how can I get A transpose into the picture here? I'll use the fact that the determinant of a matrix and the determinant of its transpose are the same. The determinant of a matrix equals the determinant of of A of the transpose. That was property 10, the very last guy in our determinant list. So, I'll transpose that matrix. This leads to this I just take the matrix and transpose it. But now, what do I get when I transpose lambda I? I just get lambda I. So, that's That's all there was to the reasoning. The reasoning is that the eigenvalues of A solve that equation. The determinant of a matrix is the determinant of its transpose. So, that gives me this equation and that tells me that the same lambdas are eigenvalues of A transpose. So, that backing up to the Markov case, one is an eigenvalue of A transpose and we actually found its eigenvector 1 1 1.

**[19:03]:** And that tells us that one is also an eigenvalue of A, but of course, it has a different eigenvector. The The left null space isn't the same as the null space and we would have to find it. So, there's some vector here which is X1 that produces 0 0 0. Actually, it wouldn't be that hard to find. You know, I as I'm talking, I'm thinking, okay, am I going to follow through and actually find it? Well, I can tell from this one look, if I put a .6 there and a .7 there, that's what then I'll be okay in the last row, right? Now, I only remains to find one guy. And let me take the first row then. -.54 + .21, there's some big number going in there, right? So I have just to make the first row come out zero. I'm getting minus .54 plus .21 so that was minus .33 and what what do I want like 3300?

**[20:11]:** This is the first time in the history of linear algebra that an eigenvector has ever had a component 3300. But I guess it's true cuz then I multiply by minus one over 100. Oh no, it was .33. So is this just oh shoot only 33. Okay, only 33. Okay, so there's the eigenvector. Oh and notice that it that it turned did turn out at least to be all positive. So that was like the theory predicts that part two. I won't give the proof of that part. So 30 33 is .6 33.7. Okay, now those are the that's the linear algebra part. Can I get to the applications? Where do these Markov matrices come from cuz that's that's part of this course and absolutely part of this lecture. Okay, so where's where's an application of Markov matrices? Okay.

**[21:17]:** Markov matrices so my equation then that I'm solving and studying is this equation UK plus one equals AUK. And now A is a Markov matrix. A is Markov.

**[21:36]:** And I want to give an example. Can I just create an example it'll be two by two. And it's one I've used before because it seems to me to bring out the idea. It's because we have two by two we have two states let's say California and Massachusetts. And I'm looking at the populations in those two states the people in those two states California and Massachusetts. And my matrix A is going to tell me in a in a year some movement has happened. Some people stayed in Massachusetts, some people moved to California, some smart people moved from California to Massachusetts, some people stayed in California and made a billion. Okay, so that there's a matrix there with four entries and those tell me the fractions of my population I'm making I'm going to use fractions so they won't be negative of course cuz cuz only positive people are in involved here.

**[22:50]:** And they'll add up to one because I'm accounting for all people. So that's why I have these two key properties. The entries are greater or equal zero because I'm looking at probabilities. Do they move? Do they stay? Those probabilities are all between zero and one. And the probabilities add to one because everybody's accounted for. I'm not losing anybody gaining anybody in this in this Markov chain. It's it it it conserves the total population. Okay, so what would it be a typical matrix then? So this would be U California and U Massachusetts at time T equal K plus one. And it's some matrix which we'll think of times U California and U Massachusetts at time K. And notice this matrix is going to stay the same you know forever. So that's a severe limitation on the example. The example has the same Markov matrix the same probabilities act at every time.

**[24:08]:** Okay, so what's a reasonable say say point nine of the people in California at time K stay there. And point one of the people in California move to Massachusetts. Notice why that column added to one cuz we've now accounted for all the people in California at time K 9/10 of them are still in California 1/10 are are here. at time K plus one. Okay, what about the people who are in Massachusetts? This is going to multiply column two, right? By our fundamental rule of multiplying matrix by vector it's the it's the the population in Massachusetts shall we say that that after the Red Sox uh fail again um eight only 80% of the people in Massachusetts stay and 20% move to California. Okay. So again this adds to one which accounts for all people in Massachusetts where they are. So there is a Markov matrix.

**[25:26]:** Non-negative entries adding to one. What's the steady state? If everybody started in Massachusetts say it you know when the pilgrims showed up or something. Then where where are they now? Where are they at time 100 let's say or maybe I don't know how many years since the pilgrims 300 and something. Or and I say where will they be like way out a million years from now? I could multiply take the powers of this matrix. In fact you you would ought to be able to figure out what is the hundredth power of that matrix. Why don't we do that? But let me follow the steady state so what what's my starting my starting U Cal U Mass at time zero is shall we say um shall we put anybody in California? Let's make let's make zero there and say the population of Massachusetts is let's say a thousand just a Okay.

**[26:43]:** So the population is so the populations are zero and a thousand at the start. What can you tell me about this population after after K steps? What will U Cal plus U Mass add to? A thousand. Those thousand people are always accounted for. But so U Mass will start dropping from a thousand U Cal will start growing. Actually we could see why don't we figure out what it is after one. After one time step what what are the populations? at time one. So what happens in one step you multiply once by that matrix and let's see zero times this column so it's just a thousand times this column so I think we're getting 200 and 800.

**[27:39]:** So after the first step 200 people have are in California. Now at the following step I'll multiply again by this matrix more people will move to some to California. Some people will move back 20 people will come back and uh the net the net result will be that the California population will be above 200 and the Massachusetts below 800 and they'll still add up to a thousand. Okay, I do that a few times. I do that a hundred times. What's the population? Well, okay to answer any question like that I need the eigenvalues and eigenvectors, right? As soon as I I've created an example but as soon as I want to solve anything I have to find eigenvalues and eigenvectors of that matrix. Okay, so let's do it. So there's the matrix .9 point two point one point eight and tell me it's eigenvalues. Lambda equals so tell me one eigenvalue.

**[28:46]:** One, thanks. And tell me the other one. What's the other eigenvalue? From the trace or the determinant from the the trace is what is like easier. So the trace of that matrix is 1.7. So the other eigenvalue is point seven. And it notice that it's less than one. And notice that the determinant is .72 minus .02 which is .7 right. Okay, now to find the eigenvectors. This is so that's lambda one and the eigenvector I'll subtract one from the diagonal, right? So can I do that in light in light here? Subtract one from the diagonal have minus .1 and minus .2 and of course these are still there. And I'm looking for it's Here's here's this is going to be X1. It's the null space of A minus I. Okay, everybody sees that it's two and one. Okay? And now how about so that and it notice that that that I can vector is positive.

**[30:03]:** And actually we can jump to infinity right now. What's the population at infinity? It's a multiple This is This I can vector is giving the steady state. It's It's some multiple of this and how is that multiple decided? By adding up to 1,000 people. So the steady state the C1 X1 This is the X1. But that adds up to three. So I really want two It's It's going to be 2/3 of 1,000 and 1/3 of 1,000. Making a total of the 1,000 people. That'll be the steady state. That's really all I need to know at infinity. But if I want to know what's happened after just a finite number like 100 steps, I better find this I can vector. So can I can I look at I'll subtract 0.7 times from the diagonal and I'll get that and I'll look at the null space of that one.

**[31:08]:** And I this is going to give me X2 now and what is it? So what's in the null space? So that's certainly singular, so I know my calculation is right and uh one and minus one. One and minus one. So I'm prepared now to write down the solution after 100 time steps. The The populations after 100 time steps, right? Can Can we remember the 0.1 the the one with this two one I can vector and the 0.7 with the minus one one I can vector. So let me I'll just write it above here. U after K steps is some multiple of one to the K times the two one I can vector and some multiple of 0.7 to the K times the minus one one I can vector. Right? That's This is how I take how powers of a matrix work. When I apply those powers to a U naught what I So it's U naught, which was zero a thousand.

**[32:26]:** That has to be corrected K equals zero. So I'm plugging in K equals zero and I get C1 times two one and C2 times minus one one. Two equations two constants certainly independent I can vectors. So there's a solution and you see what it is. Let's see. I guess we already figured that C1 was 1,000 over three. I think did we think that had to be 1,000 over three? And maybe C2 would be uh excuse me get an eraser. We can I just I think we will get it here. C2 We want to get a zero here. So maybe we need plus 2,000 over three. I think that has to work. Two times 1,000 over three minus 2,000 over three that'll give us the zero and the 1,000 over three and the 2,000 over three will give us 3,000 over three the thousand. So this is what we approach.

**[33:37]:** This part with a 0.7 to the Kth power is the part that's disappearing. Okay. That's That's That's Markov matrices. That's an example of where they come from from from modeling uh movement of people with no uh gain or loss with total total count conserved. Okay. I I just if I can add one more comment because you'll see Markov matrices in electrical engineering courses. And often you'll see them So here's my little comment. Sometimes in a lot of applications they prefer to work with row vectors. So they instead of this was natural for us, right? For all the I can vectors to be column vectors. So our columns added to one in the Markov matrix. Just so you don't think well, what what what what's going on? If we work with row vectors and we multiply vector times matrix. So we're we're we're multiplying from the left then it'll be that then we'll be using the transpose of of this matrix and it'll be the rows that add to one.

**[35:00]:** So in other textbooks you'll see instead of calling columns adding to one you'll see rows add to one. Okay. Fine. Okay, that's what I wanted to say about Markov. Now I want to say something about projections and even leading in a little into Fourier series. Because but before any Fourier stuff, let me make a comment about projections. This So this is a comment about projections onto with an orthonormal basis.

**[35:42]:** So of course the the basis vectors are Q1 up to QN. Okay. I have a vector B. Uh let let me imagine Let me imagine this is a basis. Let me let's say I'm an N by N. I'm I've got um uh N orthonormal vectors. I'm in N dimensional space, so they're a complete they're a basis. Any vector V could be expanded in this basis. So any vector V is some combination some amount of Q1 plus some amount of Q2 plus some amount of QN. So So any V.

**[36:35]:** I just want you to tell me what those amounts are. What are X1? What's X1 for example? So I'm looking for the expansion. This is This is really a projection. I could I could really use the word expansion. I'm expanding the vector in the basis. And the special thing about the basis is that it's orthonormal. So that should give me a special formula for the answer for the coefficients. So how do I get X1? What What's a formula for X1? I could I can go through the projection the Q transpose Q all that uh normal equations. But and I'll get I'll come out with this nice answer that I think I can see right away. How can I pick get a hold of X1 and get these other X's out of the equation? So how can I get a nice simple formula for X1? And and then we want to see sure we knew that all the time.

**[37:50]:** Okay, so what's X1? The good way is take the inner product of everything with Q1. Take the inner product of that whole equation every term with Q1. What will happen to that last term? The inner product when if I take the dot product with Q1 I get zero, right? Because this basis was orthonormal. If I take the dot product with Q2 I get zero. If I take the dot product with Q1 I get one. So that tells me what X1 is. Q1 transpose V That's taking the dot product is X1 times Q1 transpose Q1 plus a bunch of zeros. And this is a one, so I can forget that. I get X1 immediately. So Do you see what I'm saying is that if I have an orthonormal basis then the coefficient that I need for each basis vector is a cinch to find. Let me Let me just I I I have to put this in the matrix language too, so you see it there also.

**[39:07]:** If I write that first equation in matrix language, what am what is it? I'm writing in matrix language this equation says I'm taking these columns Are Are you guys good at this now? I'm taking those columns times the X's and getting V. Right? That's the matrix form. Okay, that's the matrix Q. Q X is V. What's the solution to that equation? It's of It's X equal Q inverse V. So, X is Q inverse V, but what's the point? Q inverse in this case is going to is simple. I don't have to work to invert this matrix Q because of the fact that the these columns are orthonormal, I know the inverse to that. And it is Q transpose.

**[40:10]:** When you see a Q, a square matrix with that letter Q, that just triggers Q inverse is the same as Q transpose. So, the first component then the first component of X is the first row times V. And what's that? The first component of this answer is the first row of Q transpose. That's just that's just Q1 transpose times V. So, that's what we concluded here, too. Okay. So, so, nothing Fourier here. The The key ingredient here was that the Qs are orthonormal. And now, that's what Fourier series are built on. So, now in in the remaining uh time, let me say something about Fourier series. Okay. So, Fourier series

**[41:17]:** is well, we've got functions. We've got a function f of x. And we want to write it as a combination of maybe it has a constant term. And then it has some cosine x in it. And it has some sine x in it. And it has some cosine 2x in it. And a And some sine 2x and forever.

**[41:50]:** So, what's What's the difference between this type problem and the one above it? This one's infinite. But the key property of things being orthogonal is still true for sines and cosines. So, it's the property that makes Fourier series work. So, that's called a Fourier series. Better write his name up. Fourier series.

**[42:22]:** So, it was Joseph Fourier who realized that, "Hey, I could work in function space." Instead of a vector V, I could have a function f of x. Instead of orthogonal vectors Q1, Q2, Q3 I could have orthogonal functions, the constant, the cosine x, the sine x, the cos 2x, but infinitely many of them. I need infinitely many because my space is infinite dimensional. So, this is like the moment in which we leave finite dimensional vector spaces and go to infinite dimensional vector spaces, and our basis so, the vectors are now functions. And of course, there are so many functions that it's that we've got an infinite infinite dimensional space. And the basis vectors are functions, too. A0, the constant function one. So, my basis is 1, cos x, sin x, cos 2x, sin 2x, and so on. And the reason Fourier series is a success is that those are orthogonal.

**[43:35]:** Okay. Now, what do I mean by orthogonal? I know what it means for two vectors to be orthogonal. Y transpose x equals zero, right? Dot product equals zero. But what's the dot product of functions? I'm claiming that whatever it is, the dot product or we would more likely use the word inner product of say cos x with sin x is zero. And cos x with cos 2x also zero. So, I Let me tell you what I mean by that by that dot product. Well, how do I compute a dot product? So, let's just remember for vectors V trans V transpose W for vectors, so this was vectors V transpose W was V1W1 plus VNWN.

**[44:33]:** Okay. Now, functions.

**[44:40]:** Now, I have two functions. Let's call them f and g. What What's with them now? The vectors had n components, but the functions have a whole like continuum. To To graph the function, I just don't have n points. I've got this whole graph. So, I have functions I'm really trying to ask you, what's the inner product of this function f with another function g? And I want to make it parallel to this the best I can. So, the best parallel is to multiply f of x times g of x at every x. And here I just had n multiplications, but here I'm going to have at a whole range of x's. And here I added the results. What do I do here? So, what's the analog of addition when you have when you're in a continuum? It's integration. So, that the the dot product of two functions will be the integral of those functions dx.

**[45:52]:** Now, I have to say say, "Well, what are the limits of integration?" And for this Fourier series this function f of x if if I'm going to have if if that right hand side is going to be f of x that function that I'm seeing on the right, all those sines and cosines, they're all periodic with with with period 2 pi. So, so that's what f of x had better be. So, I'll integrate from 0 to 2 pi. My Everything is is on the interval 0 2 pi now. Because if I'm going to use these sines and cosines, f of x is equal to f of x plus 2 pi. This is periodic.

**[46:45]:** Periodic functions. Okay. So, now I know what I've got all the right words now. I've got a vector space, but the vectors are functions. I've got inner products. And And the inner product gives a number, all right. It just happens to be an integral instead of a sum. I've got Now, then I have the idea of orthogonality. Because actually, just let's just check orthogonality. If I take the integral Let Let me do sin x times cos x. Sin x times cos x dx from 0 to 2 pi.

**[47:34]:** I think we get zero. That's the differential of that, so it would be 1/2 sin x squared, was that right?

**[47:47]:** Between 0 and 2 pi. And of course, we get zero. And the same would be true with a little more some trig identities to help us out of every other pair. So, we have now an orthonormal infinite basis for function space. And all we want to do is express a function in that basis. And so, I The end of my lecture is, "Okay. What is A1?" What's the coefficient? How much cosine x is there in a function? Compared to the other harmonics. How much constant is in that function? That'll be That would be an easy question. The answer A0 will come out to be the average value of f. That's the amount of the constant that's in there. It's average value. But let's take A1 as more typical. How will I get Here's the end of the lecture then. How do I get A1? The first Fourier coefficient.

**[48:54]:** Okay. I do just as I did in the vector case. I I take the inner product of everything with cos x. Take the inner product of everything with cos x. Then on the left on the left, I have the inner product is the integral of f of x times cos x dx.

**[49:18]:** And on the right, what do I have? When I So, what am I When I say, "Take the inner product with cos x?" Let me put it in ordinary calculus words. Multiply by cosine x and integrate. That's what inner products are. So, if I multiply that whole thing by cos x, then I integrate I get a whole lot of zeros. The only thing that survives is that term. All the others disappear. So and that term is a1 times the integral of cos x squared dx 0 to 2 pi equals So this was the left side and this is all that's left on the right hand side. And this is not zero of course cuz it's the length of the function squared. It's the inner product with itself and and a simple calculation gives that answer to be pi. So that's a easy integral and it turns out to be pi so that a1 is 1 over pi times there times this integral.

**[50:31]:** So there is actually that's Euler's famous formula for the or maybe Fourier found it. For the coefficients in a Fourier series. And you see that it's exactly an expansion in an orthonormal basis. Okay, thanks. So I'll do a quiz review on Monday and then the quiz itself in Walker on Wednesday. Okay, see you Monday. Thanks.
