MIT 18.06 Completed

Lecture 33 · Left inverse, right inverse and pseudo inverse

Understand left inverse, right inverse and pseudo inverse, and deal with generalized inverse of rectangular matrices.

On this page

Left and right inverses; pseudoinverse | Gilbert Strang | MIT 18.06 Linear Algebra

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

Video of this lecture: Bilibili p34 · Left inverse, right inverse and pseudo inverse ↗(41:53)| 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, I drew the same picture repeatedly: m×nm\times n matrix AA put Rn\mathbb{R}^n divided into row space (row space) and null space (nullspace), put Rm\mathbb{R}^m divided into column space (column space) and left null space (left nullspace); line space and null space are mutually exclusive orthogonal complement (orthogonal complement), the column space and the left null space are also orthogonal complements of each other. The dimensions of the four subspaces are rr, n−rn-r, rr, m−rm-r, among which rr is rank (rank). This lecture starts from this picture and answers a question: to what extent can the “inverse” of a matrix be defined.

The source of the problem lies in the two null spaces on the graph. For a matrix that compresses non-zero vectors into zero vectors, no “inverse” can save it from zero; so whether the inverse exists depends on whether there are only zero vectors left in the two zero spaces. r=m=nr=m=n when they all disappear, AA There are the usual Bilateral inversion(two-sided inverse).r=n<mr=n<m When the null space disappears and the left null space remains, AA can only have Left reverse (left inverse): multiply back from the left identity matrix (identity matrix), multiplying from the right does not work. r=m<nr=m<n Exactly mirrored, only right inverse (right inverse). The most general r<mr<m and r<nr<n Neither inverse exists, but AA There is still a one-to-one correspondence between row space and column space. If this correspondence is reversed, we get pseudoinverse(pseudoinverse)A+A^{+}.

The three parts correspond to the three “inverses”. The left inverse and the right inverse are a summary of the previous content, and the criteria are all rr with m,nm,n The relationship, the formulas are all ATAA^{\mathsf T}A with AATAA^{\mathsf T} These two “good matrices”; the pseudo-inverse extends this classification to the general situation, which can be found in any matrix; singular value decomposition (singular value decomposition, SVD) explains why the pseudo-inverse is almost effortless to calculate - move it to a diagonal matrix (diagonal matrix), and only need to take the reciprocal of the non-zero singular values.

Official Handout Summary Page 1/3

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

1. Four situations: looking at the inverse from four basic subspaces

put m×nm\times n, rank is rr The matrix press rr with m,nm,n The relationship classification, the inverse problem becomes four judgment questions. The first three are situations that have been dealt with earlier in the course, and the fourth is the main topic of this lecture.

Situation one: r=m=nr=m=n. The square array is at full rank. The line space is the entire Rn\mathbb{R}^n, the column space is the entire Rm\mathbb{R}^m, both null spaces have only zero vectors. The existence matrix makes

A−1A=AA−1=I,A^{-1}A=AA^{-1}=I,

Both left multiplication and right multiplication return to the identity matrix. This is the usual inverse matrix, and it is also the most beautiful case of the word “full rank”.

Scenario 2: r=n<mr=n<m. Full rank(full column rank): nn Columns are linearly independent and rows are mostly related to each other. The null space has only zero vectors, and the row space dimension is nn, that is, the entire Rn\mathbb{R}^n;The column space only occupies Rm\mathbb{R}^m one of nn dimensional subspace. Because the null space is {0}\{\boldsymbol{0}\}, Ax=bA\boldsymbol{x}=\boldsymbol{b} If there is a solution, it must be unique - all other solutions must be obtained by adding vectors in the null space, where there is nothing to add. But the rows may be related, and elimination will produce zero rows, so some right-hand sides have no solution: there are only “zero or one” solutions.

