[Date Index]
[Thread Index]
[Author Index]
Re: Possible Bug in Mathematica 6
*To*: mathgroup at smc.vnet.net
*Subject*: [mg90204] Re: Possible Bug in Mathematica 6
*From*: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
*Date*: Wed, 2 Jul 2008 05:30:19 -0400 (EDT)
*References*: <g4d31k$et0$1@smc.vnet.net> <486A49C1.6050602@gmail.com>
On Tue, Jul 1, 2008 at 6:57 PM, Amir Ahmed Ansari <aansari at softpak.com> wrote:
> *RED FACE* Those were quite major blunders. So anyways by 'all 5x5 have a
> determinant of 0' I mean that all 5x5 sub-matrices have determinant 0. It is
> a basic theorem in Linear Algebra that a matrix has rank n iff all 'n+1' x
> 'n+1' sub-matrices have determinant 0. So check the determinants of all 5x5
> sub-matrices - you will see they are indeed 0.
I am afraid I did not express myself clearly: my question was not
about the theorem you tried to apply but how you got this erroneous
result. In other words, I was interested by the Mathematica code or
function you used.
I agree with the theorem you use; however, I disagree with your claim
that the matrix is not of rank 5: the 84 (Binomial[6, 6] Binomial[9,
6]) 6x6 minors are all zeros; therefore the matrix has rank 6-1 = 5.
Minors[m, 6]
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
On the other hand, there exists 756 (Binomial[6, 5] Binomial[9, 5])
5x5 minors and in the general case at most 486 are *NOT* zero.
Minors[m, 5]
So, either we are not talking about the same matrix m, or you have
been using some phony code to compute the determinants of all the 5x5
submatrices (i.e. the minors in LA jargon).
Regards,
- Jean-Marc
> -----Original Message-----
> From: Jean-Marc Gulliet [mailto:jeanmarc.gulliet at gmail.com]
> Sent: Tuesday, July 01, 2008 8:14 PM
> To: Amir Ahmed Ansari; mathgroup at smc.vnet.net
> Subject: Re: Possible Bug in Mathematica 6
>
> Amir Ahmed Ansari wrote:
>
>> I tried this on a friend=92s computer using Mathematica 6. Consider the
>> following matrix:
>>
>> {
>> { f_11, f_12, f_13, 0, 0, 0, 0, 0, 0 },
>> { 0, 0, 0, f_21, f_22, f_23, 0, 0, 0 },
>> { 0, 0, 0, 0, 0, 0, ( a f_11 + b f_21 ), ( a f_12 + b f_22 ), =
>> ( a f_13 +
>> b f_23 ) },
>> { f_21, f_22, f_23, f_11, f_12, f_13, 0, 0, 0 },
>> { ( a f_11 + b f_21 ), ( a f_12 + b f_22 ), ( a f_13 + b f_23 =
>> ), 0, 0,
>> 0, f_11, f_12, f_13 },
>> { 0, 0, 0, ( a f_11 + b f_21 ), ( a f_12 + b f_22 ), ( a f_13 =
>> + b f_23
>> ), f_21, f_22, f_23 }
>> }
>
> You should try to copy and past Mathematica expressions InputForm [1],
> for it is way more readable and far less prone to misinterpretation
> (especially when your email/newsgroup client adds spurious equal sings).
>
> Also, avoid funny notation such as f_11 which is interpreted by
> Mathematica as Times[11, Pattern[f, Blank[]]] rather than the intended
> Subscript[f, 11].
>
> Now, here is what I get having translated the above "code". The matrix m
> is a 6 by 9 rectangular matrix, with matrix rank 5.
>
> m = {{f11, f12, f13, 0, 0, 0, 0, 0, 0}, {0, 0, 0, f21, f22, f23, 0, 0,
> 0}, {0, 0, 0, 0, 0, 0, a*f11 + b*f21, a*f12 + b*f22,
> a*f13 + b*f23}, {f21, f22, f23, f11, f12, f13, 0, 0, 0},
> {a*f11 + b*f21, a*f12 + b*f22, a*f13 + b*f23, 0, 0, 0, f11, f12,
> f13}, {0, 0, 0, a*f11 + b*f21, a*f12 + b*f22, a*f13 + b*f23, f21,
> f22, f23}};
>
>
> Dimensions[m]
>
> {6, 9}
>
> MatrixRank[m]
>
> 5
>
>> All 5x5 have a determinant of 0 as can be seen by using Det[]. Yet,
>> MatrixRank[] comes out to be 5. Is this a bug or am I doing something
>> stupid?
>
> What do you exactly mean by, "all 5x5 have a determinant of 0"? And more
> importantly, how did you check that?
>
> Anyway, Mathematica is right in claiming that the matrix rank is 5.
>
> Following the online documentation, we can check that the matrix rank
> (5) plus the length of the null space (4) is equal to the number of
> columns of m (9):
>
> Length[NullSpace[m]]
>
> 4
>
> Moreover, the matrix rank (5) is equal to the length of the
> SingularValueList (5):
>
> Length[SingularValueList[m]]
>
> 5
>
> (Note that it is very unlikely that MatrixRank, NullSpace, and
> SingularValueList are all buggy -- and in a consistent manner.)
>
> Regards,
> - Jean-Marc
>
> [1] To use the _InputForm_ when copying an expression from a Mathematica
> notebook to an email client: select the cell(s) you want to include in
> your email, then within the *Cell* menu select either *Convert To* or
> *Display As* and choose *InputForm*. Finally, copy and paste as usual.
>
>
Prev by Date:
**Re: For loop problem in mathematica**
Next by Date:
**Re: .NEF image format in Import**
Previous by thread:
**Re: Possible Bug in Mathematica 6**
Next by thread:
**RE: Possible Bug in Mathematica 6**
| |