Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a way to make Orthogonalize do the normal Gram-Schmidt procedure without normalizing the result? As far as I've understood this was possible with Mathematica 5.2.

One way would be to just multiply with the norms but being complicated expressions the whole thing would be easier without normalizing in the first place.

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

How about writing the Gram-Schmit down by yourself?

GramSchmidt[w_?MatrixQ] := Module[{v = ConstantArray[0, Length[w]]},
  Table[
    v[[n]] = w[[n]] - 
      Sum[(v[[i]].w[[n]]/v[[i]].v[[i]])*v[[i]], {i, 1, n - 1}], 
    {n, 1, Length[w]}];
  v
]

Then you have the unscaled orthogonal basis

GramSchmidt[{{1, 1, 1}, {1, 1/2, 1/3}, {1, 2, 3}}]
Graphics3D[Arrow[{{0, 0, 0}, #}] & /@ %]

Mathematica graphics

share|improve this answer
    
Thanks! That's great. I actually need it for a nonstandard inner product but probably that can be easily incorporated into your function. –  jorgen Nov 19 '13 at 17:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.