Linear-Algebra-MIT-Gilbert-Strang-(L12-L15)

Ting Qiao
6 min readSep 28, 2020

Lecture 12. An application in Physics: Represent Graph with Matrix.

0. An Application for Chemistry. Equation -> Matrix.

  1. 4 Nodes, 5 Edges.

2. Form a 5x4 matrix. Nodes on Columns, Edge on Rows.

3. A loop in this matrix will be shown as Free rows. R1 + R2 = R3

4. It is a very sparse matrix. Lots of zeros. Genuine problems matrix has structures.

5. The Ax is computing the difference between each node. Assume the x is the potential(potential in physics) of each node. The Ax is computing the difference of potentials. Ax=0 means there is no difference, a stable state. In reality, it could mean there is no current(current in physics) flow between these nodes. The dimension of Nullspace is 1 means, only one variable is needed to set the whole potentials in the graph.

That is the Kirchoff Voltage Law:

6. A^T y = 0

The last time for A, we considering the nodes, which is representing the potential. Now, after the transpose, the matrix is considering the edges. What is on the Edge? It can find a corresponding in physics as current.

A^T * y = 0 is telling that: What goes into the node equals what go out of the node. (Refer back to the graph).

Kirchoff Current Law:

The basis of Nullspace corresponding to Circles. Actually, the basis of Nullspace tells about the dependency relationship in the original matrix.

7. Ohm’s Law: ΔV = I*R.

9. Euler’s Formula.

The dimension of N(A^T) is m-r, which is the number of loops.

m is the number of edges as defined before.

r is the rank of the matrix. The graph has no edge: A Tree, which will make rank = n, with no free column in nullspace, with no loop.

In the end, add them together and tidy them up to get Euler’s Formula.

9. Focus on Equilibrium. All states are static.

Lecture 14. orthogonal

  1. The subspaces are orthogonal.

2. How to find the vectors are orthogonal: Find the dot product. Why? Pythagoras.

3. It sometimes can not TRUE. The intersection is in both plane, and it is not orthogonal to itself.

4. The Row Space is orthogonal to the Nullspace, by the definition of Nullspace. All row’s combinations multiplied by x is 0.

Same goes to the Column space and A^T.

3D space, Row space = 1(line), Nullspace = 1(line), doesn’t work. Due to n=r + dim(N(A))

All in all:

Row space and Nullspace are orthogonal complements in R^n.

Nullspace contains all vectors perpendicular to the Row space.

5. Ax=b has no solution -> b is in the column space. Typical: m> n. Too many junk data. Solution: How to make full use of data in Ax = b

6. When A^TA is invertible? So we can solve it easily.

Lecture 15. Projection and Least square.

  1. Reason: Ax = b, the b sometimes may not have a solution, the b sometimes may not be in the A’s column space. In other words, the b cannot be represented by columns in A.

So we want to find a p that Ax^ = p. The p is the projection of b onto the Column space of A. The projected p should keep as much information of b as possible.

The idea of finding an acceptable solution p bring us the idea of least square.

2. Let’s start from a 2D example.

We want to find the unknown x.

P’s rank is equal to a’s rank r = 1. P is symmetric. P = P^T

p=Pb: p is always in P’s column space. C(P) = through a.

If we do the projection again, something = Pp = P^T * P * b, no changing.

P² = P

3. The plane is formed by basis, the basis is from the Column space of A.

That looks familiar with the 2D example. p = a x. The next step is using the perpendicular.

In matrix form: e is in the Nullspace of A^T. It is perpendicular to the column space of A. (Remember the relationship of 4 subspaces? The butterfly graph.)

4. In 2D A was a number. X was the ratio of the number.

5. Do the same thing as 1D, substitution. Find a similar form.

6. When A is not an invertible matrix. It tells us, when trying to distribute the inverse, think about whether the parts are invertible or not.

7. P²=P, P^T = P still stands.

8. The idea of finding an acceptable solution p bring us the idea of least square.

Problem statement:

Problem Model:

Solution:

We find the closest solution x^ that can solve it, by projecting the b to the column space of A.

Reference:

KCL: https://www.electronics-tutorials.ws/dccircuits/dcp_4.html

--

--