# Linear Algebra: Finding a unit vector sharing a given angle with two other vectors

1. Feb 13, 2012

### haackeDc

Find unit vector with a given angle to two other vectors in 3-space

1. The problem statement, all variables and given/known data

We are given the vectors <1,0,-1> and <0,1,1>, and are told to find a unit vector that shares an angle of (pi/3) with both of these vectors.

2. Relevant equations

a(dot)b = |a||b|cosθ

3. The attempt at a solution

So, from the information givin, the only thing I could think to do was form a system of linear equations:

u(dot)<1,0,-1> = (√2)cos(pi/3)
u(dot)<0,1,1> = (√2)cos(pi/3)

u1 - u2 = (.5)(√2)
u2 + u3 = (.5)(√2)

giving us:

u1 = -u3 + (√2)
u2 = -u3 + (.5)(√2)

so I end up with u = <-u3 + (√2), -u3 + (.5)(√2), u3>

u = u3<-1, -1, 1>

Now... this is as far away from my answer as I can be! I know it's not right, because this is the equation for a line, not a vector!

For informational purposes, the answer in the back of the book is <1/(√2), 1/(√2), 0>

How do I get to that answer?

2. Feb 13, 2012

### haackeDc

1. The problem statement, all variables and given/known data

We are given the vectors <1,0,-1> and <0,1,1>, and are told to find a unit vector that shares an angle of (pi/3) with both of these vectors.

2. Relevant equations

a(dot)b = |a||b|cosθ

3. The attempt at a solution

So, from the information givin, the only thing I could think to do was form a system of linear equations:

u(dot)<1,0,-1> = (√2)cos(pi/3)
u(dot)<0,1,1> = (√2)cos(pi/3)

u1 - u2 = (.5)(√2)
u2 + u3 = (.5)(√2)

giving us:

u1 = -u3 + (√2)
u2 = -u3 + (.5)(√2)

so I end up with u = <-u3 + (√2), -u3 + (.5)(√2), u3>

u = (√2,√2, 0) + u3<-1, -1, 1>

I know this isn't right, because this is the equation for a line, not a vector!

For informational purposes, the answer in the back of the book is <1/(√2), 1/(√2), 0>

How do I get to that answer?

3. Feb 13, 2012

### Staff: Mentor

Re: Find unit vector with a given angle to two other vectors in 3-space

Why not start by first reducing the two given vectors to unit vectors? That way the magnitudes become unity and drop out of the dot products. Let's call then u1 and u2. Also, since the pi/3 is 60°, the cosine is 1/2.

Suppose that u is the unknown unit vector. The dot products become

$u \cdot u1 = 1/2$
$u \cdot u2 = 1/2$

Let x,y, and z be the components of u. Then after expanding the dot products you should end up with:

$x - z = \frac{1}{\sqrt{2}}$
$y - z = \frac{1}{\sqrt{2}}$

Write the vector [x,y,z] parametrically. That is, suppose you write z = t. Then solve for x and y in terms of t. For what value of t will the resulting vector be a unit vector? What is that vector?

4. Feb 13, 2012

### lanedance

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

note that if you find a u that satisfies you creteria, so will k u for any real k>0

so one other assumption you can make is that |u|^2=1

in fact you need it to get to the following
u(dot)<1,0,-1> = u1-u3 = |u|(√2)cos(pi/3) = (√2)/2 = 1/(√2)
u(dot)<0,1,1> = u2+u3 = |u|(√2)cos(pi/3) = (√2)/2 = 1/(√2)

rearranging
u1 = 1/(√2)+u3
u2 = 1/(√2)-u3

<1/(√2)+u3, 1/(√2)-u3, u3>

now rather than considering as a line, why not use the last bit of info that |u|=1 to solve for u3

Last edited: Feb 13, 2012
5. Feb 13, 2012

### SammyS

Staff Emeritus
Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

You have a typo or simply a mistake.

You can think of your result as the equation of a line, but it's the vector equation if the line. That's essentially a family of position vectors, which terminate at various locations along the line. You want the one or two of these position vectors which have a magnitude of 1 , as lancedance pointed out.

6. Feb 13, 2012

### haackeDc

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

lanedance, thank you.

So... interesting thought: if you were only given one reference vector, would the solution set be the shell of a cone?

EDIT: If you weren't given the restriction that it had to be a unit vector

7. Feb 13, 2012

### SammyS

Staff Emeritus
Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

I'm not sure if you noticed, but the angle between <1,0,-1> and <0,1,1> is 2π/3 .

This means that there is only one solution to your problem, and all three vectors lie in the same plane.

If the angle between <1,0,-1> and <0,1,1> were less than 2π/3, there would be two solutions.

8. Feb 14, 2012

### lanedance

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

if you remove the magnitude restraint the solution set would be two separate half lines, as any positive multiple of a vector will form the same angle

9. Feb 14, 2012

### lanedance

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

SammyS doesn't that only add to 4pi/3 in the plane?

10. Feb 14, 2012

### haackeDc

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

I'm talking about if you were only given a SINGLE REFERENCE VECTOR, not two, and then told to describe the solution set of all vectors from a given angle to that single vector. It would be a cone, wouldn't it?

11. Feb 14, 2012

### lanedance

Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

correct

12. Feb 14, 2012

### SammyS

Staff Emeritus
Re: Linear Algebra: Finding a unit vector sharing a given angle with two other vector

#@!!&%\$ TYPO !!!

I even thought to myself ... Check for a typo before posting this ! DUH !!!

The angle between <1,0,-1> and <0,1,1> is 4π/3 ... !
...

If the angle between the two given vectors was less than 4π/3, there would be two solutions.