Scenario three: r=m<nr=m<n. Full of rank(full row rank): mm The rows are linearly independent, and there are only zero vectors in the left null space. Elimination will never result in zero rows, Ax=bA\boldsymbol{x}=\boldsymbol{b} for each b\boldsymbol{b} can be solved; but the null space dimension is n−m>0n-m>0, there is n−mn-m a free variable (free variable), there are infinite solutions, and the solution set is “a special solution plus the entire null space”.

Scenario four: r<mr<m and r<nr<n. Both null spaces exist, and the dimensions are n−rn-r with m−rm-r. Neither inverse can be created, but the matrix still maps well between row space and column space. The first three situations are actually degenerate situations in which the null space on this picture disappears in turn, and the fourth situation is the general rule.

Looking at it from another angle, the difference between the four situations can be summarized by two yes-or-no questions: whether the left null space is zero determines ”Ax=bA\boldsymbol{x}=\boldsymbol{b} to which b\boldsymbol{b} “There is a solution”; whether the null space is zero determines “whether the solution is unique when there is a solution”. The four situations are a combination of yes and no from these two questions. The four rows combined cover rr All possible values of , so this classification table is equivalent to an index of the entire course: see r,m,nr,m,n, the solution structure and usable formulas are determined.

Video 00:04:11: Classroom blackboard writing

Video 00:04:11 | Approximately corresponding to section 1 “1. Four situations: looking at the inverse from the four basic subspaces”.

2. Left inverse: column full rank

In case 2, we need to create a “take it from the left” AA To pull back the “unit matrix” matrix, you must first have an invertible square matrix, and what is available here is ATAA^{\mathsf T}A.

ATAA^{\mathsf T}A is n×nn\times n symmetric matrix. It is reversible when the column is of full rank, and the reason is only one line: if ATAx=0A^{\mathsf T}A\boldsymbol{x}=\boldsymbol{0}, multiply left by both sides xT\boldsymbol{x}^{\mathsf T}, got

xTATAx=(Ax)T(Ax)=∥Ax∥2=0,\boldsymbol{x}^{\mathsf T}A^{\mathsf T}A\boldsymbol{x}=(A\boldsymbol{x})^{\mathsf T}(A\boldsymbol{x})=\|A\boldsymbol{x}\|^2=0,

thus Ax=0A\boldsymbol{x}=\boldsymbol{0};Full column rank means that there are only zero vectors in the null space, so x=0\boldsymbol{x}=\boldsymbol{0}.n×nn\times n The null space of a matrix contains only zero vectors, so it is invertible. This fact lies in least squares (least squares) is the core: the coefficient matrix of the entire theory is ATAA^{\mathsf T}A, and the condition for its reversibility happens to be AA The columns are irrelevant.

put (ATA)−1(A^{\mathsf T}A)^{-1} with ATA^{\mathsf T} Multiply in the order of “first transpose, then inverse” to get

Aleft−1=(ATA)−1AT,A^{-1}_{\mathrm{left}}=(A^{\mathsf T}A)^{-1}A^{\mathsf T},

this is a n×mn\times m matrix. To verify that it is the left inverse, put AA Just multiply on the right:

(ATA)−1ATA=(ATA)−1(ATA)=In.(A^{\mathsf T}A)^{-1}A^{\mathsf T}A=(A^{\mathsf T}A)^{-1}(A^{\mathsf T}A)=I_n.

The brackets make exactly one pair, n×nn\times n Multiply the invertible matrix by its own inverse to get the identity matrix. Note that the last one that falls back is nn Dimensional space: AA First Rn\mathbb{R}^n delivered to Rm\mathbb{R}^m, ATA^{\mathsf T} bring it back Rn\mathbb{R}^n, (ATA)−1(A^{\mathsf T}A)^{-1} again Rn\mathbb{R}^n Final adjustments to the interior.

Just changing the order won’t work. A(ATA)−1ATA(A^{\mathsf T}A)^{-1}A^{\mathsf T} is m×mm\times m The matrix of is impossible to be InI_n, the size is wrong first; more essentially, AA The column space is just Rm\mathbb{R}^m in nn dimensional subspace, AA put the whole Rn\mathbb{R}^n are all pressed into this subspace, and when we ride back, we can only Rm\mathbb{R}^m When projected into column space, there is no way to recover the components falling outside the subspace. This matrix has a name:

