# Computing the Moore-Penrose pseudoinverse of a $2 \times 2$ matrix

I am facing difficulties in calculating the Moore-Pensore pseudoinverse of a positive semidefinite matrix $A$, where $A$ is self-adjoint and $\langle A u, u \rangle \geq 0$ for all $u \in \mathcal{H}$, where $\mathcal{H}$ is a complex Hilbert space.

For example,

$$A = \begin{bmatrix} 1&-1\\ -1&1\end{bmatrix}$$

is a positive semidefinite matrix. How to calculate the Moore-Penrose pseudoinverse of $A$?

• If the inverse of $(A^{\top}A)$ exists, the Moore-Penrose pseudo-inverse of $A$ is given by: $$A^{+} = (A^{\top}A)^{-1}A^{\top}.$$ Jul 27, 2017 at 9:49
• One way: orthogonally diagonalize, take the reciprocal of the positive eigenvalues.
– Ian
Jul 27, 2017 at 9:52

Computing the singular value decomposition (SVD) of symmetric, rank-$1$ matrix $\rm A$,

$$\mathrm A = \begin{bmatrix} 1 & -1\\ -1 & 1\end{bmatrix} = \begin{bmatrix} 1\\ -1\end{bmatrix} \begin{bmatrix} 1\\ -1\end{bmatrix}^\top = \left( \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ -1 & 1\end{bmatrix} \right) \begin{bmatrix} 2 & 0\\ 0 & 0\end{bmatrix} \left( \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ -1 & 1\end{bmatrix} \right)^\top$$

Hence, the pseudoinverse of $\rm A$ is

$$\mathrm A^+ = \left( \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ -1 & 1\end{bmatrix} \right) \begin{bmatrix} \frac12 & 0\\ 0 & 0\end{bmatrix} \left( \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ -1 & 1\end{bmatrix} \right)^\top = \color{blue}{\frac14 \mathrm A}$$

• Thank you. But unfortunately I don't understand you method. What mens by the SVD of A?Thank you Jul 27, 2017 at 10:03
• I edited my answer. Note that the pseudoinverse of a diagonal matrix is the inverse of the nonzero diagonal entries. Jul 27, 2017 at 10:07

Since $A$ is selfadjoint we have

$A^{+}= \lim_{t \to 0}(A^2+tE)^{-1} A$.

In the case of $A=\left(\begin{array}{cc}1&-1\\-1&1\end{array}\right)$ an easy coputation gives $A^{+}= \frac{1}{4} A$.

• Thank you but I don't understand what is $E$? For $3\times3$- matrix this method remains true?Thank you Jul 27, 2017 at 9:56
• The formula $A^{+}= \lim_{t \to 0}(A^2+tE)^{-1} A$ is valid for each selfadjoint $A \in \mathbb C^{n \times n}$. $E$ denotes the identity - matrix.
– Fred
Jul 27, 2017 at 10:00

Given a rank-one matrix of any dimension \eqalign{ &A = xy^H \quad\;{\rm where}\; &x\in{\mathbb C}^{m\times 1},\;y\in{\mathbb C}^{n\times 1} } there is a closed-form expression for its Moore-Penrose inverse $$A^+ = \frac{yx^H}{(x^Hx)(y^Hy)}$$ $$A$$ is obviously a rank-one matrix, therefore \eqalign{ x &= y= z= \left(\begin{array}{rr}1\\-1\end{array}\right), \quad z^Hz = 2 \\ A^+ &= \frac{zz^H}{(2)(2)} = \frac{A}{4} \\ }