MIT18.06_4_Four Fundamental Subspaces
Carpe Tu Black Whistle

Independence, basis, and dimension

What does it mean for vectors to be independent? How does the idea of independence help us describe subspaces like the nullspace?

这一节,涉及独立性,或者说线性无关/独立的定义。 有助于帮我们理解,像子空间这类的零空间

Linear independence

Supposeis anmatrix with(sohas more unknowns than equations).has at least one free variable, so there are nonzero solutions to. A combination of the columns is zero, so the columns of thisare dependent.

假设矩阵的形状是,且满足(more unknowns than equations). 矩阵至少有一个自由变量

We say vectorsare linearly independent (or just independent)
ifonly whenare all 0. When those vectors are the columns of, the only solution tois.

当一系列向量线性组合为0的唯一系数组为,则这一组向量组线性无关

Two vectors are independent if they do not lie on the same line. Three vectors are independent if they do not lie in the same plane. Thinking ofas a linear combination of the column vectors of, we see that the column vectors ofare independent exactly when the nullspace ofcontains only the zero vector.

  • 两个向量 线性独立:不在一条线上。
  • 三个向量 线性独立:不在一个平面。
  • 视为矩阵列向量的线性组合。
  • 矩阵的列向量组,独立,那么的零空间只包含零向量

If the columns ofare independent then all columns are pivot columns, the rank ofis, and there are no free variables. If the columns ofare dependent then the rank ofis less thanand there are free variables.

  • 若矩阵的列向量独立,那么所有列都为主元列
  • 矩阵的秩为,那么没有 自由变量。
  • 矩阵列向量线性不独立:矩阵秩rank小于,存在自由向量

Spanning a space

张成空间

Vectorsspan a space when the space consists of all combinations of those vectors. For example, the column vectors ofspan the column space of.

向量组张成(span) 一个由这些所有向量的排列组合组成的空间。例如,矩阵的列向量张成的列空间。

If vectorsspan a space, thenis the smallest space containing those vectors.

如果向量组张成空间为,那么应该就是包含这些向量组的最小空间。

Basis and dimension

基与维度

A basis for a vector space is a sequence of vectorswith two properties:

  • are independent.
  • span the vector space.

线性空间的是有以下两个中性质的一系列向量:

  1. 各个向量间相互独立。
  2. 各个向量张成了这个空间。

The basis of a space tells us everything we need to know about that space.

蕴含了一个向量空间的全部信息(?)。
大概是,唯一确定一组基,那么就能唯一确定一个向量空间。

Example:

one basis foris {}

These are independent becasuse:

is only possible when. These vectors span.

As discussed at the start of Lecture 10, the vectors,anddo not form a basis forbecause these are the column vectors of a matrix that has two identical rows. The three vectors are not linearly independent.

上面三个向量并不是相互独立的。三个向量组成的矩阵,前两行成比例。

In general,vectors inform a basis if they are the column vectors of an invertible matrix.

Basis for a subspace

The vectorsandspan a plane inbut they cannot form a basis for. Given a space, every basis for that space has the same number of vectors; that number is the dimension of the space. So there are exactlyvectors in every basis for.

  • 上面的两个向量能够在三维空间生成一个平面,但是他们(两个向量)并不是的基。
  • 给定空间,每个基(可以有很多基)都有相同数量的向量。这个数量 = dimension of the space.

Base of a column space and nullspace

Suppose:

By definition, the four column vectors ofspan the column space of. The third and fourth column vectors are dependent on the first and second, and the first two columns are independent. Therefore, the first two column vectors are the pivot columns. They form a basis for the column space. The matrix has rank 2. In fact, for any matrixwe can say:

(Note that matrices have a rank but not a dimension. Subspaces have a dimension but not a rank.)

NOTE: 矩阵有秩而无维度之说,子空间有维度而无秩一说。

The column vectors of thisare not independent, so the nullspacecontains more than just the zero vector. Because the third column is the sum of the first two, we know that the vectoris in the nullspace. Similarly,is also in. These are the two solutions to. We’ll see that:

