MathGroup Archive 2005

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

Search the Archive

Re: GramSchmidt problem


In article <d5uvda$9at$1 at smc.vnet.net>,
 Heath Gerhardt <heathgerhardt at hotmail.com> wrote:

> Does anyone know if there are any know problems with GramSchmidt
> crashing Mathematica? When I run it on these 4 25-dimensional vectors it
> crashes on my system:

Tt works perfectly with floating point vectors so I expect that it 
crashes because it is not simplifying the intermediate radical 
expressions. 

Here is functional code for computing GramSchmidt:

  GramSchmidt := Fold[Append[#1, FullSimplify[
   (#/Norm[#]&)[Fold[Projection, #2, #1]]]] & , {}, #1] & ; 

where the projection operator is

  Projection[f_, g_] := FullSimplify[f - (f.g) g]

FullSimplify has been used in both routines so that expressions 
involving radicals are completely simplified.

Calling your set of 4 vectors mat, one computes the orthonormal vectors 
using 

  GramSchmidt[mat]

As a check,

  Simplify[% . Transpose[%]]

Cheers,
Paul

-- 
Paul Abbott                                      Phone: +61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul
        http://InternationalMathematicaSymposium.org/IMS2005/


  • Prev by Date: InterpolatingFunctionAnatomy.m
  • Next by Date: Re: Reading in a file
  • Previous by thread: Re: Integrate gives wrong answer
  • Next by thread: Re: GramSchmidt problem