       RE: Possible Bug in Mathematica 6

• To: mathgroup at smc.vnet.net
• Subject: [mg90200] RE: Possible Bug in Mathematica 6
• From: "Amir Ahmed Ansari" <aansari at softpak.com>
• Date: Wed, 2 Jul 2008 05:29:33 -0400 (EDT)
• References: <g4d31k\$et0\$1@smc.vnet.net> <486A49C1.6050602@gmail.com>

```*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.

-----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: [mg90200] 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 ,
for it is way more readable and far less prone to misinterpretation

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

 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: .NEF image format in Import
• Next by Date: Re: Problem with parametric minimization
• Previous by thread: Re: Possible Bug in Mathematica 6
• Next by thread: Re: Possible Bug in Mathematica 6