13.3 Dot Product

Problem

Find a unit vector in the xy-plane that forms a 45 degree angle with the vector a =  <1, 1, 1>.

Solution

A unit vector in the xy-plane has the form u =  <x, y, 0>with |u|  = (x^2) + (y^2) = 1 (a unit circle).Plug θ = π/4, \(TraditionalForm\`\(\(|\)\(a\)\(|\)\)\  = \(\@\(1\^2 + 1\^2 + 1\^2\) = \@3\)\),and |u|  = 1 into
	\(TraditionalForm\`a . 
          u = \ \(\(|\)\(a\)\(|\)\(\ \)\(|\)\(u\)\(|\)\(cos(θ)\)\)\)
to get
	<1, 1, 1 > .<x, 
      y, 0>  = (Sqrt[3]) (Sqrt[2])/2
or
	x + y = (Sqrt[6])/2.
Now plug y  =  (Sqrt[6])/2 - x into (x^2) + (y^2) = 1 to get
	(x^2) + ((((Sqrt[6])/2 - x))^2) = 1
which simplifies to
	2 (x^2) - (Sqrt[6]) x + 1/2 = 0.
By the quadratic formula, x  =  ((Sqrt[6]) ± (Sqrt[2]))/4  =  
          0.259 and 0.966. The corresponding y vales are 0.966 and 0.259.Therefore, there are two unit vectors in the xy-plane that form a 45 degree angle with the vector a =  <1, 1, 1>: <0.259, 0.966, 0> and <0.966, 0.259, 0>.

Here's how to do the problem in Mathematica:

a  =  {1, 1, 1};  u  =  {x, y, 0};

(Sqrt[a . a])

(Sqrt[u . u]) == 1

soln  =  
      Solve[ {a . u  ==  (Sqrt[a . a]) Cos[π/4],  
          u . u ==  1}]

u  /.  soln  // N

x  =  r Cos[t];  y  =  r Sin[t];  z  =  r;

Now we create a graphic realization of this problem. The set of vectors that form a 45 degree angle with the vector <1, 1, 1> is a cone. We want unit vectors that simultaneously lie on this cone and the plane z = 0. The intersection of the cone and the plane clearly consists of two rays. The direction vectors for the two rays normalized to have length 1 give the answer.

cone  =  
        ParametricPlot3D[{(1/(Sqrt[6 ])) x  - (1/(Sqrt[2])) 
                y +  (1/(Sqrt[3])) 
                z, 
(1/(Sqrt[6 ])) 
                x  + (1/(Sqrt[2])) y +  (1/(Sqrt[3])) z, -((Sqrt[2])/(Sqrt[3])) 
                x +  (1/(Sqrt[3])) z}, {r, 0, 3}, {t, 0, 2  Pi}];

plane  =  Plot3D[0,  {x, 0, 4}, {y, 0, 4}];

line  =  ParametricPlot3D[{t, t, t}, {t, 0, 4}];

Show[{plane, cone, line}, BoxRatios -> Automatic, 
      ViewPoint -> {3.073,  -1.137,  0.845}]