Unit 7, lesson 33

The Moore-Penrose Conditions

How four matrix equations, the Moore-Penrose conditions, characterize the pseudoinverse, why Hermitian idempotents make it unique, and how it compares with weaker generalized inverses of singular matrices.

  • Video 33
  • The Decomposition and the Pseudoinverse

An invertible matrix AA has exactly one inverse, the matrix XX with AX=IAX = I and XA=IXA = I. A singular or rectangular matrix has no such XX, and the pseudoinverse of the previous lesson was built from a choice of singular value decomposition. Can it be recognized without making that choice? Four matrix equations do it, and this lesson checks that the pseudoinverse satisfies them, proves that no other matrix does, and compares weaker generalized inverses that satisfy only some of them. Throughout, F\mathbb{F} is R\mathbb{R} or C\mathbb{C}, norms and orthogonality come from the standard inner product, and a tuple stands for a column vector.

Key terms

Moore-Penrose conditions

Definition Let A∈Fm×nA \in \mathbb{F}^{m \times n} and X∈Fn×mX \in \mathbb{F}^{n \times m}. The Moore-Penrose conditions on XX are

(1)AXA=A,(2)XAX=X,(3)(AX)∗=AX,(4)(XA)∗=XA.\begin{aligned} &\text{(1)} \quad AXA = A, \\[0.4em] &\text{(2)} \quad XAX = X, \\[0.4em] &\text{(3)} \quad (AX)^{*} = AX, \\[0.4em] &\text{(4)} \quad (XA)^{*} = XA. \end{aligned}

The first two are reconstruction identities. The last two say that the m×mm \times m matrix AXAX and the n×nn \times n matrix XAXA are Hermitian, which over R\mathbb{R} means symmetric. The pseudoinverse A+=VΣ+U∗A^{+} = V\Sigma^{+}U^{*} satisfies all four, for every shape and every rank, including A=0A = 0. In singular coordinates ΣΣ+Σ=Σ\Sigma\Sigma^{+}\Sigma = \Sigma and Σ+ΣΣ+=Σ+\Sigma^{+}\Sigma\Sigma^{+} = \Sigma^{+} hold entry by entry, since σ⋅σ−1⋅σ=σ\sigma \cdot \sigma^{-1} \cdot \sigma = \sigma for each positive σ\sigma and every other entry is zero. The products ΣΣ+\Sigma\Sigma^{+} and Σ+Σ\Sigma^{+}\Sigma are real diagonal, with rr ones followed by zeros, so they are Hermitian. Multiplying by the unitary factors keeps each identity, for instance

AA+A=UΣV∗ VΣ+U∗ UΣV∗=UΣΣ+ΣV∗=A,\begin{aligned} AA^{+}A &= U\Sigma V^{*}\,V\Sigma^{+}U^{*}\,U\Sigma V^{*} \\[0.4em] &= U\Sigma\Sigma^{+}\Sigma V^{*} = A, \end{aligned}

and (AA+)∗=(UΣΣ+U∗)∗=UΣΣ+U∗(AA^{+})^{*} = (U\Sigma\Sigma^{+}U^{*})^{*} = U\Sigma\Sigma^{+}U^{*}. If AA is square and invertible, X=A−1X = A^{-1} satisfies all four.

In plain words The conditions ask XX to behave like an inverse as far as the matrix allows. Going through AA, then XX, then AA reproduces AA, going through XX, then AA, then XX reproduces XX, and the round trips AXAX and XAXA must be self-adjoint, which makes them perpendicular projections rather than slanted ones.

Example Let AA be the 1×21 \times 2 matrix with entries 11 and 11, and let X=(1/2,1/2)X = (1/2, 1/2), a 2×12 \times 1 column. Then AXAX is the 1×11 \times 1 matrix 11 and

XA=12[1111],XA = \frac{1}{2}\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix},

both symmetric. Also AXA=1⋅A=AAXA = 1 \cdot A = A and XAX=X⋅1=XXAX = X \cdot 1 = X. So XX satisfies all four conditions, and by the uniqueness theorem below it is A+A^{+}.

Hermitian idempotent

Definition A square matrix P∈Fk×kP \in \mathbb{F}^{k \times k} is idempotent if P2=PP^2 = P and Hermitian if P∗=PP^{*} = P. A Hermitian idempotent matrix is an orthogonal projector. Every xx splits as x=Px+(x−Px)x = Px + (x - Px) with Px∈im⁡PPx \in \operatorname{im} P, and x−Px∈ker⁡Px - Px \in \ker P by idempotence. Hermitian symmetry makes the two pieces orthogonal, since for all x,yx, y

⟨Px,y−Py⟩=⟨x,Py−P2y⟩=0.\langle Px, y - Py \rangle = \langle x, Py - P^2y \rangle = 0.

Hence ker⁡P=(im⁡P)⊥\ker P = (\operatorname{im} P)^{\perp}, and PxPx is the point of im⁡P\operatorname{im} P closest to xx. Conversely, the orthogonal projector onto any subspace is Hermitian and idempotent. Such a projector is determined by its image alone, because it fixes the image and sends the orthogonal complement to zero. For the Moore-Penrose conditions this gives two facts. If XX satisfies (1) and (3), then P=AXP = AX is Hermitian by (3) and idempotent since P2=(AXA)X=PP^2 = (AXA)X = P. Every PbPb lies in im⁡A\operatorname{im} A, and every AvAv equals AXAv=P(Av)AXAv = P(Av), so PP is the orthogonal projector onto im⁡A\operatorname{im} A. If XX satisfies (1) and (4), then Q=XAQ = XA is Hermitian by (4) and idempotent since Q2=X(AXA)=QQ^2 = X(AXA) = Q. Its kernel is ker⁡A\ker A, so it is the orthogonal projector onto (ker⁡A)⊥(\ker A)^{\perp}. To see the kernels agree, note that Qv=0Qv = 0 exactly when Av=0Av = 0. Indeed Av=0Av = 0 gives Qv=XAv=0Qv = XAv = 0, and Qv=0Qv = 0 gives Av=AXAv=AQv=0Av = AXAv = AQv = 0.

In plain words Idempotent means that applying the matrix a second time changes nothing, so it is a projection of some kind. Hermitian means the projection drops each vector perpendicularly onto the image instead of along a slanted direction.

Example The matrix PP with rows (1,1)(1, 1) and (0,0)(0, 0) satisfies P2=PP^2 = P. Its image is the line spanned by e1e_1 and its kernel is spanned by (1,−1)(1, -1), which is not perpendicular to that line, and PP is not symmetric. For x=(0,1)x = (0, 1) it gives Px=(1,0)Px = (1, 0), at distance 2\sqrt{2} from xx. The orthogonal projector diag⁡(1,0)\operatorname{diag}(1, 0) onto the same line gives (0,0)(0, 0), at distance 11. Both matrices are idempotent with the same image, and only the Hermitian one is the orthogonal projector.

Uniqueness of the pseudoinverse

Definition The theorem says that for every A∈Fm×nA \in \mathbb{F}^{m \times n} exactly one X∈Fn×mX \in \mathbb{F}^{n \times m} satisfies all four Moore-Penrose conditions, namely X=A+X = A^{+}. In particular A+A^{+} does not depend on the singular value decomposition used to build it. Existence was checked above. For uniqueness, let XX satisfy all four. By the facts about Hermitian idempotents, AX=PAX = P is the orthogonal projector onto im⁡A\operatorname{im} A and XA=QXA = Q is the orthogonal projector onto (ker⁡A)⊥(\ker A)^{\perp}, and neither depends on XX. Condition (2) gives X=XAX=QXX = XAX = QX, so every XbXb lies in (ker⁡A)⊥(\ker A)^{\perp}. Also A(Xb)=PbA(Xb) = Pb. The restriction of AA to (ker⁡A)⊥(\ker A)^{\perp} is injective, because a vector in both ker⁡A\ker A and (ker⁡A)⊥(\ker A)^{\perp} is orthogonal to itself and so is zero. It maps onto im⁡A\operatorname{im} A, because Av=A(Qv)Av = A(Qv) for every vv, as v−Qv∈ker⁡Av - Qv \in \ker A. So PbPb has exactly one preimage in (ker⁡A)⊥(\ker A)^{\perp}, and XbXb has to be that preimage. Any two matrices satisfying the four conditions therefore agree on every bb and are equal, and A+A^{+} is one of them.

In plain words The four conditions leave no freedom. Conditions (1) and (3) fix the output that AXAX aims at, the orthogonal projection of the target onto the column space. Conditions (2) and (4) force the answer to lie in the row space, where each reachable output has exactly one input.

Example Without condition (2) uniqueness can fail. Let A=diag⁡(1,0)A = \operatorname{diag}(1, 0) and X=diag⁡(1,t)X = \operatorname{diag}(1, t) with t≠0t \ne 0. Then AX=XA=diag⁡(1,0)AX = XA = \operatorname{diag}(1, 0), so conditions (1), (3) and (4) hold. But XAX=diag⁡(1,0)≠XXAX = \operatorname{diag}(1, 0) \ne X. The entry tt sends e2e_2 to te2te_2, a component in ker⁡A\ker A. Since XAXA is the orthogonal projector onto (ker⁡A)⊥(\ker A)^{\perp}, condition (2) in the form X=(XA)XX = (XA)X is exactly what rules this out. All four conditions together leave only X=diag⁡(1,0)X = \operatorname{diag}(1, 0).

