Re: GramSchmidt problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg57044] Re: GramSchmidt problem*From*: Paul Abbott <paul at physics.uwa.edu.au>*Date*: Thu, 12 May 2005 22:44:28 -0400 (EDT)*Organization*: The University of Western Australia*References*: <d5uvda$9at$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

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/