MathGroup Archive 2003

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

Search the Archive

LinearSolve - consumption time for square and rectangular matrices


Hello MathGroup,

I don't know about big difference in consumption time in LinearSolve[] 
with square/rectangular matrices.

I am using Mathematica 5.0, PC: Duron 750, W2k

Here is example.
(***************************
1.) very fast:
input matrices are square {200,200} and rectangular {200,10}

In[1]:=
*)

SeedRandom[1];
A = Table[Random[],{200},{200}];
B = Table[Random[],{200},{10}];
LinearSolve[A,B];//Timing

(*
Out[1]=
{0.03 Second,Null}

2.) lots slower:
input matrices are rectangular {201,200}, {201,10} - Overdetermined

In[2]:=
*)

SeedRandom[1];
A = Table[Random[],{201},{200}];
B = Table[Random[],{201},{10}];
LinearSolve[A,B];//Timing

(*
Out[2]=
{0.761 Second,Null}

In[3]:=
0.761/.03

Out[3]=
25.3667
***************************)

I expect more difficult computation, but not so difficult.

Where is problem? Exists some option Method for LinerSolve[] or another
trick?

Thank in advance for all your help.
Best regards,
    Petr.


  • Prev by Date: Re: Problem with 4.2 on Slackware 9.1
  • Next by Date: Re: Automatic execution of a notebook
  • Previous by thread: Re: Advice on defining a data structure in Mathematica
  • Next by thread: Re: LinearSolve - consumption time for square and rectangular matrices