numpy (matrix solver) - python vs. matlab

Paul Rubin no.email at nospam.invalid
Sun Apr 29 20:57:43 EDT 2012


someone <newsboost at gmail.com> writes:
>> A is not just close to singular: it's singular!
> Ok. When do you define it to be singular, btw?

Singular means the determinant is zero, i.e. the rows or columns
are not linearly independent.  Let's give names to the three rows:

  a = [1 2 3]; b = [11 12 13]; c = [21 22 23].

Then notice that c = 2*b - a.  So c is linearly dependent on a and b.
Geometrically this means the three vectors are in the same plane,
so the matrix doesn't have an inverse.

>>> Which is the most accurate/best, even for such a bad matrix? 

What are you trying to do?  If you are trying to calculate stuff
with matrices, you really should know some basic linear algebra.



More information about the Python-list mailing list