Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8175 > unrolled thread

GramSchmidt function

Started by"Andie S." <freefalling779@gmail.com>
First post2012-01-26 08:24 +0000
Last post2012-01-31 10:35 +0000
Articles 8 — 7 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  GramSchmidt function "Andie S." <freefalling779@gmail.com> - 2012-01-26 08:24 +0000
    Re: GramSchmidt function Peter Breitfeld <phbrf@t-online.de> - 2012-01-27 11:09 +0000
    Re: GramSchmidt function "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2012-01-27 11:09 +0000
    Re: GramSchmidt function Chris Young <cy56@comcast.net> - 2012-01-27 11:17 +0000
    Re: GramSchmidt function David Reiss <dbreiss@gmail.com> - 2012-01-27 11:21 +0000
    Re: GramSchmidt function "Andie S." <freefalling779@gmail.com> - 2012-01-30 10:12 +0000
      Re: GramSchmidt function Ray Koopman <koopman@sfu.ca> - 2012-01-31 10:37 +0000
    Re: GramSchmidt function Murray Eisenberg <murray@math.umass.edu> - 2012-01-31 10:35 +0000

#8175 — GramSchmidt function

From"Andie S." <freefalling779@gmail.com>
Date2012-01-26 08:24 +0000
SubjectGramSchmidt function
Message-ID<jfr2jl$n9f$1@smc.vnet.net>
I am having trouble creating a function gramSchmidt[vList] to
construct an orthogonal basis for a list of vectors, vList.
any pointers on how to do this? Thanks!

[toc] | [next] | [standalone]


#8194

FromPeter Breitfeld <phbrf@t-online.de>
Date2012-01-27 11:09 +0000
Message-ID<jfu0ki$c3t$1@smc.vnet.net>
In reply to#8175
"Andie S." wrote:

> I am having trouble creating a function gramSchmidt[vList] to
> construct an orthogonal basis for a list of vectors, vList.
> any pointers on how to do this? Thanks!
>

Have a look at the build-in function Orthogonalize.


-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

[toc] | [prev] | [next] | [standalone]


#8195

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2012-01-27 11:09 +0000
Message-ID<jfu0lg$c46$1@smc.vnet.net>
In reply to#8175
On Thu, 26 Jan 2012 08:24:21 -0000, Andie S. <freefalling779@gmail.com>  
wrote:

> I am having trouble creating a function gramSchmidt[vList] to
> construct an orthogonal basis for a list of vectors, vList.
> any pointers on how to do this? Thanks!
>

My suggestion is to avoid it altogether. You can use Mathematica's own  
Gram-Schmidt code as follows:

Orthogonalize[vList, Method -> "GramSchmidt"]

(other Methods are "ModifiedGramSchmidt", "Reorthogonalization", and  
"Householder". In older versions of Mathematica, GramSchmidt and  
Householder are top-level functions in the  
LinearAlgebra`Orthogonalization` package.)

[toc] | [prev] | [next] | [standalone]


#8213

FromChris Young <cy56@comcast.net>
Date2012-01-27 11:17 +0000
Message-ID<jfu143$cbh$1@smc.vnet.net>
In reply to#8175
On 2012-01-26 08:24:21 +0000, Andie S. said:

> I am having trouble creating a function gramSchmidt[vList] to
> construct an orthogonal basis for a list of vectors, vList.
> any pointers on how to do this? Thanks!

I think all you need is Orthogonalize:

 Orthogonalize by default generates a Gram=E2=80=93Schmidt basis.

Find an orthonormal basis for two 3D vectors:
In[1]:= Orthogonalize[{{1, 0, 1}, {1, 1, 1}}]
Out[1]= {{1/Sqrt[2], 0, 1/Sqrt[2]}, {0, 1, 0}}

[toc] | [prev] | [next] | [standalone]


#8221

FromDavid Reiss <dbreiss@gmail.com>
Date2012-01-27 11:21 +0000
Message-ID<jfu1bo$cdq$1@smc.vnet.net>
In reply to#8175
use Orthogonalize

?Orthogonalize

Orthogonalize[{Subscript[v, 1],Subscript[v, 2],...}] gives an
orthonormal basis found by orthogonalizing the vectors Subscript[v,
i].
Orthogonalize[{Subscript[e, 1],Subscript[e, 2],...},f] gives a basis
for the Subscript[e, i] orthonormal with respect to the inner product
function f. >>

--david


On Jan 26, 3:24 am, "Andie S." <freefalling...@gmail.com> wrote:
> I am having trouble creating a function gramSchmidt[vList] to
> construct an orthogonal basis for a list of vectors, vList.
> any pointers on how to do this? Thanks!

[toc] | [prev] | [next] | [standalone]


#8247

From"Andie S." <freefalling779@gmail.com>
Date2012-01-30 10:12 +0000
Message-ID<jg5qed$hai$1@smc.vnet.net>
In reply to#8175
Yes, it was a practice exercise that I was able to figure out with
some trial and error.
I was aware of the "Orthogonalize" function. And the point of the
exercise was to compare the two.
But thanks for the suggestions!


On Jan 26, 3:24 am, "Andie S." <freefalling...@gmail.com> wrote:
> I am having trouble creating a function gramSchmidt[vList] to
> construct an orthogonal basis for a list of vectors, vList.
> any pointers on how to do this? Thanks!

[toc] | [prev] | [next] | [standalone]


#8265

FromRay Koopman <koopman@sfu.ca>
Date2012-01-31 10:37 +0000
Message-ID<jg8g8f$vt$1@smc.vnet.net>
In reply to#8247
On Jan 30, 2:12 am, "Andie S." <freefalling...@gmail.com> wrote:
> Yes, it was a practice exercise that I was able to figure out with
> some trial and error.
> I was aware of the "Orthogonalize" function. And the point of the
> exercise was to compare the two.
> But thanks for the suggestions!
>
> On Jan 26, 3:24 am, "Andie S." <freefalling...@gmail.com> wrote:
>
>> I am having trouble creating a function gramSchmidt[vList] to
>> construct an orthogonal basis for a list of vectors, vList.
>> any pointers on how to do this? Thanks!

See Paul Abbott's Gram-Schmidt code at
http://forums.wolfram.com/mathgroup/archive/2005/May/msg00410.html

[toc] | [prev] | [next] | [standalone]


#8250

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-01-31 10:35 +0000
Message-ID<jg8g5j$us$1@smc.vnet.net>
In reply to#8175
You may want to take a look at my notebook GramSchmide.nb on my old Math 
236 (Linear Algebra) course web site:

   http://www.math.umass.edu/~murray/Math_236/Files/files.html

What's done there is build the Gram Schmidt procedure in a "geometric" 
way that reveals what's really going on in terms of orthogonal 
projection onto vector subspaces.

It's hardly state-of-the-art from a computational view, but rather is 
intended to teach not just the underlying geometric ideas but also some 
basic Mathematica programming techniques, including: modularization of a 
procedure and then using iteration (including doing so in a functional 
way by using Fold) or recursion.

On 1/30/12 5:10 AM, Andie S. wrote:
> Yes, it was a practice exercise that I was able to figure out with
> some trial and error.
> I was aware of the "Orthogonalize" function. And the point of the
> exercise was to compare the two.
> But thanks for the suggestions!
>
>
> On Jan 26, 3:24 am, "Andie S."<freefalling...@gmail.com>  wrote:
>> I am having trouble creating a function gramSchmidt[vList] to
>> construct an orthogonal basis for a list of vectors, vList.
>> any pointers on how to do this? Thanks!
>
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web