Pseudoinverse of a singular matrix

Definition Let A∈Fn×nA \in \mathbb{F}^{n \times n} be singular, of rank r<nr < n. It has no inverse, but its pseudoinverse A+∈Fn×nA^{+} \in \mathbb{F}^{n \times n} exists and is the unique matrix satisfying the four conditions. The products AA+AA^{+} and A+AA^{+}A are orthogonal projectors of rank rr, onto im⁡A\operatorname{im} A and onto im⁡A∗\operatorname{im} A^{*}, so neither is InI_n. They are equal exactly when im⁡A=im⁡A∗\operatorname{im} A = \operatorname{im} A^{*}, which holds for normal matrices, since then ker⁡A=ker⁡A∗\ker A = \ker A^{*}. For a normal matrix the spectral theorem over C\mathbb{C} gives A=QΛQ∗A = Q\Lambda Q^{*} with Q∈Cn×nQ \in \mathbb{C}^{n \times n} unitary and Λ\Lambda diagonal, even when AA is real, and then

A+=QΛ+Q∗,A^{+} = Q\Lambda^{+}Q^{*},

where Λ+\Lambda^{+} reciprocates the nonzero diagonal entries and keeps the zeros, because the four conditions hold for Λ\Lambda and Λ+\Lambda^{+} entry by entry, conjugation by the unitary QQ keeps them, and only A+A^{+} satisfies all four. In particular, the pseudoinverse of a diagonal matrix reciprocates its nonzero entries, signs included.

In plain words A singular matrix flattens some directions. Its pseudoinverse inverts what is left and sends the output directions perpendicular to the image to zero, and for a matrix that is not normal, the directions ignored on the output side need not match the directions lost on the input side.

Example The matrix NN with rows (0,1)(0, 1) and (0,0)(0, 0) satisfies N2=0N^2 = 0, and N=e1e2TN = e_1e_2^{\mathsf{T}} is a compact SVD with σ1=1\sigma_1 = 1, u1=e1u_1 = e_1 and v1=e2v_1 = e_2. So

N+=e2e1T=[0010]=NT.N^{+} = e_2e_1^{\mathsf{T}} = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} = N^{\mathsf{T}}.

Then NN+=diag⁡(1,0)NN^{+} = \operatorname{diag}(1, 0) projects onto im⁡N=span⁡(e1)\operatorname{im} N = \operatorname{span}(e_1), while N+N=diag⁡(0,1)N^{+}N = \operatorname{diag}(0, 1) projects onto im⁡NT=span⁡(e2)\operatorname{im} N^{\mathsf{T}} = \operatorname{span}(e_2), and the two projectors differ. For the symmetric 2×22 \times 2 matrix with every entry 11, the spectral decomposition is 2qqT2qq^{\mathsf{T}} with q=(1,1)/2q = (1, 1)/\sqrt{2}, so its pseudoinverse is 12qqT\tfrac{1}{2}qq^{\mathsf{T}}, the matrix with every entry 14\tfrac{1}{4}.

Generalized inverse

Definition Let A∈Fm×nA \in \mathbb{F}^{m \times n}. A matrix X∈Fn×mX \in \mathbb{F}^{n \times m} with AXA=AAXA = A, condition (1) alone, is a generalized inverse of AA, and it is called reflexive if it also satisfies (2). Generalized inverses always exist, since A+A^{+} is one, but they are unique only when AA is square and invertible, and then X=A−1X = A^{-1}. Each one solves every consistent system. If Ax0=bAx_0 = b, then

A(Xb)=AXAx0=Ax0=b.A(Xb) = AXAx_0 = Ax_0 = b.

Adding (3) makes AXAX the orthogonal projector onto im⁡A\operatorname{im} A, so XbXb is a least-squares solution for every bb. Adding (4) makes XAXA the orthogonal projector onto (ker⁡A)⊥(\ker A)^{\perp}, so for consistent bb the vector Xb=XAx0Xb = XAx_0 is the solution of minimum norm. Only all four conditions together give the minimum-norm least-squares solution A+bA^{+}b for every bb.

In plain words A generalized inverse only has to undo AA well enough to rebuild AA. That is enough to solve systems that have solutions, but without the Hermitian conditions it can fit an inconsistent target badly or pick a needlessly long solution.

Example Over R\mathbb{R}, let AA be the 1×21 \times 2 matrix with entries 11 and 11. A column X=(x1,x2)X = (x_1, x_2) satisfies AXA=(x1+x2)AAXA = (x_1 + x_2)A, so the generalized inverses are exactly the columns with x1+x2=1x_1 + x_2 = 1. Each of them also satisfies (2) and (3), because AX=x1+x2=1AX = x_1 + x_2 = 1. Condition (4) asks the matrix XAXA, with rows (x1,x1)(x_1, x_1) and (x2,x2)(x_2, x_2), to be symmetric, which forces x1=x2=12x_1 = x_2 = \tfrac{1}{2}. The choice X=(1,0)X = (1, 0) still solves the consistent system Ax=3Ax = 3, giving (3,0)(3, 0) of norm 33, while A+A^{+} gives (3/2,3/2)(3/2, 3/2), of norm 3/23/\sqrt{2}.