so we know that the dimension ofis. These two special solutions form a basis for the nullspace.

recitation

image

四个的向量,寻找向量组的基。
通过消元法,可以得到最终结果。

image

最后消元结果的列向量,与原矩阵组对应列向量,张成空间相同。

image

但是,如果消元过程中,遇到行列变换、非向量间(这个是我编的),某某维度间消除.

  • 最后剩下的向量张成空间维度会与先前相同,但是不是同一个空间。

Four Fundamental Subspaces

In this lecture, we discusss the four fundamental spaces associated with a matrix and the relations between them.
This is really the heart of this approach to linear algebra. To see these four subspaces, how they’re related.

四个基本矩阵的相互关系,是线性代数的核心。

image

The main question: how to produce a basis? What’s the dimension?

Four subspaces

Anymatrixdetermines four subspaces (possibly containing only the zero vector):

Column space,

consists of all combinations of the columns ofand is a vector space in.

basis:

Nullspace,

This consists of all solutionsof the equationand lies in.

Row space,

The combinations of the row vectors ofform a subspace of. We equate this with, the column space of the transpose of.

Left nullspace,

We call the nullsapce ofthe left nullspace of. This is a subspace of.

Basis and Dimension

Column space

Thepivot columns form a basis for

列空间的basis是主列pivot cols.

Nullspace

The special solutions tocorrespond to free variables and form a basis for. Anbymatrix hasfree variables:

Nullspace的基basis为special solutions.

Row space

We could perform row reduction on, but instead we make use of, the row reduced echelon form of.

  • 我们可以对使用row reduction
  • 也可以生成矩阵的rref矩阵

Although the column spaces ofandare different, the row space ofis the same as the row space of. The rows ofare combinations of the rows of, and because reduction is reversible the rows ofare combinations of the rows of.

  • 尽管对列空间有本质不同,的行空间和的行空间是相同的。
  • 的行向量是行向量的线性组合。

The firstrows ofare the “echelon” basis for the row space of:

Left nullspace

The matrixhascolumns. We just saw thatis the rank of, so the number of free columns ofmust be:

Left nullspace 是的零矩阵,的rank为可以推断,左零的秩为

The left nullspace is the collection of vectorsfor which. Equivalently,; hereandare row vectors. We say “left nullspace” becauseis on the left ofin this equation.

左零空间的等式为可以等效表达为; 等式的解就在矩阵的左侧了,因此称为left nullspace。

To find a basis for the left nullspace we reduce and augmented version of:

为了寻求 left nullspace 的基,我们对增广相同几何尺寸的,再求rref形式。

From this we get the matrixfor which. (Ifis a square, invertible matrix then) In our example,

The bottomrows ofdescribe linear dependencies of rows of, because the bottomrows ofare zero. Here(one zero row in).

rref矩阵的上是含有主元元素的列,下行则是全为0的列。

The bottomrows ofsatisfy the equationand form a basis for the left nullspace of.

全为0的行对应的,中的行,即为的special solution.
原因:矩阵中的某行,可以视为矩阵中的对应行和矩阵的乘积。

补充一个点
image

  • row space和nullspace都属于
    • 行空间的向量维度为
    • nullspace是的解空间,等于矩阵的行维。
  • column space和left space同理属于

Matrix space

  • 讲稿上本来写的是 New vector space,但是私以为 Matrix space 更为合适
  • 这种观点是 “向量空间向矩阵的一种衍生(推广、外延)”
  • 理由:所有向量空间的运算性质,都能推广到矩阵空间

The collection of allmatrices forms a vector space; call it. We can add matrices and multiply them by scalars and there’s a zero matrix (additive identity). If we ignore the fact that we can multiply matrices by each other, they behave just like vectors.

所有shape为的矩阵(视为向量)张成空间,命名为。满足线性运算。如果不管(无视)矩阵乘法,就可以当作代数符号或者向量一样运算

Some subspaces ofinclude:

  • all upper triangular matrices
  • all symmetric matrices
  • D, all diagonal matrices