P=A(ATA)−1AT.P=A(A^{\mathsf T}A)^{-1}A^{\mathsf T}.

It acts on vectors in column space and changes nothing - if y=Ax\boldsymbol{y}=A\boldsymbol{x}, then Py=A(ATA)−1ATAx=Ax=yP\boldsymbol{y}=A(A^{\mathsf T}A)^{-1}A^{\mathsf T}A\boldsymbol{x}=A\boldsymbol{x}=\boldsymbol{y}; Acts on the vector in the left null space and wipes it to zero - if ATz=0A^{\mathsf T}\boldsymbol{z}=\boldsymbol{0}, then Pz=A(ATA)−10=0P\boldsymbol{z}=A(A^{\mathsf T}A)^{-1}\boldsymbol{0}=\boldsymbol{0}. It is identical in the column space and zero in the left null space. This is exactly the answer to the column space. projection (projection). It “wanted” to be the identity matrix, but unfortunately AA just gave it nn Wei’s room for action. A useful observation by the way: PP The rank is equal to nn, its null space is exactly AA The left null space of: Pz=0P\boldsymbol{z}=\boldsymbol{0} with ATz=0A^{\mathsf T}\boldsymbol{z}=\boldsymbol{0} are mutually sufficient and necessary conditions. Projection handle Rm\mathbb{R}^m The vector in is pressed to nn In the dimensional space, the suppressed part is the left null space.

The left inverse is generally not unique; (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T} It’s just the most common and neatest among them. Also note that the status of the two “good matrices” in this situation is not equal: ATAA^{\mathsf T}A is n×nn\times n and reversible, AATAA^{\mathsf T} But it is m×mm\times m, rank only n<mn<m, still strange. Which one is reversible, just look rr is equal to nn Still equal to mm.

Video 00:09:51: Classroom blackboard writing

Video 00:09:51|Approximately corresponding to section 2 “2. Left inverse: full rank”.

3. Right reverse: full rank

By reversing the roles of rows and columns, Scenario 3 leads to completely parallel conclusions. This time the invertible “good matrix” is AATAA^{\mathsf T}: it is m×mm\times m is a symmetric matrix with full row rank to ensure that it is invertible. The reason is the same as in the previous section. Just put AA Replace with ATA^{\mathsf T}. Take the inverse and multiply it ATA^{\mathsf T}, get

Aright−1=AT(AAT)−1,A^{-1}_{\mathrm{right}}=A^{\mathsf T}(AA^{\mathsf T})^{-1},

This is n×mn\times m matrix. Verify:

A AT(AAT)−1=Im,A\,A^{\mathsf T}(AA^{\mathsf T})^{-1}=I_m,

This time the identity matrix is m×mm\times m, exactly symmetrical to the left inverse case.

Changing the order also only results in projection. Put the right side reverse to the left side,

AT(AAT)−1AA^{\mathsf T}(AA^{\mathsf T})^{-1}A

is n×nn\times n matrix. It is identical in row space: any vector in row space can be written as ATuA^{\mathsf T}\boldsymbol{u}, so

AT(AAT)−1A ATu=AT(AAT)−1(AAT)u=ATu;A^{\mathsf T}(AA^{\mathsf T})^{-1}A\,A^{\mathsf T}\boldsymbol{u} =A^{\mathsf T}(AA^{\mathsf T})^{-1}(AA^{\mathsf T})\boldsymbol{u} =A^{\mathsf T}\boldsymbol{u};

It is zero in the null space: if Ax=0A\boldsymbol{x}=\boldsymbol{0}, then AT(AAT)−1Ax=0A^{\mathsf T}(AA^{\mathsf T})^{-1}A\boldsymbol{x}=\boldsymbol{0}. So it’s a projection into row space. Dually, this n×nn\times n The rank of the projection is mm, the null space is exactly AA of null space. The right inverse is also not unique, AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1} Just the most commonly used one; and the reversible one in this case is AATAA^{\mathsf T}, ATAA^{\mathsf T}A is n×nn\times n, rank only m<nm<n, already strange.

