From: Merciadri Luca on 3 Aug 2010 08:18 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Take the following (somewhat trivial) matrix: 1 2 3 4 2 1 4 3 3 4 1 2 4 3 2 1 Using my HP 50g, its determinant is 600e-15. No surprise, it is thus rank 4. But by looking some seconds at the matrix, everybody will notice that this can't be a full-rank matrix. (This is also confirmed by the fact that its determinant equals 0.) When giving such a definitive answer (rank 4), I think that the calculator should tell the user that it might be wrong, because the matrix's det approaches 0. Why isn't that said? Well, all the n*n matrices with a very small det are not necessarily of rank n-1, sure, but they might be! - -- Merciadri Luca See http://www.student.montefiore.ulg.ac.be/~merciadri/ - -- If you fall off a cliff, you might as well try to fly. After all, you got nothing to lose. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iEYEARECAAYFAkxYCSkACgkQM0LLzLt8Mhyu6ACfR32456uRvxopHQudYWFtJYjx fE8AnjU7EQ2qDy2lOrKybq3FcfcD6tJx =i36J -----END PGP SIGNATURE-----
From: hgabert on 3 Aug 2010 10:13 On Aug 3, 6:18 am, Merciadri Luca <Luca.Mercia...(a)student.ulg.ac.be> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Take the following (somewhat trivial) matrix: > > 1 2 3 4 > 2 1 4 3 > 3 4 1 2 > 4 3 2 1 > > Using my HP 50g, its determinant is 600e-15. No surprise, it is thus > rank 4. But by looking some seconds at the matrix, everybody will > notice that this can't be a full-rank matrix. (This is also confirmed > by the fact that its determinant equals 0.) > > When giving such a definitive answer (rank 4), I think that the > calculator should tell the user that it might be wrong, because the > matrix's det approaches 0. Why isn't that said? Well, all the n*n matrices > with a very small det are not necessarily of rank n-1, sure, but they > might be! > - -- > Merciadri Luca > Seehttp://www.student.montefiore.ulg.ac.be/~merciadri/ > - -- What are your flag settings? I get RANK = 3, and DET = 0 (both in approximate and exact mode).
From: John H Meyers on 3 Aug 2010 10:36 On 8/3/2010 7:18 AM, Merciadri Luca wrote: > Take the following (somewhat trivial) matrix: [[ 1 2 3 4 ] [ 2 1 4 3 ] [ 3 4 1 2 ] [ 4 3 2 1 ]] > Using my HP 50g, its determinant is 600e-15. Entered as given, in Exact mode, DET returns 0 on my calc. What you may mean is that if you enter all _reals_ (with decimal points), rather than all integers (or enter/edit all values in Approximate mode), and _also_ set flag -54, _then_ you get the claimed results. > No surprise, it is thus rank 4. > But by looking some seconds at the matrix, > everybody will notice that this can't be a full-rank matrix. > (This is also confirmed by the fact that its determinant equals 0.) You mean that its _theoretical_ determinant is zero (you said just above that its _calculated_ determinant was not zero) However, try clearing flag -54 and see a difference! Try also performing COND on the real-valued matrix; the large result indicates an ill-conditioned matrix. Says the AUR (which can sometimes be correct :) "The condition number expresses the sensitivity of the problem of solving a system of linear equations having coefficients represented by the elements of the matrix (this includes inverting the matrix). That is, it indicates how much an error in the inputs may be magnified in the outputs of calculations using the matrix." "In many linear algebra computations, the base 10 logarithm of the condition number of the matrix is an estimate of the number of digits of precision that might be lost in computations using that matrix. A reasonable rule of thumb is that the number of digits of accuracy in the result is approximately MIN(12,15Â-log(COND))" In this case, the "rule of thumb" suggests _zero_ digits of accuracy :) That's when performed using real-number operations, however, rather than exact operations (try DET on the exact-valued array). > When giving such a definitive answer (rank 4), I think that the > calculator should tell the user that it might be wrong, because the > matrix's det approaches 0. Why isn't that said? Well, all the n*n matrices > with a very small det are not necessarily of rank n-1, sure, but they > might be! It's up to the user to examine the condition number, just as it is to fasten your own seat belt and check how much gas remains in the tank :) The CAS is also very temperamental with this Integer-valued array -- I think my first attempt to perform RANK got an internal error, some later attempt, even with flag -54 cleared, resulted in 4 (whereas with the Real-valued matrix it's 3.) and it finally took a CASCFG command to tame my CAS into agreeing to a result of 3 "But in the new approach, as you know, the important thing is to understand what you're doing, rather than to get the right answer" :) http://curvebank.calstatela.edu/newmath/newmath.htm http://www.tomlehrer.org/ http://www.avclub.com/articles/tom-lehrer,13660/ http://www.tomlehrer.org/tomlehrer/credits.html (produced by theatrical legend [Sir] Cameron Mackintosh!) In a performance before British Royalty, fellow songwriters Stephen Sondheim and Andrew Lloyd Webber pay their own humorous tribute to Cameron: http://www.youtube.com/watch?v=0G_Q1poI6Bw [r->] [OFF]
From: Merciadri Luca on 3 Aug 2010 13:52 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John H Meyers <jhmeyers(a)nomail.invalid> writes: > On 8/3/2010 7:18 AM, Merciadri Luca wrote: > >> Take the following (somewhat trivial) matrix: > > [[ 1 2 3 4 ] > [ 2 1 4 3 ] > [ 3 4 1 2 ] > [ 4 3 2 1 ]] > >> Using my HP 50g, its determinant is 600e-15. > > Entered as given, in Exact mode, > DET returns 0 on my calc. > > What you may mean is that if you enter all _reals_ > (with decimal points), rather than all integers > (or enter/edit all values in Approximate mode), > and _also_ set flag -54, _then_ you get the claimed results. > >> No surprise, it is thus rank 4. >> But by looking some seconds at the matrix, >> everybody will notice that this can't be a full-rank matrix. >> (This is also confirmed by the fact that its determinant equals 0.) > > You mean that its _theoretical_ determinant is zero > (you said just above that its _calculated_ determinant was not zero) > > However, try clearing flag -54 and see a difference! > > Try also performing COND on the real-valued matrix; > the large result indicates an ill-conditioned matrix. > > Says the AUR (which can sometimes be correct :) > > "The condition number expresses the sensitivity > of the problem of solving a system of linear equations > having coefficients represented by the elements of the matrix > (this includes inverting the matrix). That is, it indicates > how much an error in the inputs may be magnified in the outputs > of calculations using the matrix." > > "In many linear algebra computations, > the base 10 logarithm of the condition number of the matrix > is an estimate of the number of digits of precision > that might be lost in computations using that matrix. > A reasonable rule of thumb is that the number of digits of accuracy > in the result is approximately MIN(12,15-log(COND))" > > In this case, the "rule of thumb" suggests _zero_ digits of accuracy :) > > That's when performed using real-number operations, however, > rather than exact operations (try DET on the exact-valued array). > >> When giving such a definitive answer (rank 4), I think that the >> calculator should tell the user that it might be wrong, because the >> matrix's det approaches 0. Why isn't that said? Well, all the n*n matrices >> with a very small det are not necessarily of rank n-1, sure, but they >> might be! > > It's up to the user to examine the condition number, > just as it is to fasten your own seat belt > and check how much gas remains in the tank :) > > The CAS is also very temperamental with this Integer-valued array -- > I think my first attempt to perform RANK got an internal error, > some later attempt, even with flag -54 cleared, resulted in 4 > (whereas with the Real-valued matrix it's 3.) > and it finally took a CASCFG command to tame my CAS > into agreeing to a result of 3 > > "But in the new approach, as you know, > the important thing is to understand what you're doing, > rather than to get the right answer" :) > http://curvebank.calstatela.edu/newmath/newmath.htm > http://www.tomlehrer.org/ > http://www.avclub.com/articles/tom-lehrer,13660/ > > http://www.tomlehrer.org/tomlehrer/credits.html > (produced by theatrical legend [Sir] Cameron Mackintosh!) > In a performance before British Royalty, > fellow songwriters Stephen Sondheim and Andrew Lloyd Webber > pay their own humorous tribute to Cameron: > http://www.youtube.com/watch?v=0G_Q1poI6Bw Thanks both for your answers. Well, I was not using tiny element -> 0. That might be a reason, ok. But consider now LAGRANGE([[1,5,30][2,10,60]]) It will give you a polynomial: - -1E-16 x*x+2x-5E-15 (I'm using Engineering mode). Or the polynomial should be 2x, simply. Even with flag 54 set as `tiny element -> 0', the -1E-16 is not considered as equalling 0. Why? Okay for the matrices. - -- Merciadri Luca See http://www.student.montefiore.ulg.ac.be/~merciadri/ - -- One man's meat is another man's poison. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iEYEARECAAYFAkxYV0sACgkQM0LLzLt8Mhz6KgCfW4Nmips5l09ogn7uKD9cSNUT F+EAn0E3JJrZK3vMgKMIeLFwTDMUW5gt =4xE/ -----END PGP SIGNATURE-----
From: Joe Horn on 3 Aug 2010 17:22 Merciadri Luca wrote: > LAGRANGE([[1,5,30][2,10,60]]) > It will give you a polynomial: > - -1E-16 x*x+2x-5E-15 > > (I'm using Engineering mode). Or the polynomial should be 2x, > simply. Even with flag 54 set as `tiny element -> 0', the -1E-16 is > not considered as equalling 0. Why? Okay for the matrices. As John suggested, use EXACT MODE. It yields 2*X, as desired. -Joe-
|
Next
|
Last
Pages: 1 2 Prev: HP should stop making Calculators...! Next: UBASE and Debug4x (with ROM 2.15) |