列举了一些的子空间。

is the intersection of the first two spaces. Its dimension is 3; one basis foris:

Prof. Gilbert 举的一个例子:能够张成 对角矩阵 的一组 basis 基。

Matrix spaces; rank 1; small world graphs

We’ve talked a lot about, but we can think about vector spaces made up of any sort of “vectors” that allow addition and scalar multiplication.

书接上回,对于满足 线性运算 条件的运算对象,都可以引入 “线性空间” 概念。

New vector spaces

3 by 3 matrices

We were looking at spaceof all 3 by 3 matrices. We identified some subspaces: the symmetric 3 by 3 matrices, the upper triangular 3 by 3 matrices, and the intersectionof these two spaces - the space of diagonal 3 by 3 matrices.

三个矩阵空间例子: 对称矩阵、上三角矩阵、两者的交集—- 相同shape的主对角矩阵。

The dimension ofis 9; we must choose 9 numbers to specify an element of. The spaceis very similar to. A good choice of basis is:

以上为,生成矩阵的最简单一组基。

**的区别 **

  • 前者的元素为一个维度为9的向量。
  • 但是后者的元素为一个shape为的矩阵。

The subspace of symmetric matriceshas dimension 6. When choosing an element ofwe pick three numbers on the diagonal and three in the upper right, which tell us what must appear in the lower left of the matrix. One basis foris the collection:


以上为空间的子空间3阶对称矩阵的最简单的基。

The dimension ofis again 6; we have the same amout of freedom in selecting the entries of an upper right, which tell us what must appear in the lower left of the matrix. One basis foris:


上三角矩阵基。

This happens to be a subset of the basis we chose for, but there is no basis forthat is a subset of the basis we chose for.

  • 上三角矩阵空间恰好是矩阵空间的子空间。对称矩阵空间也是。
  • 但是并不是属于关系。

The subspaceof diagonal 3 by 3 matrices has dimension 3. Because of the way we chose bases forand, a good basis foris the intersection of those bases.

两个子空间的交集也是子空间。> We only live so long, so skip the prove it.

Is, the set of 3 by 3 matrices which are either symmetric or upper triangular, a subspace of? No. This is like taking two lines inand asking if together they form a subspace; we have to fill in between them. If we take all possible sums of elements ofand elements ofwe get what we call the sum. This is a subsapce of. In fact,. For unions and sums, dimensions follow this rule:

** 在探明,对称矩阵空间 与 上三角矩阵空间 两者的并集的时候,就跟研究两个直线集组成的线性空间一样,要填充两个集合各取一个元素进行线性运算的情形 **

我们将所有可能的元素之和作集,记为 the sum. 这是的一个子空间(不严格属于,)。

Differential equations

Another example of a vector space that’s notappears in differential equations.

另一个不是用表征向量空间的例子是**差分方程。 (上一个是矩阵表征)

我们思考差分方程的解空间作为一个零空间的元素,解为:

We can think of the solutionstoas the elements of a nullspace. Some solutions are:

The complete solution is:

whereandcan be any complex numbers. This solution space is a two dimensional vector space with basis vectorsand. (Even though these don’t “look like” vectors, we can build a vector space from them because they can be added and multiplied by a constant.)

最后得到的结果为:,最后的解空间为 由像个基向量组成的。

** 这里一个比较核心的观点 万物皆向量 **

Rank one matrices

The rank of a matrix is the dimension of its column(or row) space. The matrix

has rank 1 because each of its columns is a multiple of the first column.

Every rank 1 matrixcan be written, whereandare column vectors. We’ll use rank 1 matrices as building blocks for more complex matrices.

rank1矩阵 有一些比较特殊的性质:

  • 可以表示为一个列向量(也是basis)
    • 和scale放大因子构成的横向量
    • 最后就会写成这里的是basis,而则为由scale的影响因子。
  • 此外,对于一个shape为的空间有一个子空间
    • 那么这时,只需要4个rank=1的矩阵,就能构造
    • 因此,rank1矩阵,在矩阵空间内,就像能够搭建起他矩阵的积木一样。

