# mathematica finding unknown vector that satisfies conditions

How do you write each condition as an equation or inequality to find a vector $v$ that satisfies

$v$ is a unit vector: $||v||=1$, $v$ forms an angle of π/3 with the vector $(6,4,-2)$, $v$ is orthogonal to the vector $(3,-4,7)$, the third component of $v$ is positive.

• What have you tried so far? Some useful functions would be VectorAngle and Norm. Apr 16, 2018 at 16:53
• {v1, v2, v3} /. Solve[{Norm[{v1, v2, v3}] == 1, {v1, v2, v3}.{6, 4, -2}/ Norm[{6, 4, -2}] == Cos[Pi/3], {v1, v2, v3}.{3, -4, 7} == 0, v3 > 0}, {v1, v2, v3}] // Simplify Apr 16, 2018 at 17:01
• For example for condition 3, v is unknown while u= {6,4,-2}, If I use VectorAngle[u, v]*Pi/3 // N, how will the function find v (I get an error)? I am having trouble understanding how vector angle works. Apparently, it's easier than using the function of dot product of two vectors. Apr 16, 2018 at 17:06

Something like this:

vec = {x, y, z};
v1 = {3, -4, 7};
v2 = {6, 4, -2};

eqs = {Norm[vec] == 1, vec.v1 == 0, vec.(v2/Norm[v2]) == Cos[Pi/3], z > 0};

Solve[eqs, {x, y, z}] // N

(* {{x -> 0.176786, y -> 0.885294, z -> 0.430117}} *)

• Ah, I forgot that you can put all conditions in one line like when you are solving for the roots of specific equations(s) and then solve. Apr 16, 2018 at 17:15