Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Strange Det function behavior.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65459] Re: [mg65445] Strange Det function behavior.
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Mon, 3 Apr 2006 06:59:23 -0400 (EDT)
  • References: <200604020900.FAA01592@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Alexander wrote:
> Dear MathGroup!
> 
> Suppose we have defined the following function:
> 
> f[x_Integer] := Det[ Table[ Random[]*t + i/j, {i, x}, {j, x} ] ];
> 
> Now try to make a table for different values of argument (matrix
> dimension):
> 
> Table[f[i], {i, 12}] // TableForm
> 
> It takes a considerable time on my Celeron 1700 with Mathematica 5.2
> under WinXP to make such a table.
> 
> Once we made this table we see very strange bihavior, all results
> before x=12 dimension are polynoms,
> but starting from x=12 result become very big and very
> strange, and in fact it's not even a polynom.
> 
> I spend several hours try to understand why system acts so strange, and
> finally came to idea that the answer is in numbers representation and
> inner
> system algorithms used to evaluate Det function.
> 
> It would be very interesting to see explanations of this result.
> 
> Thanks for your answers!
> 
> Alexander.

I won't try to give you an explanation, but for your particular problem 
there is an undocumented workaround. The function 
CharacteristicPolynomial can accept a list of two matrices as its first 
argument:

CharacteristicPolynomial[{m,a},t]

returns

Det[m - a t]

So, we can use CharacteristicPolynomial for your problem. For example, 
here is a 12x12 matrix:

matrix = Table[ Random[]*t + i/j, {i, 12}, {j, 12} ];

Extract the {m,a} matrices:

{m,a} = {matrix /. t->0, -D[matrix,t]};

Use CharacteristicPolynomial:

In[14]:=
CharacteristicPolynomial[{m,a},t]//Chop//Timing

Out[14]=
                      11              12
{0. Second, 1.24466 t   + 0.0082288 t  }

An instantaneous result for 12x12 matrices.

Carl Woll
Wolfram Research


  • Prev by Date: Re: Strange Det function behavior
  • Next by Date: Re: Re: Typing special symbols in text mode?
  • Previous by thread: Re: Strange Det function behavior
  • Next by thread: Re: Strange Det function behavior.