3
$\begingroup$

Is there a "simple" formula for computing the Moore-Penrose pseudoinverse of a $3\times 3$ matrix? I mean something like the formula for the inverse (for non-singular matrices), which involves the matrix of minors, etc.

I need that for a computer program, and I feel that using LAPACK's SVD is a bit of an overkill.

$\endgroup$
1
$\begingroup$

You are probably thinking of the formula $$ \begin{align} \mathbf{A}^{-1} &= \frac{\text{adj } \mathbf{A}} {\det \mathbf{A} } \\ &= \frac{\left( \text{cof } \mathbf{A}\right)^{\mathrm{T}}} {\det \mathbf{A} } \\ \end{align} $$ The matrix $\text{adj } \mathbf{A}$ is the adjugate of $\mathbf{A}$ and is the transpose of $\mathbf{C}$, the matrix of cofactors of $\mathbf{A}$.

For a nonsingular $\mathbf{A}\in\mathbb{R}^{3 x 3}$, $$ \mathbf{A} = \left[ \begin{array}{ccc} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{array} \right], $$ the matrix of cofactors is composed of the determinants $$ \mathbf{C} = \left[ \begin{array}{ccc} % + \left| \begin{array}{cc} a_{22} & a_{23} \\ a_{32} & a_{33} \end{array} \right| & - \left| \begin{array}{cc} a_{21} & a_{23} \\ a_{31} & a_{33} \end{array} \right| & + \left| \begin{array}{cc} a_{21} & a_{22} \\ a_{31} & a_{32} \end{array} \right| \\ % - \left| \begin{array}{cc} a_{12} & a_{13} \\ a_{32} & a_{33} \end{array} \right| & + \left| \begin{array}{cc} a_{11} & a_{13} \\ a_{31} & a_{33} \end{array} \right| & - \left| \begin{array}{cc} a_{11} & a_{12} \\ a_{31} & a_{32} \end{array} \right| \\ % + \left| \begin{array}{cc} a_{12} & a_{13} \\ a_{22} & a_{23} \end{array} \right| & - \left| \begin{array}{cc} a_{11} & a_{13} \\ a_{21} & a_{23} \end{array} \right| & + \left| \begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right| \\ \end{array} \right]. $$

Because you specified that $\mathbf{A}$ is nonsingular, the matrix inverse exists and is the same as the Moore-Penrose pseudoinverse: $$ \mathbf{A}^{-1} = \mathbf{A}^{\dagger}. $$

Example Pencil and paper exercise of confirmation: $$ \mathbf{A} = \left[ \begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 0 \end{array} \right], $$ The determinant is $\det \mathbf{A} = 1$, and the matrix of cofactors is $$ \mathbf{C} = \left[ \begin{array}{rrr} 0 & 1 & -1 \\ 0 & -1 & 0 \\ -1 & -1 & 1 \end{array} \right] $$ The inverse matrix is $$ \mathbf{A}^{-1} = \frac{\left( \text{cof } \mathbf{A}\right)^{\mathrm{T}}} {\det \mathbf{A} } = \frac{\mathbf{C}^\mathrm{T}} {-1} = \left[ \begin{array}{rrr} 0 & 0 & 1 \\ -1 & \phantom{-}1 & 1 \\ 1 & 0 & -1 \end{array} \right]. $$

$\endgroup$
  • 1
    $\begingroup$ Thank you, but what I mean is that I already know that formula for non-singular matrices, and I'm looking for an "equivalent" formula for all matrices (including singular matrices, so I don't have to find out in advance whether or not the matrix is singular). $\endgroup$ – Jellby Mar 4 '17 at 9:24
  • $\begingroup$ If the problem is 'take a generic matrix and test for singularity,' the best choice is to compute the singular value spectrum. If you have $\sigma_{k}=0$, then your matrix is singular and of rank $k-1$. In practise though you will have to look at small singular values with magnitude close to machine noise and decide if they are real or arithmetic errors. The pseudoinverse has iterative prescriptions, and the direct construction $\mathbf{A}^{\dagger} = \mathbf{V}\Sigma^{\dagger}\mathbf{U}^{*}$ from the SVD. $\endgroup$ – dantopa Mar 6 '17 at 0:51
  • $\begingroup$ @dantopa I hope to find a practive method to compute the moore penrose pseuso inverse of a non invertible matrix. Thanks. $\endgroup$ – Student Feb 14 at 20:02
  • $\begingroup$ @Student: 1. Matrix Analysis and Applied Linear Algebra, Sec 5.12 The Singular Value Decomposition 2. Regression and the Moore-Penrose Pseudoinverse 3. Numerical Matrix Analysis Sec 5.1 Solutions of the Least Squares Problem $\endgroup$ – dantopa Feb 21 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.