MIT 18.06 Completed

Lecture 24 · Markov matrix and Fourier series

Understand the stationary state of Markov matrices and the projective structure of Fourier series.

On this page

Markov matrices; fourier series | Gilbert Strang | MIT 18.06 Linear Algebra

Lecture 24 / Total 35 Lectures |Part 3 · Eigenvalues, positive definiteness and linear transformation

Video of this lecture: Bilibili p24 · Markov matrix and Fourier series ↗(51:12)| MIT OCW official page ↗

Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.

Introduction to this lecture

In the previous lectures, we have used eigenvalues and eigenvectors to solve difference equations and differential equations: as long as the initial vector can be expanded into a combination of eigenvectors, Aku0A^k\boldsymbol{u}_0 with eAtu0e^{At}\boldsymbol{u}_0 can be written λik\lambda_i^k and eλite^{\lambda_i t} The long-term behavior is determined by the eigenvalue with the largest absolute value (differential case) and the eigenvalue with the largest real part (differential case) respectively. This lecture applies this idea to two types of objects: the first half of the lecture is about probability and population mobility. Markov matrix (Markov matrix), the second half of the lecture is to extend the idea of “expanding under a basis” to function space, and we get Fourier series(Fourier series).

Markov matrices are a very special type of matrix: all elements are non-negative, and the sum of the elements in each column is equal to 11. These two conditions seem to be just the language of probability theory, but they directly determine its spectral structure——λ=1\lambda=1 It must be an eigenvalue, and the absolute value of the other eigenvalues does not exceed 11. So power AkA^k will not diverge; as long as there are no other models 11 eigenvalues, with kk increase, λ=1\lambda=1 Which one remains to be Steady state (steady state), and all other items are attenuated. In the previous lecture, the steady state of differential equations depends on λ=0\lambda=0, but what we rely on here is λ=1\lambda=1. This time 11 with 00 The exchange of AA The difference between the two operations "" and “derivative with respect to time”.

The second half of the lecture changed the stage: Rn\mathbb{R}^n Change to function space. Functions can be added and multiplied, so they also form a vector space; the difference between two functions inner product (inner product) uses integral instead of dot product, and 1,cos⁡x,sin⁡x,cos⁡2x,sin⁡2x,…1,\cos x,\sin x,\cos 2x,\sin 2x,\dots Pairs of these inner products are orthogonal, forming a set of infinite-dimensional orthogonal bases. So a periodic function is expanded according to this set of bases, and the coefficients are “sieved” out one by one using inner products just like in the finite-dimensional case - this is the Fourier series, and it is also the most beautiful application of the projection chapter.

Official Handout Summary Page 1/4

MIT OCW Official Lecture Notes Summary Page 1/4 (18.06SC Lecture 24 Summary, CC BY-NC-SA 4.0).

1. Markov matrix and its two properties

A square matrix is called Markov matrix, if it satisfies both conditions:

  1. Every element is nonnegative: aij≥0a_{ij}\ge 0;
  2. The sum of the elements in each column is equal to 11: ∑iaij=1\sum_{i}a_{ij}=1.

Just write down an example:

A=[0.10.010.30.20.990.30.700.4].A=\begin{bmatrix} 0.1&0.01&0.3\\ 0.2&0.99&0.3\\ 0.7&0&0.4 \end{bmatrix}.

The sum of the three columns is 0.1+0.2+0.7=10.1+0.2+0.7=1, 0.01+0.99+0=10.01+0.99+0=1, 0.3+0.3+0.4=10.3+0.3+0.4=1, the elements also have no negative numbers, so it is indeed a Markov matrix. Elements are allowed to be equal to 00——In the example (3,2)(3,2) The location is 00, meaning there is no direct transition from the second state to the third state - it is just not allowed to be negative.

Why do these two properties always appear in pairs? Because they come from the same application scenario: interpreting matrix elements as Probability. No. jj Column describes “is in state jj Where does the object go next”, where aija_{ij} is from the state jj transfer to state ii proportion. The ratio cannot be negative, this is the first point; all objects must have a place to go (including staying in the original state), so the first point jj The elements of the column add up to exactly 11, this is the second article.

Viewed this way, matrix powers are easy to understand: A2A^2 The element of is the proportion of “starting from a certain state and reaching another state after two steps”, which is still a probability, and the column sum is still 11. In general, any power of a Markov matrix is ​​still a Markov matrix. This can also be verified directly. Remember everything 11 The row vector is 1T=(1,1,…,1)\boldsymbol{1}^{\mathsf T}=(1,1,\dots,1), “The sum of each column is 11” is exactly equivalent to

