Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 9 down vote accepted

How about writing the Gram-Schmit down by yourself?

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

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

Your Answer


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.