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$$?