1TA=1T.\boldsymbol{1}^{\mathsf T}A=\boldsymbol{1}^{\mathsf T}.

Take both sides to the right AA, got 1TA2=1TA=1T\boldsymbol{1}^{\mathsf T}A^2=\boldsymbol{1}^{\mathsf T}A=\boldsymbol{1}^{\mathsf T}, and then the same holds true. So “the column sum is 11” This property is not lost when exponentiation is repeated, nor is the non-negativity, because the product of a non-negative matrix remains non-negative.

The equation studied in this lecture is

uk+1=Auk,uk=Aku0,\boldsymbol{u}_{k+1}=A\boldsymbol{u}_k,\qquad \boldsymbol{u}_k=A^k\boldsymbol{u}_0,

Among them uk\boldsymbol{u}_k of the ii component represents the kk step in state ii quantity or proportion. Since the sum of each column is 11, the total quantity is conserved throughout the process:

1Tuk+1=1TAuk=1Tuk.\boldsymbol{1}^{\mathsf T}\boldsymbol{u}_{k+1}=\boldsymbol{1}^{\mathsf T}A\boldsymbol{u}_k=\boldsymbol{1}^{\mathsf T}\boldsymbol{u}_k .

This is exactly what “the probabilities add up to 11”, a matrix writing method that neither loses nor increases population.

Video 00:05:07: Classroom blackboard writing

Video 00:05:07 | Approximately corresponding to Section 1 “1. Markov matrix and its two properties”.

2. Steady state: λ=1\lambda=1 role

The spectral structure of a Markov matrix is characterized by two key facts:

  1. λ=1\lambda=1 It must be AA eigenvalues;
  2. The absolute values of the remaining eigenvalues are less than 11 (In individual cases it may be equal to 11, but never greater than 11).

In Article 2, “equal to 11” exception will make the corresponding item λik\lambda_i^k Without decay, the long-term behavior no longer converges to a single direction; as long as there are no such exceptions, the following derivation holds.

Take these two first and see how they determine long-term behavior. Set AA Yes nn linearly independent eigenvectors x1,…,xn\boldsymbol{x}_1,\dots,\boldsymbol{x}_n, corresponding to the eigenvalue λ1,…,λn\lambda_1,\dots,\lambda_n, among which λ1=1\lambda_1=1. Expand the initial vector under these eigenvectors:

u0=c1x1+c2x2+⋯+cnxn.\boldsymbol{u}_0=c_1\boldsymbol{x}_1+c_2\boldsymbol{x}_2+\cdots+c_n\boldsymbol{x}_n .

Multiply both sides AkA^k, use Akxi=λikxiA^k\boldsymbol{x}_i=\lambda_i^k\boldsymbol{x}_i, got

uk=Aku0=c1λ1kx1+c2λ2kx2+⋯+cnλnkxn.\boldsymbol{u}_k=A^k\boldsymbol{u}_0 =c_1\lambda_1^k\boldsymbol{x}_1+c_2\lambda_2^k\boldsymbol{x}_2+\cdots+c_n\lambda_n^k\boldsymbol{x}_n .

There is a premise that must be pointed out here: there must be enough feature vectors to fill the entire space, otherwise u0\boldsymbol{u}_0 It cannot be expanded at all, and the calculation cannot be started-that is, AA Must be diagonalizable.

now order k→∞k\to\infty. In the first item λ1k=1k=1\lambda_1^k=1^k=1 remain unchanged, the other factors ∣λi∣<1|\lambda_i|<1 And tends to zero, so

uk⟶c1x1.\boldsymbol{u}_k\longrightarrow c_1\boldsymbol{x}_1 .

The modulus of the remaining eigenvalues are strictly smaller than 11 situation, this is Steady state: No matter what the initial distribution is, the system finally falls on the eigenvector x1\boldsymbol{x}_1 In the direction, the specific multiple is determined by the initial conditions. It will be clearer if you compare it with the differential equation in the previous lecture. Over there du/dt=Au\mathrm{d}\boldsymbol{u}/\mathrm{d}t=A\boldsymbol{u} The solution contains eλte^{\lambda t}, steady state corresponding to λ=0\lambda=0, because e0t=1e^{0t}=1 is the only term that does not change with time; here it is replaced by a discrete power, 0k0^k Die in one step, 1k=11^k=1 is the unchanging term. So “what’s left after a long time” is taken care of by different eigenvalues, depending on whether time is continuous or discrete.

