Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I would like to compute a partial inverse of a symmetric semi-definite matrix.

I read about computing the pseudoinverse of a rectangular matrix by using SVD, however with a symmetric matrix I could apply a similar technique using instead the eigenvalue decomposition, i.e. compute the eigenvalues, discard the smallest and invert the remaining.

Does this make sense? If so can you point me to a reference that explains how to achieve this in detail?

Any help appreciated.

share|improve this question
if it is a positive definite singular matrix it is called positive semi-definite matrix. –  user13838 Nov 28 '11 at 23:14
thanks, edited the question. –  Andrea Zonca Nov 28 '11 at 23:17
add comment

1 Answer 1

up vote 4 down vote accepted

The idea is that the singular value decomposition,

$$\mathbf A=\mathbf U\mathbf \Sigma\mathbf V^\top$$

and the eigendecomposition

$$\mathbf A=\mathbf Q\mathbf D\mathbf Q^\top$$

of a symmetric matrix are one and the same.

Thus, if one wants the Moore-Penrose pseudoinverse of $\mathbf A$, either decomposition could be used. (However, an SVD routine generally wouldn't exploit the nice structure of a symmetric matrix, so a bit more computational effort than what is actually needed will be used in that case; thus, use the eigendecomposition.)

The idea is that, letting $\mathbf A^\dagger$ be the Moore-Penrose pseudoinverse, we have the property

$$\mathbf A^\dagger=\mathbf Q\mathbf D^\dagger\mathbf Q^\top$$

where $\mathbf D^\dagger$ is (usually) computed via the following procedure: take $d_1$ to be the largest eigenvalue, and let $\varepsilon$ be machine epsilon. Reciprocate any entry of $\mathbf D$ that is greater than $\varepsilon\cdot d_1$, and set all other entries to zero.

share|improve this answer
thanks! do you know of any library that has this already implemented? –  Andrea Zonca Nov 28 '11 at 23:27
LAPACK is the standard library for these. –  J. M. Nov 28 '11 at 23:29
in LAPACK I found only the eigenvalue computation, I wondered if any library had all the pseudoinverse process implemented, it would think this is a quite common situation. –  Andrea Zonca Nov 28 '11 at 23:31
Sure, but the problem is that the canned routines for pseudoinverses would not exploit the fact that your matrix is symmetric. You're fine with wasted effort? (How big are your matrices, anyway?) –  J. M. Nov 28 '11 at 23:38
matrices are tiny, 3x3, but I have few thousands of them. –  Andrea Zonca Nov 28 '11 at 23:41
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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