Skip to content

Ax = B wrong solution when A contains a row of zeros #822

Answered by cdrnet
eladr07 asked this question in Q&A
Discussion options

You must be logged in to vote

Solve is supposed to return the solution which minimizes the squared errors i.e. |Ax - b|. The returned vector looks ok to me. Is there another solution with a lower least-squares error?

Note that the error is not necessarily zero. In your particular problem there exists no solution with zero error, since there is no solution for the equation 0 * t = -147339.22693314467 corresponding to the first row of your 6x4 matrix and the first element of your 6-vector.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cdrnet
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #638 on July 24, 2021 07:35.