x1\boldsymbol{x}_1 There is another property: all its components are non-negative; if all components of the initial vector are positive, then all components of the steady state are also positive. This is not a coincidence, but a manifestation of “the probability will not become negative” in the eigenvector. This lecture does not give a proof of this property, but only uses it to check whether the calculated results are reasonable.

Video 00:11:01: Classroom blackboard writing

Video 00:11:01|Approximately corresponding to Section 2 “2. Steady state: λ=1\lambda=1 character” nearby.

3. Why 11 Must be an eigenvalue

to prove 11 is an eigenvalue, which is equivalent to proving A−IA-I singular, because the eigenvalues are those that make A−λIA-\lambda I Strange numbers. The key is to find out from the two properties of the Markov matrix A−IA-I problems.

look A−IA-I of columns. AA The sum of each column of is 11; Identity matrix II Each column of has only one 11, so the sum of each column is also 11. The two columns are subtracted correspondingly, A−IA-I The sum of each column of is 1−1=01-1=0. The example in the previous section gives

A−I=[−0.90.010.30.2−0.010.30.70−0.6],A-I=\begin{bmatrix} -0.9&0.01&0.3\\ 0.2&-0.01&0.3\\ 0.7&0&-0.6 \end{bmatrix},

Sum the three columns separately: −0.9+0.2+0.7=0-0.9+0.2+0.7=0, 0.01−0.01+0=00.01-0.01+0=0, 0.3+0.3−0.6=00.3+0.3-0.6=0, indeed all zeros.

A column sum of zero means that A−IA-I Adding all three rows of will result in zero rows:

[111](A−I)=[000].\begin{bmatrix}1&1&1\end{bmatrix}(A-I)=\begin{bmatrix}0&0&0\end{bmatrix}.

thus A−IA-I The three rows are linearly related. The linear correlation between the row vectors of a square matrix means singularity, so det⁡(A−I)=0\det(A-I)=0, λ=1\lambda=1 is the characteristic value. This argument is valid for any Markov matrix, and there is no need to calculate the determinant at all - which is exactly what this lecture wants: to read the spectral information directly from the structure of the matrix.

Note (1,1,1)(1,1,1) appears: it is multiplied to the left, so it is A−IA-I of left null space (left nullspace); in other words, it is ATA^{\mathsf T} About eigenvalues 11 eigenvector of AA own feature vector. looking for AA eigenvector x1\boldsymbol{x}_1, need to see A−IA-I The null space of A−IA-I The coefficients of the columns of combine into zero vectors because

(A−I)x1=0(A-I)\boldsymbol{x}_1=\boldsymbol{0}

Exactly Ax1=x1A\boldsymbol{x}_1=\boldsymbol{x}_1 of deformation. This set of coefficients is the steady state. Looking back, this is the general process for finding feature vectors: first solve det⁡(A−λI)=0\det(A-\lambda I)=0 Set λ\lambda, then solve (A−λI)x=0(A-\lambda I)\boldsymbol{x}=\boldsymbol{0} Set x\boldsymbol{x}. The only special thing about Markov matrices is that the first step is free.

Incidentally, you can get a fact about transposition: AA with ATA^{\mathsf T} The eigenvalues are exactly the same. The reason is

det⁡(A−λI)=det⁡((A−λI)T)=det⁡(AT−λI),\det(A-\lambda I)=\det\bigl((A-\lambda I)^{\mathsf T}\bigr)=\det(A^{\mathsf T}-\lambda I),

The first step uses “the determinant of a matrix is equal to its transposed determinant”. So A−λIA-\lambda I Strange if and only if AT−λIA^{\mathsf T}-\lambda I Strange, the eigenvalue sets of both are consistent. Back to the Markov situation: already found ATA^{\mathsf T} About λ=1\lambda=1 The eigenvector of is (1,1,1)(1,1,1), this fact guarantees the same 11 Also AA eigenvalues. But the eigenvectors on both sides are different, and the left null space and the null space are two different things.

Now take the example x1\boldsymbol{x}_1 Figure it out. solution (A−I)x=0(A-I)\boldsymbol{x}=\boldsymbol{0}:

