I would like to define a 3-D vector as say v={x,y,z}, but I want it to have a fixed norm, say a unit norm |v|=1. How do I impose this condition on v.
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
To summarize my comments to the question: In order to get a normalized version of your (real) vector, just use
Note that you can also use other norms in Assume we consider a general normalized vector
In order to get the desired result from
as Mathematica assumes by default that $x,y,z$, respectively are complex (and obviously, for e.g. a complex $x=i$, we have $Abs[x]^2=Abs[i]^2=1^2\neq-1=i^2=x^2$, so it cannot simplify in general). Telling Mathematic that we use reals, we have $x^2=Abs[x]^2$ and get the desired result. |
||||
|

v=Normalize[{1,2,3}]? – Pinguin Dirk Mar 14 at 17:14Simplifythat you are using reals, like so:Simplify[v.v, Element[{x, y, z}, Reals]]– Pinguin Dirk Mar 14 at 17:33