# updating the matrix Adjugate/Cofactor

I would like to calculate the Adjugate matrix of a given matrix $$A$$, and its updates in the diagonal: $$B=A-\lambda I$$, where $$I$$ is the identity matrix, $$\lambda$$ is a scalar. To this end, I am using the algorithm explained here, using a decomposition $$A=XDY$$. Unfortunately, the matrix $$A$$ or $$B$$ could be singular.

Is it possible to obtain a suitable decomposition such, that for the decomposition of $$B$$ I could save computer time by reusing $$X$$, $$D$$, or $$Y$$ from the decomposition of $$A$$?

• One attempt that I have made is that I perform SVD on A'=A+I in order to remove the null-space, and decompose it as A'=X'D'Y'. Then I calculate D"=abs(D'-I) as my matrices are positive semi-definite, symmetric and real. Numerical tests in python are provided spot-on results for the adjugate using X', D" (or D"-lambda*I), and Y' but I would like to see the limits of this approach. Any suggestions? – user2393987 Nov 23 '20 at 15:46