# Math Help - Struggle with coordinate system

1. ## Struggle with coordinate system

Hi,

I want to determine the unit vectors e1,e2 and e3 i a 3D space.

e1 = (e1x,e1y,e1z)
e2 = (e2x,e2y,e2z)
e3 = (e3x,e3y,e3z)

e1x, e1y, e1z and e2z is known.

I dont know if it makes any difference but e3z will always be positive so e3 might be written as e3=(sx,sy,1)*t.

e1, e2, and e3 shall have length 1 and be perpendicular to each other so the following equations holds,

e3 = CrossProduct(e1,e2)
e2 = CrossProduct(e3,e1)
DotProduct(e1,e2) = 0
DotProduct(e1,e3) = 0
DotProduct(e2,e3) = 0

Anyone know how I could solve this?

2. ## Re: Struggle with coordinate system

You know all three components of e1 and you know e2z so e1.e2= e1xe2x+ e1ye2y+ e1ze2z= 0 is an equation with two unknown values, e2x and e2y. Similarly, e1.e3= e1xe3x+ e1ye3y+ e1ze3z= 0 is an equation with three unknown values, e3x, e3y, and e3z. The requirement that the vectors have unit length gives two more equations. So far that is 4 equations for the 5 unknown values. The requirement that e1Xe2= e3 gives the fifth equation.

3. ## Re: Struggle with coordinate system

Thank you for fast answer. That solution will work but the equations to solve get a bit messy.
I wonder if there might be a "trick" to solve this problem in an easier way.