From: SourceForge.net <no...@so...> - 2004-11-21 14:29:49
|
Bugs item #1064238, was opened at 2004-11-10 20:05 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1064238&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: triangularize gives wrong results Initial Comment: for example : (%i1) a:matrix([-4,0,-2],[0,1,0],[5,1,3]); [ - 4 0 - 2 ] [ ] (%o1) [ 0 1 0 ] [ ] [ 5 1 3 ] (%i2) determinant(a); (%o2) - 2 (%i3) t:triangularize(a); [ - 4 0 - 2 ] [ ] (%o3) [ 0 - 4 0 ] [ ] [ 0 0 - 2 ] a and t doesn't even have the same determinant. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2004-11-21 09:29 Message: Logged In: YES user_id=28849 The bug report doesn't display the actual results very well. The result is matrix([-4, 0, 2],[0,-4,0],[0,0,-2]); For me, elementary row operations include multiplying a row by a constant. That definitely gives a different determinant. Anyway, I can obtain the given result by multiplying row 1 by 5 and row 3 by 4 and adding them to give a new matrix, matrix([-4,0,-2],[0,1,0],[0,4,2]). Then multiply row 2 by -4 and add it to row 3 to get matrix([-4,0,-2],[0,1,0],[0,0,2]). Each of these I consider elementary row operations, and clearly the determinant is not the same as the original. It seems to me you really want a very specific way of triangularizing a matrix. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-11-20 17:33 Message: Logged In: NO I'm not sure to understand the output %3 but is it saying that the second row is nul ? If so this say that det(trianularize(a))=0 but this impossible because det(a)!=0. Indeed swap rows do *not* conserve det(a) but *do* conserve |det(a)| . So in fact by your argument rtoy your saying that this report *is* a bug. Please consider this (even if the submiter was not really nice) ! Thanks in advance, a ph.d student in maths. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2004-11-20 09:21 Message: Logged In: YES user_id=28849 For me elementary row operations include swapping rows. That doesn't preserve the determinant. Anyway, I don't want to argue over this. Convince someone else you are right and have them fix it for you. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-11-19 18:24 Message: Logged In: NO I don't trust you. You can't obtain the desired matrix via elementary row operations ( or we don't have the same definition of elementary row operations ). if you don't know that the determinant must match, look at http://www.mathematics-online.org/kurse/kurs10/seite151.html and http://en.wikipedia.org/wiki/Determinant or http://en.wikipedia.org/wiki/Similar. You will learn that a matrix and a triangular form of this matrix are similar ( first link) and that two similar matrix have the same determinant (second and third links). I've found the links with a simple google search . Next time, please search before you ask ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2004-11-19 16:56 Message: Logged In: YES user_id=28849 I can obtain the desired matrix via elementary row operations. Please cite a reference that says the determinant must match. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-11-19 15:18 Message: Logged In: NO to rtoy "Why is this wrong? The result is an upper triangular matrix." This is a joke ? You know [1 2 3],[0,5,6],[0,0,7] is too an upper triangular matrix. I thought the command triangularize(a) gives a triangular form of the matrix a an not an random upper triangular matrix. It seems you didn't read my comment "a and t doesn't even have the same determinant." . I hope you know that a matrix and a triangular form of this matrix should have the same determinant. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2004-11-11 18:04 Message: Logged In: YES user_id=28849 Why is this wrong? The result is an upper triangular matrix. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1064238&group_id=4933 |