There is one more practical difference between the two cases, and it lies in the solution set. When the columns are of full rank, the solutions are “zero or one”, and when the rows are of full rank, the solutions are “infinitely many” and there is a solution for each right end. The reason lies in the number of free variables: nn in variables rr is the main variable, and the remaining n−rn-r free variable; case 2 n−r=0n-r=0, situation three miles n−r=n−m>0n-r=n-m>0.

The right inverse also has a direct use: it gives a special solution when the rows are of full rank. take

x=AT(AAT)−1b,\boldsymbol{x}=A^{\mathsf T}(AA^{\mathsf T})^{-1}\boldsymbol{b},

Take left on both sides AA, got Ax=AAT(AAT)−1b=bA\boldsymbol{x}=AA^{\mathsf T}(AA^{\mathsf T})^{-1}\boldsymbol{b}=\boldsymbol{b}, indeed satisfies the equation. This special solution is not the entire solution: adding any vector in the null space is still a solution, and the null space has n−mn-m dimension, so there are infinitely many solutions. The left-inverse situation is dual to this: when the column is of full rank Ax=bA\boldsymbol{x}=\boldsymbol{b} There is at most one solution. If the solution exists, use the left inverse action on b\boldsymbol{b} You can figure it out, but not everyone b\boldsymbol{b} There are solutions.

Video 00:12:34: Classroom blackboard writing

Video 00:12:34|Approximately corresponds to section 3 “3. Right reverse: row full rank”.

4. Why does a rectangular matrix not have a two-sided inverse?

Putting the four situations together, a structural fact emerges: As long as n≠mn\neq m, AA There can be no bilateral inversion.

The reason is in the base diagram. AA The null space dimension of is n−rn-r, the left null space dimension is m−rm-r;when n≠mn\neq m When , these two numbers cannot be zero at the same time, that is to say AA with ATA^{\mathsf T} At least one of them has a non-zero null space. The direction in that null space has been completely killed by the matrix, and no candidate inverse can restore it. Bilateral inverses naturally do not exist. In turn, n=mn=m and r=nr=n When both null spaces are {0}\{\boldsymbol{0}\}, AA It is a reversible square matrix.

It is more intuitive to read from the picture: rr The larger the value, the narrower the two zero spaces are. n−rn-r with m−rm-r decrease at the same time. For the inverse to exist, two zero spaces need to shrink to zero at the same time, which is only possible if m=n=rm=n=r only possible; as long as m≠nm\neq n, at most one of them can be squeezed out, and the null space on the other side must be left.

List this set of categories into a table:

situationranknull spaceleft null spaceInverse typeformula
oner=m=nr=m=n{0}\{\boldsymbol{0}\}{0}\{\boldsymbol{0}\}Bilateral inversionA−1A^{-1}
twor=n<mr=n<m{0}\{\boldsymbol{0}\}Dimension m−nm-nLeft reverse(ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T}
threer=m<nr=m<nDimension n−mn-m{0}\{\boldsymbol{0}\}right inverseAT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1}
Fourr<mr<m and r<nr<nDimension n−rn-rDimension m−rm-rNeitherA+A^{+}

The null space in the second row of the table is {0}\{\boldsymbol{0}\}, the left null space is non-zero, and the third line is just the opposite, so both the left and right inverses can still be defined; in the fourth line, both zero spaces are present, and both sides are blocked, leaving only the pseudo-inverse to be discussed in one section. The fourth line also shows that the pseudoinverse is not a patch: rr Can be compared mm and nn is any value small, the first three cases are just special cases when it happens to disappear in one or two null spaces. In other words, the “type” of the inverse is entirely determined by which null space disappears, whereas the projection matrix always appears in those rows where “the null space on the other side is still there.” This table is also a table lookup tool: given r,m,nr,m,n, you can immediately determine which formula to use and whether the solution set is zero, one or infinite.

