Seeking Feedback on Robust Solution for Consistent but ill-conditioned Linear System with Real Symmetric Positive Semidefinite Matrices

Hello everyone,

I’m currently grappling with a challenging problem involving a linear system that’s consistent but ill-conditioned due to the nature of the matrices involved. I’ve devised a potential solution, but I’m seeking feedback and alternative approaches from the community to ensure robustness and efficiency.

Problem Overview:
I’m dealing with a linear system represented as ( M*A = B ), where matrices ( A ) and ( B ) are both real symmetric positive semi-definite, and the condition number of B guaranteed to be no less than that of A.
(The nullspace of A and B should match in theory but not sure if the round-off error will be introduced since the linear system is just a small step within a set of complicate odes.)

Proposed Approach:
To address the ill-conditioning while preserving consistency, I’ve devised the following approach:

M = nullspace(B) |> x -> (cholesky(Symmetric(A + x*x'))/B)'

Thank you!

Let’s denote v as the nullvector of B: B*v = 0;
Then, (A+v*v')^{-1} = ((A+v*v')^{-1}*A)*A^{-1} = A^{-1} - (A+v*v')^{-1}*(v*v')*A^{-1}
where v*v’ constructs the nullspace of B which can’t traverse to the leftmost unless it commutes with A.