[ https://issues.apache.org/jira/browse/MATH1094?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=13882277#comment13882277
]
Luc Maisonobe commented on MATH1094:

I think the behaviour is correct.
The getSolver method for QR decomposition provides a solver for A X = B in the least squares
sense.
This means the X comuted by the solver is minimizes  A X  B , it does not find 0, only
a minumum norm.
In your case, the system is rectangular, so there is no way a true solution can be achieved.
I have verified (using simple loops and gnuplot countour plots) that indeed the x = 7.5, y
= 5.5 does minimizes the norm, which is 39.0.
> Incorrect linear system solution
> 
>
> Key: MATH1094
> URL: https://issues.apache.org/jira/browse/MATH1094
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.2
> Environment: Oracle JDK7
> Linux x8664
> Reporter: Bogdan Bezpartochnyy
> Labels: patch
> Attachments: Main.java
>
>
> Firstly I would like to point out that I'm not very proficient in linear algebra, but
in my opinion the following behavior should not occur. When I solve the following linear system
by hand it has no solution, but in commons math using QRDecomposition it outputs x1= 7.5
x2 = 5.5

This message was sent by Atlassian JIRA
(v6.1.5#6160)