Video 00:20:56: Classroom blackboard writing

Video 00:20:56 | Approximately corresponding to Section 4 “4. Why there is no bilateral inverse of a rectangular matrix”.

Official Handout Summary Page 2/3

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

5. Pseudo-inverse: one-to-one correspondence from row space to column space

In case four, both zero spaces are present, and neither the left inverse nor the right inverse exists. But there is one fact that has not been used in the basic diagram: the dimensions of row space and column space are both rr, while AA Send row space into column space. in these two rr between dimensional subspaces, AA is reversible. This statement deserves its own proof.

Set x\boldsymbol{x} with y\boldsymbol{y} are in row space, and Ax=AyA\boldsymbol{x}=A\boldsymbol{y}. transfer item A(x−y)=0A(\boldsymbol{x}-\boldsymbol{y})=\boldsymbol{0}, so x−y\boldsymbol{x}-\boldsymbol{y} Belongs to the null space; and because the row space is a subspace, x−y\boldsymbol{x}-\boldsymbol{y} Also belongs to line space. Row space and null space are orthogonal complements of each other, and the intersection only has zero vectors, so x−y=0\boldsymbol{x}-\boldsymbol{y}=\boldsymbol{0}. different vectors pass through AA Still different after that, AA The restriction is injective on row space.

Both ends of the single shot are rr dimensional space, so it is also surjective: every y\boldsymbol{y} All come from unique vectors in vertical space. Surjection can also be verified directly: y\boldsymbol{y} In column space, it means that there is x\boldsymbol{x} such that Ax=yA\boldsymbol{x}=\boldsymbol{y}; put x\boldsymbol{x} Split into row space part and null space part according to orthogonal complement x=xr+xn\boldsymbol{x}=\boldsymbol{x}_r+\boldsymbol{x}_n, then Ax=AxrA\boldsymbol{x}=A\boldsymbol{x}_r, description y\boldsymbol{y} is a row space vector xr\boldsymbol{x}_r like.

With this bijection, “inverse” can be defined wherever it can be defined. in column space y\boldsymbol{y}, order A+yA^{+}\boldsymbol{y} is the only one in the row space that satisfies Ax=yA\boldsymbol{x}=\boldsymbol{y} of x\boldsymbol{x};For the left null space y\boldsymbol{y}, it is not in the column space at all, and there is no original image to be found, so let A+y=0A^{+}\boldsymbol{y}=\boldsymbol{0}. A general vector is decomposed according to the orthogonal complement of “column space component + left null space component” and then acts block by block; zeroing the left null space is not an arbitrary agreement, but is forced out: A+A^{+} The value must fall in the row space, and the left null space and the column space are orthogonal complements of each other, and there is no original image in the direction there; if the non-zero y∈N(AT)\boldsymbol{y}\in N(A^{\mathsf T}) Mapping into a non-zero vector, AxA\boldsymbol{x} still can only fall in the column space, not zero y\boldsymbol{y} Orthogonal to the column space, Ax=yA\boldsymbol{x}=\boldsymbol{y} Impossible. Got it this way A+A^{+} is n×mn\times m matrix, and Any matrix has a pseudoinverse, including those matrices that have neither left nor right inverse.

AA with A+A^{+} Each is powerless against a piece of null space, and each erases another piece of null space, so the effects of the two composite mappings are completely determined:

A+A=到行空间的投影,AA+=到列空间的投影.A^{+}A=\text{到行空间的投影},\qquad AA^{+}=\text{到列空间的投影}.

The former is identical in the row space and zero in the null space, while the latter is identical in the column space and zero in the left null space. It’s clearer to write this as a function of arbitrary vectors: Rn\mathbb{R}^n Take any of the x\boldsymbol{x}, divided into x=xr+xn\boldsymbol{x}=\boldsymbol{x}_r+\boldsymbol{x}_n, then Ax=AxrA\boldsymbol{x}=A\boldsymbol{x}_r, so