{−0.9x1+0.01x2+0.3x3=0,0.2x1−0.01x2+0.3x3=0,0.7x1−0.6x3=0.\begin{cases} -0.9x_1+0.01x_2+0.3x_3=0,\\ 0.2x_1-0.01x_2+0.3x_3=0,\\ 0.7x_1-0.6x_3=0. \end{cases}

The eigenvectors can be arbitrarily scaled, so shilling x1=6x_1=6. The third equation gives 0.7×6=0.6x30.7\times 6=0.6x_3, that is x3=7x_3=7. Back to the first equation: −0.9×6+0.3×7=−5.4+2.1=−3.3-0.9\times6+0.3\times7=-5.4+2.1=-3.3, to reset it to zero, you need 0.01x2=3.30.01x_2=3.3, that is x2=330x_2=330. So

x1=[63307].\boldsymbol{x}_1=\begin{bmatrix}6\\330\\7\end{bmatrix}.

Substitute back into the second equation to check: 0.2×6−0.01×330+0.3×7=1.2−3.3+2.1=00.2\times6-0.01\times330+0.3\times7=1.2-3.3+2.1=0, correct. The three components are all positive numbers, which is consistent with the previous statement of “steady state is non-negative”. If normalized by the sum of the components (6+330+7=3436+330+7=343), get (6,330,7)/343(6,330,7)/343 It is the steady-state probability distribution over the three states.

Official Handout Summary Page 2/4

MIT OCW Official Lecture Notes Summary Page 2/4 (18.06SC Lecture 24 Summary, CC BY-NC-SA 4.0).

Video 00:19:27: Classroom blackboard writing

Video 00:19:27|Approximately corresponding to Section 3 “3. Why 11 It must be near the “eigenvalue”.

4. An example: Population movement between California and Massachusetts

Where does the Markov matrix come from? The most intuitive source is population migration between two states. Set uCal(k)u_{\text{Cal}}(k), uMass(k)u_{\text{Mass}}(k) respectively kk For the population of California and Massachusetts in 2015, if the proportion of migration is fixed every year, then

[uCaluMass]k+1=[0.90.20.10.8][uCaluMass]k.\begin{bmatrix}u_{\text{Cal}}\\u_{\text{Mass}}\end{bmatrix}_{k+1} =\begin{bmatrix}0.9&0.2\\0.1&0.8\end{bmatrix} \begin{bmatrix}u_{\text{Cal}}\\u_{\text{Mass}}\end{bmatrix}_{k}.

Read this matrix according to the convention of “columns are sources and rows are destinations”: The first column talks about Californians——90%90\% Stay in California, 10%10\% Moving to Massachusetts; the second column talks about people from Massachusetts -80%80\% stay, 20%20\% Moved to California. The sum of both columns is 11, since everyone is counted once, the total population neither increases nor decreases. The matrix is ​​the same at every step, which is a strong limitation in the example: the migration ratio remains the same from year to year.

Assuming that everyone is in Massachusetts at the initial time, a total of 10001000 people, that is u0=(0,1000)T\boldsymbol{u}_0=(0,1000)^{\mathsf T}. Take one step:

u1=Au0=1000[0.20.8]=[200800],\boldsymbol{u}_1=A\boldsymbol{u}_0 =1000\begin{bmatrix}0.2\\0.8\end{bmatrix} =\begin{bmatrix}200\\800\end{bmatrix},

200200 People arrived in California. Taking another step, some people moved back:

u2=Au1=[340660],\boldsymbol{u}_2=A\boldsymbol{u}_1=\begin{bmatrix}340\\660\end{bmatrix},

California has more than 200200, Massachusetts dropped to 800800 Below, the sum is still 10001000. Want to know 100100 For the population after steps or even infinite steps, eigenvalues and eigenvectors must be found.

Eigenvalues are easy to find. λ1=1\lambda_1=1 From “column sum to 11“Direct guarantee; use trace (sum of diagonal elements) 0.9+0.8=1.70.9+0.8=1.7, obtained by “the sum of eigenvalues is equal to the trace” λ2=1.7−1=0.7\lambda_2=1.7-1=0.7. You can also check using determinants: 0.9×0.8−0.2×0.1=0.72−0.02=0.700.9\times0.8-0.2\times0.1=0.72-0.02=0.70.λ2=0.7<1\lambda_2=0.7<1, consistent with key fact two.

Then find the eigenvector. λ=1\lambda=1 time

A−I=[−0.10.20.1−0.2],A-I=\begin{bmatrix}-0.1&0.2\\0.1&-0.2\end{bmatrix},

The two rows are the opposite numbers of each other, and the null space is given by (2,1)T(2,1)^{\mathsf T} Zhang Cheng, take x1=(2,1)T\boldsymbol{x}_1=(2,1)^{\mathsf T}, both components are positive. λ=0.7\lambda=0.7 time

A−0.7I=[0.20.20.10.1],A-0.7I=\begin{bmatrix}0.2&0.2\\0.1&0.1\end{bmatrix},

The null space is given by (1,−1)T(1,-1)^{\mathsf T} Zhang Cheng, take x2=(1,−1)T\boldsymbol{x}_2=(1,-1)^{\mathsf T}. So

uk=c1 1k[21]+c2 (0.7)k[1−1].\boldsymbol{u}_k=c_1\,1^k\begin{bmatrix}2\\1\end{bmatrix} +c_2\,(0.7)^k\begin{bmatrix}1\\-1\end{bmatrix}.

use k=0k=0 The initial conditions of are constants: 2c1+c2=02c_1+c_2=0, c1−c2=1000c_1-c_2=1000, the solution is c1=1000/3c_1=1000/3, c2=−2000/3c_2=-2000/3. So

uk=10003[21]−20003(0.7)k[1−1].\boldsymbol{u}_k=\frac{1000}{3}\begin{bmatrix}2\\1\end{bmatrix} -\frac{2000}{3}(0.7)^k\begin{bmatrix}1\\-1\end{bmatrix}.

take k=1k=1 Verification: California =20003(1−0.7)=20003×0.3=200=\frac{2000}{3}(1-0.7)=\frac{2000}{3}\times0.3=200, Massachusetts =10003+20003×0.7=10003+14003=800=\frac{1000}{3}+\frac{2000}{3}\times0.7=\frac{1000}{3}+\frac{1400}{3}=800, consistent with the result of direct matrix multiplication.

The steady state is the first term in the expression: (2000/3, 1000/3)≈(667,333)(2000/3,\,1000/3)\approx(667,333), it is (2,1)T(2,1)^{\mathsf T} multiples of the total population 10001000 Set out. Second term with factor 0.7k0.7^k, follow kk The enlargement disappears rapidly; 0.71000.7^{100} is already small enough to be ignored, so 100100 After this step, the population will be almost (666.7, 333.3)(666.7,\,333.3). That answers ”AA of 100100 The second power acts on u0\boldsymbol{u}_0 Questions like “How much is the number above?”: There is no need to actually multiply the 100100 times, as long as you see clearly 0.71000.7^{100} How small is this one.

One last note: Some textbooks (especially books on electrical engineering and probability theory) are accustomed to using row vectors, written as uk+1T=ukTM\boldsymbol{u}_{k+1}^{\mathsf T}=\boldsymbol{u}_k^{\mathsf T}M. At this time M=ATM=A^{\mathsf T}, the condition “column sum is 11” becomes “action and behavior” 11”. The two ways of writing describe the same thing, the only difference is whether to multiply on the left or the right, and whether to transpose.

Video 00:33:17: Classroom blackboard writing

Video 00:33:17|Approximately corresponding to Section 4 “4. An example: Population migration between California and Massachusetts”.

5. Expansion under orthonormal basis

Go to the second half of this lecture. Let’s review a fact first: Suppose q1,…,qn\boldsymbol{q}_1,\dots,\boldsymbol{q}_n is a group orthogonal (orthonormal) vectors, that is, two pairs of orthogonal vectors with lengths 11, and they span into the entire Rn\mathbb{R}^n, then they form a set of basis, any vector v\boldsymbol{v} can be expanded into

v=x1q1+x2q2+⋯+xnqn.\boldsymbol{v}=x_1\boldsymbol{q}_1+x_2\boldsymbol{q}_2+\cdots+x_n\boldsymbol{q}_n .

The question is how to find these coefficients. The method is surprisingly simple: use q1\boldsymbol{q}_1 Take the inner product with both sides of the equation. due to q1Tq1=1\boldsymbol{q}_1^{\mathsf T}\boldsymbol{q}_1=1, while q1Tqj=0\boldsymbol{q}_1^{\mathsf T}\boldsymbol{q}_j=0(j≠1j\neq 1), with only one item left on the right:

q1Tv=x1.\boldsymbol{q}_1^{\mathsf T}\boldsymbol{v}=x_1 .

for each ii In the same way, xi=qiTvx_i=\boldsymbol{q}_i^{\mathsf T}\boldsymbol{v}. Each coefficient is v\boldsymbol{v} component in the direction of the corresponding basis vector. This is exactly the projection: put v\boldsymbol{v} projected onto nn In two mutually perpendicular base directions, the obtained length is the coefficient. In other words, the orthonormal basis turns “expansion” into a series of inner products, without solving equations or inverting matrices.

Write this in matrix form. order QQ to q1,…,qn\boldsymbol{q}_1,\dots,\boldsymbol{q}_n is a column, then the expansion is Qx=vQ\boldsymbol{x}=\boldsymbol{v}, the formal solution is x=Q−1v\boldsymbol{x}=Q^{-1}\boldsymbol{v}. while standard orthogonality gives

QTQ=I,Q^{\mathsf T}Q=I,

i.e. Q−1=QTQ^{-1}=Q^{\mathsf T}, so x=QTv\boldsymbol{x}=Q^{\mathsf T}\boldsymbol{v}. its first ii The components are QTQ^{\mathsf T} of the ii OK (i.e. qiT\boldsymbol{q}_i^{\mathsf T}) and v\boldsymbol{v} The inner product of is exactly the same as the result calculated one by one. see letters QQ should have thought of Q−1=QTQ^{-1}=Q^{\mathsf T}——This is the greatest convenience brought by the standard orthonormal basis.

This section is still finite-dimensional, but all the preparations required for the Fourier series are in place: the “basis vectors” there are no longer Rn\mathbb{R}^n vector in , but a function.

Official Handout Summary Page 3/4

MIT OCW Official Lecture Notes Summary Page 3/4 (18.06SC Lecture 24 Summary, CC BY-NC-SA 4.0).

6. Fourier series

The problem to be solved by Fourier series is: convert a function f(x)f(x) Written as a constant term, cos⁡x\cos x, sin⁡x\sin x, cos⁡2x\cos 2x, sin⁡2x\sin 2x A linear combination of…,

f(x)=a0+a1cos⁡x+b1sin⁡x+a2cos⁡2x+b2sin⁡2x+⋯f(x)=a_0+a_1\cos x+b_1\sin x+a_2\cos 2x+b_2\sin 2x+\cdots

It looks exactly like the expansion in the previous section, the only difference is that there are infinite polynomials. Why do we need an infinite number of items? Because the function space is infinite dimensions: A function that takes multiple consecutive values in the interval cannot be completely described by a finite number of parameters, so an infinite number of basis functions are needed. This step marks leaving the finite-dimensional vector space and entering the infinite-dimensional situation.

The basis functions used are

1, cos⁡x, sin⁡x, cos⁡2x, sin⁡2x, …1,\ \cos x,\ \sin x,\ \cos 2x,\ \sin 2x,\ \dots

They all start with 2π2\pi is a period, so it can only be used to express the same 2π2\pi is a function of the period, that is f(x+2π)=f(x)f(x+2\pi)=f(x);The integral interval is therefore taken as [0,2π][0,2\pi].

Next we need to define the inner product of the function. The finite dimensional dot product is vTw=v1w1+⋯+vnwn\boldsymbol{v}^{\mathsf T}\boldsymbol{w}=v_1w_1+\cdots+v_nw_n: Multiply point by point and add the results. The function takes multiple consecutive values in the interval, and the “sum” after point-by-point multiplication becomes an integral:

⟨f,g⟩=∫02πf(x)g(x) dx.\langle f,g\rangle=\int_0^{2\pi}f(x)g(x)\,\mathrm{d}x .

The reason why this set of basis is useful is that they are orthogonal to each other under this inner product. to sin⁡x\sin x with cos⁡x\cos x For example:

∫02πsin⁡xcos⁡x dx=[12sin⁡2x]02π=0.\int_0^{2\pi}\sin x\cos x\,\mathrm{d}x =\left[\frac12\sin^2x\right]_0^{2\pi}=0 .

All other combinations are also zero (with the help of some trigonometric identities). The easiest group to verify is the constant function with cos⁡x\cos x:

∫02π1⋅cos⁡x dx=[sin⁡x]02π=0.\int_0^{2\pi}1\cdot\cos x\,\mathrm{d}x=\bigl[\sin x\bigr]_0^{2\pi}=0 .

And the inner product of each basis function and itself is not zero, for example

∫02πcos⁡2x dx=π.\int_0^{2\pi}\cos^2x\,\mathrm{d}x=\pi .

So this is a set of orthonormal basis, but not yet normalized: cos⁡nx\cos nx, sin⁡nx\sin nx The “length” of is π\sqrt{\pi}, constant function 11 The “length” of is 2π\sqrt{2\pi}, neither 11. What are the coefficients in the formula? π\pi The denominator of comes from here.

How to find the coefficient? The method is exactly the same as for finite dimensions: which coefficient you want to find, use the corresponding basis function to do the inner product with both sides of the equation. Find the constant term a0a_0, just use the constant function 11 To multiply and to integrate. The remaining items on the right are the same as 11 The inner products of are all zero, leaving only

∫02πf(x) dx=a0∫02π1 dx=2πa0,\int_0^{2\pi}f(x)\,\mathrm{d}x=a_0\int_0^{2\pi}1\,\mathrm{d}x=2\pi a_0,

So

a0=12π∫02πf(x) dx,a_0=\frac{1}{2\pi}\int_0^{2\pi}f(x)\,\mathrm{d}x,

it happens to be ff average over the interval. This is also intuitive: the constant term is the constant that is “contained on average” in the function.

More typically a1a_1. Multiply both sides of the expansion by cos⁡x\cos x Point again. Due to orthogonality, the right-hand side a1cos⁡xa_1\cos x Everything except that item disappears, leaving only

∫02πf(x)cos⁡x dx=a1∫02πcos⁡2x dx=πa1,\int_0^{2\pi}f(x)\cos x\,\mathrm{d}x =a_1\int_0^{2\pi}\cos^2x\,\mathrm{d}x=\pi a_1,

thus

a1=1π∫02πf(x)cos⁡x dx.a_1=\frac{1}{\pi}\int_0^{2\pi}f(x)\cos x\,\mathrm{d}x .

The same approach is given for each ana_n and bnb_n: use cos⁡nx\cos nx or sin⁡nx\sin nx To do the inner product, only the corresponding term on the right side remains, and the denominators are both π\pi (The constant term is 2π2\pi). This is the coefficient formula of the Fourier series, often called Euler’s formula. The meaning of the coefficients is very specific: a0a_0 is how many constants the function contains, a1a_1 How much does it contain cos⁡x\cos x, b1b_1 How much does it contain sin⁡x\sin x, and so on, each ana_n, bnb_n Metric No. nn The amount of harmonics. The action of finding the coefficients can also be said straightforwardly: multiply the expansion by a certain basis function and then integrate. All other terms will be killed by orthogonality, leaving only the desired term.

Looking back at the structure of the entire derivation, it corresponds verbatim to Section 5: vectors are replaced by functions, dot products are replaced by definite integrals, the addition of finite terms is replaced by infinite series, and orthogonal vectors are replaced by orthogonal function systems; and the rule “the coefficient is equal to the inner product divided by the square of the length of the basis function” has not changed a word. The Fourier series can be established not by analytical skills, but by the existence of orthogonal basis in the function space.

Video 00:40:42: Classroom blackboard writing

Video 00:40:42 | Approximately corresponding to Section 6 “6. Fourier Series”.

Video 00:46:05: Classroom blackboard writing

Video 00:46:05 | Approximately corresponding to Section 6 “6. Fourier Series”.

Official Handout Summary Page 4/4

MIT OCW Official Lecture Notes Summary Page 4/4 (18.06SC Lecture 24 Summary, CC BY-NC-SA 4.0).

Summary of this lecture

  • Markov matrix (Markov matrix) two defining properties: all elements are non-negative; the sum of the elements in each column is 11. Example A=[0.10.010.30.20.990.30.700.4]A=\begin{bmatrix}0.1&0.01&0.3\\0.2&0.99&0.3\\0.7&0&0.4\end{bmatrix} Satisfy these two items.
  • Two properties hold during exponentiation: 1TA=1T\boldsymbol{1}^{\mathsf T}A=\boldsymbol{1}^{\mathsf T} launch 1TAk=1T\boldsymbol{1}^{\mathsf T}A^k=\boldsymbol{1}^{\mathsf T}, so AkA^k Still a Markov matrix, the total 1Tuk\boldsymbol{1}^{\mathsf T}\boldsymbol{u}_k Conservation.
  • Key fact one: λ=1\lambda=1 It must be an eigenvalue. The reason is not to calculate the determinant, but A−IA-I The sum of each column of is zero, then (1,1,1)(1,1,1) in A−IA-I In the left null space of , the rows are linearly related, A−IA-I Bizarre.
  • Key fact 2: The absolute values of the remaining eigenvalues do not exceed 11, generally strictly less than 11;If there is a modulus 11 other eigenvalues of (such as the permutation matrix −1-1), the power does not converge to a single stable state. in strictly less than 11 situation, uk=c1λ1kx1+⋯+cnλnkxn→c1x1\boldsymbol{u}_k=c_1\lambda_1^k\boldsymbol{x}_1+\cdots+c_n\lambda_n^k\boldsymbol{x}_n\to c_1\boldsymbol{x}_1, this is the steady state; c1c_1 Determined by the initial vector. Steady-state correspondence of differential equations λ=0\lambda=0, here corresponds to λ=1\lambda=1.
  • The steady-state eigenvector of the example is x1=(6,330,7)T\boldsymbol{x}_1=(6,330,7)^{\mathsf T}: take x1=6x_1=6 Later by 0.7x1=0.6x30.7x_1=0.6x_3 Got x3=7x_3=7, and then determined from the first line x2=330x_2=330, all three components are positive.
  • AA with ATA^{\mathsf T} The eigenvalues of are exactly the same (because det⁡(A−λI)=det⁡(AT−λI)\det(A-\lambda I)=\det(A^{\mathsf T}-\lambda I)), but the eigenvectors are different: (1,1,1)(1,1,1) Belong to ATA^{\mathsf T}, the steady state belongs to AA.
  • California-Massachusetts example: A=[0.90.20.10.8]A=\begin{bmatrix}0.9&0.2\\0.1&0.8\end{bmatrix}, characteristic value 11 with 0.70.7, feature vector (2,1)T(2,1)^{\mathsf T} with (1,−1)T(1,-1)^{\mathsf T}; by u0=(0,1000)T\boldsymbol{u}_0=(0,1000)^{\mathsf T} Got uk=10003(2,1)T−20003(0.7)k(1,−1)T\boldsymbol{u}_k=\frac{1000}{3}(2,1)^{\mathsf T}-\frac{2000}{3}(0.7)^k(1,-1)^{\mathsf T}, the steady state is (2000/3,1000/3)(2000/3,1000/3).
  • orthonormal basis (orthonormal basis) QTQ=IQ^{\mathsf T}Q=I, Q−1=QTQ^{-1}=Q^{\mathsf T}, the expansion coefficient is the inner product xi=qiTvx_i=\boldsymbol{q}_i^{\mathsf T}\boldsymbol{v}.
  • Fourier series (Fourier series): The inner product of a function space is the integral ⟨f,g⟩=∫02πfg dx\langle f,g\rangle=\int_0^{2\pi}fg\,\mathrm{d}x, base 1,cos⁡x,sin⁡x,cos⁡2x,sin⁡2x,…1,\cos x,\sin x,\cos 2x,\sin 2x,\dots Pairs are orthogonal; a0a_0 is ff the average value of a1=1π∫02πf(x)cos⁡x dxa_1=\frac{1}{\pi}\int_0^{2\pi}f(x)\cos x\,\mathrm{d}x, because ∫02πcos⁡2x dx=π\int_0^{2\pi}\cos^2x\,\mathrm{d}x=\pi.

keywords

EnglishChineseOne sentence explanation
Markov matrixMarkov matrixThe elements are non-negative and the sum of each column is 11 The square matrix describes the system of transition according to fixed probability
steady stateSteady stateThe state that the system tends to after a long period of time, that is, λ=1\lambda=1 The eigenvector direction of
left nullspaceleft null spacesatisfy yTA=0\boldsymbol{y}^{\mathsf T}A=\boldsymbol{0} vector of y\boldsymbol{y} The space constituted by N(AT)N(A^{\mathsf T})
tracetraceThe sum of the diagonal elements is equal to the sum of all eigenvalues
power of a matrixmatrix powerAkA^k Indicates continuous action kk times, Akxi=λikxiA^k\boldsymbol{x}_i=\lambda_i^k\boldsymbol{x}_i
diagonalizablediagonalizableThere are enough linearly independent eigenvectors to expand the initial vector.
orthonormalorthogonalPairs are orthogonal and both have lengths 11 a set of vectors
orthogonal matrixorthogonal matrixColumn vector orthonormal square matrix QQ, satisfy QTQ=IQ^{\mathsf T}Q=I, so Q−1=QTQ^{-1}=Q^{\mathsf T}
inner productinner productThe finite dimension is the dot product, and the function space is ∫fg dx\int f g\,\mathrm{d}x, used to determine orthogonality and find expansion coefficients
Fourier seriesFourier seriesLet the period be 2π2\pi function press 1,cos⁡nx,sin⁡nx1,\cos nx,\sin nx Expand to get the sum of infinite terms
orthogonal basisOrthogonal basisA set of basis vectors or basis functions that are pairwise orthogonal. The coefficients are calculated one by one through the inner product.
periodic functionperiodic functionsatisfy f(x+2π)=f(x)f(x+2\pi)=f(x) function, applicable object of Fourier expansion
infinite dimensionalinfinite dimensionsThe function space requires an infinite number of basis functions, so the Fourier series has an infinite number of terms.

← Lecture 23 | Course Catalog | Lecture 24b →

Machine-assisted translation · Read Chinese original