If $A^{-1}$ has been precomputed (or to be more precise: the Cholesky decomposition of A has been precomputed and cached), is there an efficient way to compute either $$C = (A+λI)^{-1}$$ or (more valuably)
the Cholesky Decomposition of: $$(A+λI)$$
A few other (possibly unhelpful/unecessary) notes:
- A is a square matrix that was constructed by doing this: $B^TB$, where B was some dense, non-square matrix of typically around 30 rows by 20 columns.
- Although A is small (eg 20 by 20), I have ~100 different A matrixes and ~$10^7$ different λ. So, precomputing 100 $A^{-1}$ (or its Cholesky decomposition) takes very little time; but having to compute the inverse of $10^7$ different $(A+λI)$ can take time, unless there's a clever way of taking advatange of the fact that $A^{-1}$ has been precomputed, and we're only adding a scaled version of the Identity matrix....
- I have already reviewed Inverse of the sum of matrices but no one seemed to have answered the question/comment by Royi, which I'm guessing was asked for the same reason I'm asking this question above.
- Ultimately, I will use the Cholesky decomposition of $(A+λI)$ to solve a linear equation, eg find $x$ in: $Cx = y$, where $C = (A+λI)$ and $y$ is known.
I am not sure how tied you are to the Cholesky factorization, but the following alternative approach may suit your needs. Observe that since $A = B^TB$, it is symmetric and hence orthogonally diagonalizable, i.e., $A = QDQ^T$, where $Q$ is an orthogonal matrix and $D$ is the diagonal matrix of the real eigenvalues of $A$. Now use the fact that $A + \lambda I = Q(D+\lambda I)Q^T$, which implies that $(A+\lambda I)^{-1} = Q(D + \lambda I)^{-1} Q^T$. Therefore, if you precompute $Q$ and $D$ for each $A$, then you can compute $(A+\lambda I)^{-1}$ efficiently for each $\lambda$ via a few matrix vector products. Since your matrices $A$ are quite small and there are only $\approx 100$ of them, it should be relatively cheap to compute and store these factors.
If you have access to the $B$ matrices, then it may be preferable to compute the singular value decomposition $B = U\Sigma V^T$, and then form the eigendecomposition of $A$ by $$ A = B^TB = V(\Sigma^T\Sigma)V^T. $$ Note that you only need the singular values and the right singular vectors.