Skip to main content

Matrix s paces; rank 1; small world graphs

讲座摘要(lecture summary)

We’ve talked a lot about Rn\mathbb{R}^{n} , but we can think about vector spaces made up of any sort of “vectors” that allow addition and scalar multiplication.

New vector spaces

33 by 33 matrices

We were looking at the space MM of all 3 by 3 matrices. We identified some subspaces; the symmetric 3 by 3 matrices S, the upper triangular 3 by 3 matrices U,U, and the intersection DD of these two spaces – the space of diagonal 3 by 3 matrices.

The dimension of MM is 9; we must choose 9 numbers to specify an element of MM . The space MM is very similar to R9\mathbb{R}^{9} . A good choice of basis is:

[100000000],  [010000000],  [001000000],[000000010],  [000000001].\begin{array}{r}{\left[\begin{array}{l l l}{1}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\;\left[\begin{array}{l l l}{0}&{1}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\;\left[\begin{array}{l l l}{0}&{0}&{1}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\ldots\left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{1}&{0}\end{array}\right],\;\left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{1}\end{array}\right].}\end{array}

The subspace of symmetric matrices SS has dimension 6. When choosing an element of SS we 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 for SS is the collection:

[100000000],  [010100000],  [001000100],  [000010000],  [000001010],  [000000001].\left[\begin{array}{l l l}{1}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{1}&{0}\\ {1}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{1}\\ {0}&{0}&{0}\\ {1}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{1}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{1}\\ {0}&{1}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{1}\end{array}\right].

The dimension of UU is again 6; we have the same amount of freedom in selecting the entries of an upper triangular matrix as we did in choosing a symmetric matrix. A basis for UU is:

[100000000],  [010000000],  [001000000],  [000010000],  [000001000],  [000000001].\left[\begin{array}{l l l}{1}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{1}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{1}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{1}&{0}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{1}\\ {0}&{0}&{0}\end{array}\right],\; \left[\begin{array}{l l l}{0}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{1}\end{array}\right].

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

The subspace D = SUD\ =\ S\cap U of diagonal 3 by 3 matrices has dimension 3. Because of the way we chose bases for UU and SS , a good basis for DD is the intersection of those bases.

Is SU,S\cup U, the set of 3 by 3 matrices which are either symmetric or upper triangular, a subspace of M?NoM?\,\,\mathrm{No} . This is like taking two lines in R2\mathbb{R}^{2} and asking if together they form a subspace; we have to fill in between them. If we take all possible sums of elements of SS and elements of UU we get what we call the sum S+US+U . This is a subspace of MM . In fact, S+U=MS+U=M . For unions and sums, dimensions follow this rule:

dimS+dimU=dimSU+dimSU.\dim S+\dim U=\dim S\cup U+\dim S\cap U.

Differential equations

Another example of a vector space that’s not Rn\mathbb{R}^{n} appears in differential equations.

We can think of the solutions yy to d2ydx2+y=0\displaystyle{\frac{d^{2}y}{d x^{2}}}+y=0 as the elements of a nullspace. Some solutions are:

y=cosx,y=sinx,andy=eix.y=\cos x,\quad y=\sin x,\quad{\mathrm{and}}\quad y=e^{i x}.

The complete solution is:

y=c1cosx+c2sinx,y=c_{1}\cos x+c_{2}\sin x,

where c1c_{1} and c2c_{2} can be any complex numbers. This solution space is a two dimensional vector space with basis vectors cos xx and sin xx . (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 4 matrices

Now let MM be the space of 5×175\times17 matrices. The subset of MM containing 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.

In R4\mathbb{R}^{4} , the set of all vectors v=[v1v2v3v4]\mathbf{v}=\left[{\begin{array}{l}{v_{1}}\\ {v_{2}}\\ {v_{3}}\\ {v_{4}}\end{array}}\right] for which v1+v2+v3+v4=0v_{1}+v_{2}+v_{3}+v_{4}=0 is a subspace. It contains the zero vector and is closed un der addition a nd scalar multiplication. It is the nullspace of the matrix A=[1111]A={\left[\begin{array}{l l l l}{1}&{1}&{1}&{1}\end{array}\right]} . Because AA has rank 1, the dimension of this nullspace is nr=3n-r=3 . The subspace has the basis of special solutions:

[1100],  [1010],  [1001].\left[{\begin{array}{r}{-1}\\ {1}\\ {0}\\ {0}\end{array}}\right],\;\left[{\begin{array}{r}{-1}\\ {0}\\ {1}\\ {0}\end{array}}\right],\;\left[{\begin{array}{r}{-1}\\ {0}\\ {0}\\ {1}\end{array}}\right].

The column space of AA is R1\mathbb{R}^{1} . The left nullspace contains only the zero vector, has dimension zero, and its basis is the empty set. The row space of AA also has dimension 11.

Rank one matrices

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

A=[1452810]A={\left[\begin{array}{l l l}{1}&{4}&{5}\\ {2}&{8}&{10}\end{array}\right]}

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

A=[12][145].A={\left[\begin{array}{l}{1}\\ {2}\end{array}\right]}{\left[\begin{array}{l l l}{1}&{4}&{5}\end{array}\right]}\,.

Every rank 11 matrix AA can be written A=UVT.\begin{array}{r}{\boldsymbol{A}=\mathbf{U}\mathbf{V}^{T}.}\end{array} , where U\mathbf{U} and V\mathbf{V} are column vectors. We’ll use rank 1 matrices as building blocks for more complex matrices.

Small world graphs

In this class, a graph GG is a collection of nodes joined by edges:

G={nodes,edges}.G=\left\{{\mathrm{nodes}},{\mathrm{edges}}\right\}.

A typical graph appears in Figure 1. Another example of a graph is 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”.

Figure 1: A graph with 5 nodes and 6 edges.

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.

Problems and Solutions(习题及答案)

Problem 11.1: [Optional] (3.5 #41. Introduction to Linear Algebra: Strang) Write the 3 by 3 identity matrix as a combination of the other five permutation matrices. Then show that those five matrices are linearly independent. (Assume a combination gives c1P1++c5P5=0c_{1}P_{1}+\cdots+c_{5}P_{5}\,=\,0 and check entries to prove cic_{i} is zero.) The five permutation matrices are a basis for the subspace of three by three matrices with row and column sums all equal.

Solution

The other five permutation matrices are:

P21=[111],P31=[111],P32=[111],P_{21}=\left[\begin{array}{l l l}{\phantom{-}1}&{\phantom{-}}\\ {1}&{\phantom{-}1}\end{array}\right],P_{31}=\left[\begin{array}{l l l}{\phantom{-}}&{1}\\ {\phantom{-}1}&{\phantom{-}}\\ {1}&{\phantom{-}}\end{array}\right],P_{32}=\left[\begin{array}{l l l}{1}&{}&{}\\ {}&{}&{1}\\ {}&{1}&{}\end{array}\right],P32P21=[111] and P21P32=[111].P_{32}P_{21}=\left[{\begin{array}{r r r}{}&{1}&{}\\ {}&{}&{1}\\ {1}&{}&{}\end{array}}\right]{\mathrm{~and~}}P_{21}P_{32}=\left[{\begin{array}{r r r}{}&{1}\\ {1}&{}&{}\\ {}&{1}&{}\end{array}}\right].

Since P21+P31+P32P_{21}+P_{31}+P_{32} is the all ones matrix and P32P21+P21P32P_{32}P_{21}+P_{21}P_{32} is the matrix with zeros on the diagonal and ones elsewhere,

I=P21+P31+P32P32P21P21P32.I=P_{21}+P_{31}+P_{32}-P_{32}P_{21}-P_{21}P_{32}.

For the second part, setting c1P1++c5P5c_{1}P_{1}+\cdot\cdot+c_{5}P_{5} equal to zero gives:

[c3c1+c4c2+c5c1+c5c2c3+c4c2+c4c3+c5c1]=0.\left[\begin{array}{c c c}{{c_{3}}}&{{c_{1}+c_{4}}}&{{c_{2}+c_{5}}}\\ {{c_{1}+c_{5}}}&{{c_{2}}}&{{c_{3}+c_{4}}}\\ {{c_{2}+c_{4}}}&{{c_{3}+c_{5}}}&{{c_{1}}}\end{array}\right]=0.

So c1=c2=c3=0c_{1}\,=\,c_{2}\,=\,c_{3}\,=\,0 along the diagonal, and c4=c5=0c_{4}\,=\,c_{5}\,=\,0 from the offdiagonal entries.

Problem 11.2: (3.6 #31.) M\mathbf{M} is the space of three by three matrices. Multiply each matrix XX in M\mathbf{M} by:

A=[101110011]A=\left[{\begin{array}{r r r}{1}&{0}&{-1}\\ {-1}&{1}&{0}\\ {0}&{-1}&{1}\end{array}}\right]

Notice that A[111]=[000].A{\left[\begin{array}{l}{1}\\ {1}\\ {1}\end{array}\right]}={\left[\begin{array}{l}{0}\\ {0}\\ {0}\end{array}\right]}.

  • a) Which matrices X lead to AX=0?A X=0?
  • b) Which matrices have the form AXA X for some matrix X?
  • c) Part (a) finds the “nullspace” of the operation AXA X and part (b) finds the “column space.” What are the dimensions of those two subspaces of M\mathbf{M}? Why do the dimensions add to (nr)+r=9?(n-r)+r=9?

Solution

a) We can use row reduction or some other method to see that the rows of AA are dependent and that AA has rank 22. Its nullspace has the basis:

[111] .{\left[\begin{array}{l}{1}\\ {1}\\ {1}\end{array}\right]}~.

AX=0A X=0 precisely when the columns of XX are in the nullspace of AA , i.e. when they are multiples of the basis of N(A)N(A) . Therefore, if AX=0A X\,=\,0 then XX must have the form:

X=[abcabcabc] .X={\left[\begin{array}{l l l}{a}&{b}&{c}\\ {a}&{b}&{c}\\ {a}&{b}&{c}\end{array}\right]}~.

b) On the other hand, the columns of any matrix of the form AXA X are linear combinations of the columns of AA . That is, they are vectors whose components all sum to 00, so a matrix has the form AXA X if and only if all of its columns individually sum to 00:

AX=B  if and only if B=[abcdefadbecf].A X=B\;{\mathrm{if~and~only~if~}}B=\left[{\begin{array}{c c c}{a}&{b}&{c}\\ {d}&{e}&{f}\\ {-a-d}&{-b-e}&{-c-f}\end{array}}\right].

c) The dimension of the “nullspace” is 33, while the dimension of the "column space" is 66. These add up to 99, which is the dimension of the space of “inputs” M\mathbf{M}.