A+Ax=xr.A^{+}A\boldsymbol{x}=\boldsymbol{x}_r .

compound mapping A+AA^{+}A put x\boldsymbol{x} Leave the “alive” line space component in AA Throw away the half you kill, which is the very definition of projection. A pseudo-inverse cannot become a real inverse; the best it can do is to send the vector back to the two “good” subspaces of row space and column space, and smooth out the two zero spaces respectively. This also explains why the inverse product of the left inverse and the right inverse in Sections 2 and 3 is a projection: the null space disappears when the column is full rank, A+AA^{+}A degenerate into n×nn\times n The identity matrix of , leaving only AA+AA^{+} is a non-trivial column-space projection; the reverse is true for rows of full rank.

Video 00:27:13: Classroom blackboard writing

Video 00:27:13 | Approximately corresponding to Section 5 “5. Pseudo-inverse: One-to-one correspondence from row space to column space”.

6. Why pseudo-inverse is needed: when least squares fails

Statisticians are heavy users of least squares, linear regression (linear regression) is their central tool, and the central equation of least squares

ATAx=ATbA^{\mathsf T}A\boldsymbol{x}=A^{\mathsf T}\boldsymbol{b}

to ATAA^{\mathsf T}A is the coefficient matrix. The premise that this equation has a unique solution is AA Full rank: ATAA^{\mathsf T}A Reversible, left inverse formula (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T} Give the solution directly. But statisticians always worry about this premise: if the same experiment is repeated several times, the measured data columns will be linearly related. AA ’s rank dropped to r<nr<n, ATAA^{\mathsf T}A It becomes a singular matrix, and the inverse sign in the left inverse formula cannot be written.

The mechanism of this failure is very specific: if the two columns of data are proportional - for example, the same set of measurements is recorded twice -AA The rank of is at most n−1n-1, ATAA^{\mathsf T}A The rows of are also linearly related, and the determinant is zero. Once the full rank is broken, ATAA^{\mathsf T}A The inverse of , the left inverse formula, and the uniqueness of the solution to the equation all become invalid. The sum of the redundant directions brought about by repetition is AA The null space of , the dimension n−rn-r Just a measure of how much redundancy there is.

Pseudo-rebellion is prepared for this moment. it’s only in rr Inverse in the dimensional row space, excluding the direction in the null space: no matter how many times the original data is repeated, the only ones that are truly independent are rr This direction, the pseudo-reverse is only here rr Make a fuss in one direction, and repeated records will not make it move in the direction it should not move. When the rank is full r=nr=n, the null space disappears, and the pseudo-inverse degenerates into the left inverse, so this is a generalization rather than the establishment of another set of theories.

Video 00:33:30: Classroom blackboard writing

Video 00:33:30 | Approximately corresponding to Section 6 “6. Why pseudo-inverse is needed: when least squares fails”.

7. Use SVD to calculate pseudoinverse

How to calculate pseudo-reverse? The cleanest way is to start from singular value decomposition. SVD writes any matrix as

A=UΣVT,A=U\Sigma V^{\mathsf T},

Among them UU is m×mm\times m of orthogonal matrix(orthogonal matrix), VV is n×nn\times n the orthogonal matrix, Σ\Sigma is m×nm\times n The “diagonal” matrix: the upper left corner is rr a positive number σ1≥σ2≥⋯≥σr>0\sigma_1\ge\sigma_2\ge\cdots\ge\sigma_r>0, called singular value (singular value), the remaining positions are all zero. These non-zero σi\sigma_i from ATAA^{\mathsf T}A with AATAA^{\mathsf T}——Their square is the non-zero value of these two matrices eigenvalue (eigenvalue). Written in chunked form,

Σ=[Dr000],Dr=diag⁡(σ1,…,σr).\Sigma=\begin{bmatrix}D_r&0\\0&0\end{bmatrix}, \qquad D_r=\operatorname{diag}(\sigma_1,\dots,\sigma_r).

Σ\Sigma It is “ranked as rr of m×nm\times n matrix” simplest sample: only rr non-zero yuan, mm OK, nn Column, rank rr There is no shortage of the same. Its null space is followed by n−rn-r coordinate vectors, the left null space is m−rm-r Two coordinate vectors are spread out - two zero spaces are clearly placed in the zero block, and it is obvious at a glance which directions should be retained and which ones should be discarded. Finding its pseudoinverse requires almost no thought: take the reciprocal of the reciprocal, and keep the rest zero.

Σ+=[Dr−1000],Dr−1=diag⁡(1σ1,…,1σr),\Sigma^{+}=\begin{bmatrix}D_r^{-1}&0\\0&0\end{bmatrix}, \qquad D_r^{-1}=\operatorname{diag}\Bigl(\tfrac{1}{\sigma_1},\dots,\tfrac{1}{\sigma_r}\Bigr),

This is n×mn\times m matrix. The test only needs to look at the product of two: ΣΣ+\Sigma\Sigma^{+} is m×mm\times m diagonal matrix of , before rr A diagonal element is 11, the rest are zero; Σ+Σ\Sigma^{+}\Sigma is n×nn\times n homotype matrix, before rr A diagonal element is 11, the rest are zero. Neither is an identity matrix and the dimensions are different, but they are Rm\mathbb{R}^m with Rn\mathbb{R}^n The projection in is exactly the best result that the pseudoinverse can achieve - it sends the vector back Σ\Sigma two non-zero subspaces of .

real AA The pseudoinverse of is then written as

A+=VΣ+UT.A^{+}=V\Sigma^{+}U^{\mathsf T}.

Each step here can be explained: VTV^{\mathsf T} The inverse of is VV, UU The inverse of is UTU^{\mathsf T}, two orthogonal matrices do not bring any trouble, all the “diseases” are concentrated in the middle Σ\Sigma on, and Σ+\Sigma^{+} Just did the math. Let’s go back and look at the two composites:

AA+=UΣΣ+UT,A+A=VΣ+ΣVT,AA^{+}=U\Sigma\Sigma^{+}U^{\mathsf T}, \qquad A^{+}A=V\Sigma^{+}\Sigma V^{\mathsf T},

They are projections to column space and row space respectively, which are completely consistent with the geometric definition in Section 5.

Σ+\Sigma^{+} The upper right block and lower left block of must be zero, otherwise ΣΣ+\Sigma\Sigma^{+} or Σ+Σ\Sigma^{+}\Sigma There will be a non-zero off-diagonal block, which is no longer an orthogonal projection; as for the lower right corner block (n−r)×(m−r)(n-r)\times(m-r) The zero area of can be filled with any number - it only multiplies to Σ\Sigma The zero row and zero column of , the two products are not affected. But it is useless to fill it in, it will only make the matrix larger; it is customary to take the cleanest pseudo-inverse, set the lower right block to zero, and only retain what must be retained 1/σi1/\sigma_i. The fixed route for finding the pseudo-inverse is: Right AA Do SVD and process the three factors separately - both sides UU, VV Just transpose, the middle Σ\Sigma Just take the reciprocal of the non-zero singular values - and multiply the three factors back. This is the value of SVD: it turns the inversion of a rectangular matrix into the reciprocal of a diagonal matrix. All obstacles are clearly arranged in the zero block. It is clear at a glance when to count down and when to set zero. As a test, r=m=nr=m=n There is no zero block when Σ+\Sigma^{+} That’s it Σ−1\Sigma^{-1}, so A+=VΣ−1UT=A−1A^{+}=V\Sigma^{-1}U^{\mathsf T}=A^{-1}, the pseudo-inverse degenerates into the ordinary inverse; the two rank-deficient cases degenerate into the left inverse and right inverse in Sections 2 and 3 respectively.

Video 00:37:41: Classroom blackboard writing

Video 00:37:41|Approximately corresponding to Section 7 “7. Calculate pseudo-inverse using SVD”.

Official Handout Summary Page 3/3

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

Summary of this lecture

  • The type of inverse is determined by which of the four basic subspaces the null space disappears: r=m=nr=m=n Both disappear, r=n<mr=n<m Only left null space is left, r=m<nr=m<n Only null space left, r<mr<m and r<nr<n Both are there.
  • When the rank is full ATAA^{\mathsf T}A Reversible, the left inverse is (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T};Change it to the right and multiply it to get the projection to the column space P=A(ATA)−1ATP=A(A^{\mathsf T}A)^{-1}A^{\mathsf T}.
  • When the line is full AATAA^{\mathsf T} Reversible, the right inverse is AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1};reverse product AT(AAT)−1AA^{\mathsf T}(AA^{\mathsf T})^{-1}A is the projection into row space.
  • n≠mn\neq m time AA with ATA^{\mathsf T} There is at least one non-zero null space, so a rectangular matrix can never have a two-sided inverse.
  • pseudoinverse A+A^{+} Take the inverse of the bijection from row space to column space and set zero to the vector in the left null space; then A+AA^{+}A is the projection onto row space, AA+AA^{+} is the projection into column space.
  • Proof of one-to-one correspondence: If x,y\boldsymbol{x},\boldsymbol{y} in line space and Ax=AyA\boldsymbol{x}=A\boldsymbol{y}, then x−y\boldsymbol{x}-\boldsymbol{y} At the same time, in null space and row space, it can only be a zero vector.
  • Any matrix has a pseudo-inverse, including matrices with neither left inverse nor right inverse; the pseudo-inverse degenerates into a left inverse when the columns are at full rank, and degenerates into a right inverse when the rows are at full rank.
  • The actual motivation is least squares: ATAA^{\mathsf T}A Reversibility relies on the full rank of the column. Repeated experiments will cause the columns to be linearly correlated and the rank to decrease. At this time, pseudo-inversion takes over from the left inverse.
  • SVD A=UΣVTA=U\Sigma V^{\mathsf T} Attribute the problem to Σ\Sigma Above: Σ+\Sigma^{+} Take the reciprocal of non-zero singular values and set the rest to zero, A+=VΣ+UTA^{+}=V\Sigma^{+}U^{\mathsf T}; ΣΣ+\Sigma\Sigma^{+} with Σ+Σ\Sigma^{+}\Sigma All are only rr a 11 diagonal projection.

keywords

EnglishChineseOne sentence explanation
left inverseLeft reverseTake it from the left AA Get the matrix of the identity matrix, which is in the form (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T}
right inverseright inverseTake it from the right AA Get the matrix of the identity matrix, which is in the form AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1}
two-sided inverseBilateral inversionBoth left and right multiplications yield the usual inverse of the identity matrix, which only exists when the square matrix is of full rank.
pseudoinversepseudoinverseGeneralized inverse that takes the inverse between row space and column space and zeroes the left null space A+A^{+}
full column rankFull rankr=nr=n, each column is linearly independent, and the null space only has zero vectors
full row rankFull of rankr=mr=m, each row is linearly independent, and the left null space has only zero vectors
projectionprojectionA matrix that is equal to identity in a certain subspace and equal to zero in its orthogonal complement
singular value decompositionsingular value decompositionWrite any matrix as A=UΣVTA=U\Sigma V^{\mathsf T}, middle Σ\Sigma Only in the upper left corner rr non-zero diagonal elements
singular valuesingular valueΣ\Sigma Upper left non-zero diagonal element σi\sigma_i, its square is ATAA^{\mathsf T}A non-zero eigenvalues of
orthogonal matrixorthogonal matrixTranspose or inverse square matrix, UTU=IU^{\mathsf T}U=I
least squaresleast squaresto ATAA^{\mathsf T}A is a fitting method for the coefficient matrix. The solution is unique when the columns are full rank.
linear regressionlinear regressionIn statistics, the center tool of least squares is used repeatedly, and it is easy to encounter column correlation.

← Lecture 32 | Course Catalog | Lecture 34 →

Machine-assisted translation · Read Chinese original