Check yourself

  1. Find the pseudoinverse of A=diag⁡(3,0,−1)A = \operatorname{diag}(3, 0, -1) and check the four conditions.
Show the answer

The matrix is diagonal, so A+A^{+} reciprocates the nonzero entries and keeps the zero,

A+=diag⁡ ⁣(13,0,−1).A^{+} = \operatorname{diag}\!\left(\tfrac{1}{3}, 0, -1\right).

Then AA+=A+A=diag⁡(1,0,1)AA^{+} = A^{+}A = \operatorname{diag}(1, 0, 1), a real diagonal matrix, so conditions (3) and (4) hold. Multiplying diag⁡(1,0,1)\operatorname{diag}(1, 0, 1) by AA gives AA, and multiplying it by A+A^{+} gives A+A^{+}, which are conditions (1) and (2). The sign stays, since the reciprocal of −1-1 is −1-1, and the zero stays zero.

  1. Let A=diag⁡(1,0)A = \operatorname{diag}(1, 0) and let XX have rows (1,0)(1, 0) and (2,0)(2, 0). Which Moore-Penrose conditions hold? What does XX do with b=(1,0)b = (1, 0)?
Show the answer

Multiplying gives AX=diag⁡(1,0)AX = \operatorname{diag}(1, 0), which is symmetric, so (3) holds, and then AXA=diag⁡(1,0) A=AAXA = \operatorname{diag}(1, 0)\,A = A, so (1) holds. The product XAXA equals XX itself, with rows (1,0)(1, 0) and (2,0)(2, 0). It is not symmetric, so (4) fails, but XAX=X2=XXAX = X^2 = X, so (2) holds. So XX is a reflexive generalized inverse with (3) as well, and since A+A^{+} satisfies all four conditions, the failure of (4) shows that XX is not A+=diag⁡(1,0)A^{+} = \operatorname{diag}(1, 0). For b=(1,0)b = (1, 0) the system is consistent and Xb=(1,2)Xb = (1, 2) does solve Ax=bAx = b, but its norm is 5\sqrt{5}, while A+b=(1,0)A^{+}b = (1, 0) has norm 11. The extra entry 22 is a component in ker⁡A=span⁡(e2)\ker A = \operatorname{span}(e_2), which condition (4) would have removed.

  1. Let A∈Fm×nA \in \mathbb{F}^{m \times n} have full column rank. Show that (A∗A)−1A∗(A^{*}A)^{-1}A^{*} satisfies the four conditions, and use it to find A+A^{+} for the matrix with rows (1,0)(1, 0), (0,1)(0, 1) and (1,1)(1, 1). Where is full column rank needed?
Show the answer

Full column rank means ker⁡A={0}\ker A = \{0\}, and since ker⁡(A∗A)=ker⁡A\ker(A^{*}A) = \ker A, the Hermitian n×nn \times n matrix A∗AA^{*}A is invertible. Its inverse is Hermitian too. Put X=(A∗A)−1A∗X = (A^{*}A)^{-1}A^{*}. Then XA=InXA = I_n, which gives (4), and then AXA=AAXA = A and XAX=XXAX = X, which give (1) and (2). Finally

(AX)∗=A((A∗A)−1)∗A∗=AX,(AX)^{*} = A\big((A^{*}A)^{-1}\big)^{*}A^{*} = AX,

which is (3). By uniqueness X=A+X = A^{+}. For the example,

ATA=[2112],(ATA)−1=13[2−1−12],A+=13[2−11−121].\begin{gathered} A^{\mathsf{T}}A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}, \\[0.4em] (A^{\mathsf{T}}A)^{-1} = \frac{1}{3}\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}, \\[0.4em] A^{+} = \frac{1}{3}\begin{bmatrix} 2 & -1 & 1 \\ -1 & 2 & 1 \end{bmatrix}. \end{gathered}

Here A+A=I2A^{+}A = I_2, while AA+AA^{+} is a 3×33 \times 3 projector of rank 22. Full column rank is needed for the inverse (A∗A)−1(A^{*}A)^{-1} to exist. For A=diag⁡(1,0)A = \operatorname{diag}(1, 0), for instance, ATA=diag⁡(1,0)A^{\mathsf{T}}A = \operatorname{diag}(1, 0) is singular and the formula has no meaning, although A+A^{+} still exists.

How this lesson connects