I have a numerical high-precision badly conditioned over-constrained set of linear equations that I want to solve.
I start out with m=616 equations and n=585 unknowns for an equation of the form a.x = b. Since I would like to find any (approximate) solution and I expect the numerical errors to be small, I would like to truncate the number of equations to the number of unknowns so that there should be exactly one solution left.
However, even before doing that we run into trouble: MatrixRank[a] returns 533 while MatrixRank[a, Tolerance -> 0] returns 585, indicating a possible problem. Similarly NullSpace[a] returns something of dimensions {52,585} again indicating the redundancy of 52 equations. (Also indicating a problem LinearAlgebra`Private`MatrixConditionNumber[a] returns Infinity.)
Is there anyway to get anything out of these equations?
The offending problem,
a = CloudGet[ CloudObject[ "https://www.wolframcloud.com/obj/f1c43c0b-e6ec-4a43-82a0-8940c84dbb1b"]]; b = CloudGet[ CloudObject[ "https://www.wolframcloud.com/obj/09ed9ec9-25e6-417e-80fb-082d363c194d"]]; LinearSolve[a, b] produces the warnings: Result for RowReduce of badly conditioned matrix {...} may contain significant numerical errors and Linear equation encountered that has no solution.
I tried the procedure described in Solving a linear system with a badly conditioned matrix but when solving for y I run into the error "Linear equation encountered that has no solution."
LeastSquares[a, b]? $\endgroup$LeastSquaresthat allows positive definiteness constraints (on 2x2 matrices consisting of the x[i]).SemidefiniteOptimizationonly accepts a linearfwhich is why I thought I should be solving a truncated set of equations exactly rather than minimizing an error. Minimizing the error will involve squaring the terms in the objective. Can such a LeastSquares problem with these types of constraints still be solved in Mathematica. $\endgroup$