Rank 4 matrices

Now letbe the space ofmatrices. The subset ofcontaining all rank 4 matrices is not a subspace, even if we include the zero matrix, because the sum of two rank 4 matrices may not have rank 4.

现将矩阵设为的矩阵。那么的子集,包含所有rank4矩阵的空间,不是的子空间。

因为,两个rank4的矩阵和不一定rank4

In, the set of all vectorsfor whichis a subspace. It contains the zero vector and is closed under addition and scalar multiplication. It is the nullspace of the matrix. Becausehas rank 1, the dimension of this nullspace is. The subspace has the basis of special solutions:

The column space ofis. The left nullspace contains only the zero vector, has dimension zero, and its basis is the empty set. The row space ofalso has dimension 1.

这里感觉没啥,好讲的,都是上一节的内容。

Small world graphs

The last topic of small world graphs, and leads into, a lecture about graphs and linear algebra.

这里介绍一种特殊的图–“小世界图”,来引出,线性代数图论 之间的关系。

graph

** what’s a graph? **
In this class, a graphis a collection of nodes joined by edges:

image

图是 节点 的集合,边连通各个节点。

A typical graph appears in Figure 1.

image

which each node is a person. Two nodes are connected by an edge if the people are friends. We can ask how close two people are to each other in the graph - what’s the smallest number of friend to friend connections joining them? The question “what’s the farthest distance between two people in the graph?” lies behind phrases like “six degrees of separation” and “it’s a small world”.

  • ”小世界” 模型中,每个节点代表一个社会人,边沿代表社会连结。
    • 最远的“社会距离”? 6 degree.
    • 给人“这个世界真小啊”的感慨,所以叫“小世界”模型。

Another graph is the world wide web: its nodes are web sites and its edges are links.
We’ll describe graphs in terms of matrices, which will make it easy to answer questions about distances between nodes.

另一个典型的图是:万维网(www, world wide web)
我们将会以矩阵的形式来表征,方便表征各个节点之间的距离。

Graphs, networks, incidence matrices

When we use linear algebra to understand physical systems, we often find more structure in the matrices and vectors than appears in the examples we make up in class. There are many applications of linear algebra; for example, chemists might use row reduction to get a clearer picture of what elements go into a complicatied reaction. In this lecture we explore the linear algebra associated with electrical networks.

  • 当我们使用 线性几何 来理解物理系统的时候,我们常常会发现比课堂例子中更复杂的矩阵/向量结构
  • 此外还有很多应用的例子:
    • 化学家 使用 row reduction 来更简单地表述 化学元素在复杂反应中的 图。
    • 这一节中,我们结合 线性代数电路网络 系统。

Graphs and networks

A graph is a collection of nodes joined by edges; Figure 1 shows one small graph.

image

We put an arrow on each edge to indicate the positive direction for currents running through the graph.

image

Incidence matrices

Incidence matrices: 关联矩阵

The incidence matrix of this directed graph has one column for each node of the graph and one row for each edge of the graph:

有向图的关联矩阵,每一列对应图的一个节点,每一行对应图的:

If an edge runs from nodeto node, the row corresponding to that edge has -1 in columnand 1 in column; all other entries in that row are 0. If we were studying a larger graph we would get a larger matrix but it would be sparse; most of the entries in that matrix would be 0. This is one of the ways matrices arising from applications might have extra structure.

  • 如果有一条边,从节点指向节点
    • 会先对各个边进行编码(这个顺序就是行数。
    • 对应边列元素值为-1,列元素值为1。
  • 当我们在研究更大的图时,矩阵会变得更稀疏
    • 因为每行之有两个元素为非零元素。那么存在大量的零。
    • 每行对应入度和出度元素。
    • 所有行向量之和为0(全图所有节点,出入度中和

Note that nodes 1, 2 and 3 and edges 1,2,3 form a loop. The matrix describing just those nodes and edges looks like:

案例图:

  1. 三个节点 a,b,c
  2. 三条有向边 1,2,3

以上节点组成的图形成一个loop,指向指向

Note that the third row is the sum of the first two rows; loops in the graph correspond to lienarly dependent rows of the matrix.

  • 矩阵的前两行之和等于第三行。
  • loop 在图中与线性相关等效。

To find the nullspace of, we solve:

If the componentsof the vectordescribe the electrical potential at the nodesof the graph, thenis a vector describing the different in potential at the nodes i of the graph, thenis a vector describing the difference in potential across each edge of the graph.

  • 用向量来描述节点的电势,那么就能描述图中各个电势差

We seewhen, so the nullspace has dimension 1. In terms of electricity through the network, but if one node of the network is grounded then its potential is zero.
From that we can determine the potential of all other nodes of the graph.

electrical potential: 电势

The matrix has 4 columns and a 1-dimensional nullspace, so its rank is 3. The first, second and fourth columns are its pivot columns; these edges connect all the nodes of the graph without forming a loop = a graph with no loops is called a tree

tree 树:边连结所有节点,但是没有形成loop的图。

The left nullspace ofconsists of the solutionsto the equation:.
Sincehas 5 columns and rank 3 we know that the dimension ofis.
Note that 2 is the number of loops in the graph andis the number of edges.

值得注意的是,left nullspace的维度2,同时也是loop的数量。

The rankis, one less than the number of nodes. This gives us #loops = #edges - (#nodes-1),or:

This is Euler’s formula for connected graphs.

  • 矩阵的秩,比结点数少1(刚好就是树的边数.
  • number of loops == 边数 - (节点数-1)

上式是连结图的 欧拉方程

Kirchhoff’s law

In our example of an electrical network, we started with the potentialsof the nodes. The matrixthen told us something about potential differences.

上例解释了,矩阵可以反映电势差的相关信息。

An engineer could create a matrixusing Ohm’s law and information about the conductance of the edges and use the matrix to determine the currenton each edge.

工程师可以利用欧姆定律构造矩阵.
图的拓扑结构,能够决定各个边的电导。

Kirchhoff’s Current Law then says that, whereis the vector with components. Vectors in the nullspace ofcorrespond to collections of currents that satisfy Kirchhoff’s law.

基尔霍夫电流定律表示
零空间中的向量与满足基尔霍夫定律的 电流集 相关。

image

Written out,looks like:

  1. Multipilying the first row by the column cectorwe get. This tells us that the total current flowing out of node 1 is zero - it’s a balance equation, or a conservation law.
  1. 第一行的乘法,可以得到。 这可以反映出,所有流出 节点1 点电流为0。满足 平衡方程 or 守恒方程
  1. Multiplying the second row bytells us; the current coming into node 2 is balanced with the current going out.
  1. 第二行的乘法,可知。第二节点电流的入度=出度
  1. Multiplying the bottom rows, we getand.

We could use the method of elimination onto find its column space, but we already know the rank.

我们可以使用消去法来寻得矩阵的列向量空间。但是我们已经知道矩阵的秩了。那么可以猜出两个special solutions。

To get a basis forwe just need to find two independent vectors in this space. Looking at the equationswe might guess.
Then we could use the conservation laws for node 3 to guessand. We satisfy the conservation conditions on node 4 with, giving us a basis vector.

This vector represents one unit of current flowing around the loop joining nodes 1, 2 and 3; a multiple of this vector represents a different amount of current around the same loop.

We find a second basis vector forby looking at the loop formed by nodes 1,3 and 4:. The vectorthat represents a current around the outer loop is also in the nullspace, but it is the sum of the first two vector we found.

We’ve almost completely covered the mathematics of simple circuits. More complex circuits might have batteries in the edges, or current sources between nodes. Adding current sources changes thein Kirchhoff’s current law to. Combining the equationsandgives us :

我们大致介绍了,应用数学中,对电流的应用:

  1. 之前的基尔霍夫电流方程都没有将电源纳入考虑,所以引入常数项
  2. 电势差公式,到欧姆定律,再到电流定律。逐级迭代获得最终结果: