How to know that this system of linear equations is inconsistent(has no solutions) in Octave -


i have system of linear equations matrices inconsistent , has no solutions @ , trying solve using octave in matrix form.

a =[1, -1 , 2;1 , 0 , 1;2 , -3 , 5;3 , 2 , -1] b =[4;6;4;1]

when process a\b

it gives me

ans =[-5.3182;14.2273;11.5000]

but example known inconsistent why gives me answer

interesting question. you're no doubt aware, firstly you're trying solve 4 equations in 3 independent variables. possible when 4th equation can deduced first 3. secondly square part of system - first 3 equations (rows) degenerate, 0 determinant - try

det(a(1:3,:)) 

so what's numerical solver doing in case? i'm pretty sure answer's in manual:

4. if matrix not square, or of previous solvers flags singular or near singular matrix, find least squares solution using lapack xgelsd function.

https://www.gnu.org/software/octave/doc/interpreter/techniques-used-for-linear-algebra.html#techniques-used-for-linear-algebra


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -