Three-Dimensional Givens Rotations

Note: The math on this page is progressively rendered. It can take up to 45 seconds before the final rendering is complete.

Remembering that cos(θ+π2)=sin(θ) and sin(θ+π2)=cos(θ), the following matrix is the three-dimensional Givens Rotation from the y-axis to the z-axis (rotation counter-clockwise around the x-axis):

(1000cos(θyz)cos(θyz+90)0sin(θyz)sin(θyz+90))(1000cos(θyz)cos(θyz+π2)0sin(θyz)sin(θyz+π2))(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))

This matrix rotates three-dimensional column vectors about the origin of the yz plane:

yz

x

y

z

x

1

0

0

y

0

cos(θyz)

sin(θyz)

z

0

sin(θyz)

cos(θyz)

 

Similarly, the following is the three-dimensional Givens Rotation from the x-axis to the z-axis (rotation clockwise around the y-axis):

(cos(θxz)0cos(θxz+90)010sin(θxz)0sin(θxz+90))(cos(θxz)0cos(θxz+π2)010sin(θxz)0sin(θxz+π2))(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))

This matrix rotates three-dimensional column vectors about the origin of the xz plane:

xz

x

y

z

x

cos(θxz)

0

sin(θxz)

y

0

1

0

z

sin(θxz)

0

cos(θxz)

 

Notice that this is not the same as the traditional rotation matrix where we rotate around the y axis using the right-hand rule (i.e. where we rotate in the opposite direction about the origin of the xz plane). In other words, given θ=ϕ and remembering that cos(ϕ)=cos(ϕ) and sin(ϕ)=sin(ϕ), we have the following:

(cos(θ)0cos(θ+90)010sin(θ)0sin(θ+90))(cos((ϕ))0cos((ϕ)+90)010sin((ϕ))0sin((ϕ)+90))(cos(ϕ)0sin(ϕ+π2)010sin(ϕ)0sin(ϕ+π2))(cos(ϕ)0sin(ϕ)010sin(ϕ)0cos(ϕ))(cos(ϕ)0sin(ϕ)010sin(ϕ)0cos(ϕ))

Lastly, the following is the three-dimensional Givens Rotation from the x-axis to the y-axis (rotation counter-clockwise around the z-axis):

(cos(θxy)cos(θxy+90)0sin(θxy)sin(θxy+90)0001)(cos(θxy)cos(θxy+π2)0sin(θxy)sin(θxy+π2)0001)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)

This matrix rotates three-dimensional column vectors about the origin of the xy plane:

xy

x

y

z

x

cos(θxy)

sin(θxy)

0

y

sin(θxy)

cos(θxy)

0

z

0

0

1

 

Observe that given n dimensions, we have the following number of distinct Givens Rotation matrices:

(n1)+(n2)++1k=1n1k(n1)((n1)+1)2(n1)(n1+1)2(n1)(n)2n(n1)2

For instance, when we’re in three dimensions, we have n=3 and n(n1)2=(3)((3)1)2=3(2)2=3 distinct Givens Rotation matrices:

yz

x

y

z

x

1

0

0

y

0

cos(θyz)

sin(θyz)

z

0

sin(θyz)

cos(θyz)

xz

x

y

z

x

cos(θxz)

0

sin(θxz)

y

0

1

0

z

sin(θxz)

0

cos(θxz)

and

xy

x

y

z

x

cos(θxy)

sin(θxy)

0

y

sin(θxy)

cos(θxy)

0

z

0

0

1

 

Moreover, notice the order in which we’re considering these distinct Givens Rotation matrices:

 

x

y

z

x

 

xy

xz

y

 

 

yz

z

 

 

 

 

 

x

y

z

x

 

3

2

y

 

 

1

z

 

 

 

 

We’ll leverage this order in a moment. Before that, let’s see what happens when we rotate the unit column vector (1,0,0) using each of these Givens Rotations:

(1000cos(θyz)cos(θyz+90)0sin(θyz)sin(θyz+90))(100)(1000cos(θyz)cos(θyz+π2)0sin(θyz)sin(θyz+π2))(100)(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))(100)(100),

(cos(θxz)0cos(θxz+90)010sin(θxz)0sin(θxz+90))(100)(cos(θxz)0cos(θxz+π2)010sin(θxz)0sin(θxz+π2))(100)(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))(100)(cos(θxz)0sin(θxz)),

and

(cos(θxy)cos(θxy+90)0sin(θxy)sin(θxy+90)0001)(100)(cos(θxy)cos(θxy+π2)0sin(θxy)sin(θxy+π2)0001)(100)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)(100)(cos(θxy)sin(θxy)0).

As expected, this simply extracts the first column vector from each Givens Rotation matrix. Because we’re extracting the first column vector, we’ll only see θ in those vectors … we’ll never see θ+90; so for the Givens Rotation matrices that modify (1,0,0), cos(θ) will always be in the x position and sin(θ) will walk its way up the remaining dimensions based on the order established above. For the Givens Rotation matrices that do not modify (1,0,0) (it’s just that first matrix in three dimensions), those rotations do not impact the x position. Looking back at our established order:

 

x

y

z

x

 

3

2

y

 

 

1

z

 

 

 

 

we see that the non-x rows cannot impact the x position. In this three-dimensional case, we see that the Givens Rotation matrix associated with the y row cannot modify the x position. To make this a little clearer, let’s rotate the arbitrarily positioned column vector (x,y,z):

(1000cos(θyz)cos(θyz+90)0sin(θyz)sin(θyz+90))(xyz)(1000cos(θyz)cos(θyz+π2)0sin(θyz)sin(θyz+π2))(xyz)(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))(xyz)(xycos(θyz)zsin(θyz)ysin(θyz)+zcos(θyz)),

(cos(θxz)0cos(θxz+90)010sin(θxz)0sin(θxz+90))(xyz)(cos(θxz)0cos(θxz+π2)010sin(θxz)0sin(θxz+π2))(xyz)(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))(xyz)(xcos(θxz)zsin(θxz)yxsin(θxz)+zcos(θxz)),

and

(cos(θxy)cos(θxy+90)0sin(θxy)sin(θxy+90)0001)(xyz)(cos(θxy)cos(θxy+π2)0sin(θxy)sin(θxy+π2)0001)(xyz)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)(xyz)(xcos(θxy)ysin(θxy)xsin(θxy)+ycos(θxy)z).

We immediately see that rotating (x,y,z) about the yz plane (multiplying by the first Givens Rotation matrix) does not impact the x position … and only impacts the y and z positions if y0 or z0 … which only happens when we have a column vector off of the x-axis. For the column vector (r,0,0) on the x-axis, rotating about the yz plane (multiplying by that first Givens Rotation matrix) has no effect … we’ll still have (r,0,0) after that multiplication.

This brings up the question: given the column vector (r,0,0) where r=x2+y2+z2 and r0, can all column vectors (x,y,z) be recovered using just these Givens Rotation matrices?

First, we’ll start by using all the Givens Rotation matrices in our established order … and notice that the first Givens Rotation matrix doesn’t really help out that much:

(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1(r00)=(xyz)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2((1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1(r00))=(xyz)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(r00)=(xyz)

Then, we have:

(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(r00)=(xyz)(cos(θxy)cos(θxz)sin(θxy)cos(θxy)sin(θxz)sin(θxy)cos(θxz)cos(θxy)sin(θxy)sin(θxz)sin(θxz)0cos(θxz))(r00)=(xyz)(rcos(θxy)cos(θxz)rsin(θxy)cos(θxz)rsin(θxz))=(xyz)

For r=x2+y2+z2, r=0 implies x=0, y=0, and z=0, so given r=0, we have:

(rcos(θxy)cos(θxz)rsin(θxy)cos(θxz)rsin(θxz))=(xyz)((0)cos(θxy)cos(θxz)(0)sin(θxy)cos(θxz)(0)sin(θxz))=(000)(000)=(000)

So, we can recover the column vector (0,0,0).

Given r=x2+y2+z2 with r>0 and 90θxz90, we have:

rsin(θxz)=z(x2+y2+z2)sin(θxz)=zsin(θxz)=zx2+y2+z2θxz=arcsin(zx2+y2+z2)

Moreover, since arcsin(w)=arctan(w1w2), we also have:

θxz=arcsin(zx2+y2+z2)=arctan((zx2+y2+z2)1(zx2+y2+z2)2)=arctan(zx2+y2+z2x2+y2+z2x2+y2+z2z2x2+y2+z2)=arctan(zx2+y2+z2x2+y2+z2z2x2+y2+z2)=arctan(zx2+y2+z2x2+y2x2+y2+z2)=arctan(zx2+y2)

Remember: arctan(yx) is atan2( y, x ) in C/C++ and ArcTan[ x, y ] in Mathematica.

Given r=x2+y2+z2 with r>0, 90θxz90, and remembering that cos(arctan(w))=11+w2 and sin(arctan(w))=w1+w2, if θxz=arctan(zx2+y2), we have:

cos(θxz)cos(arctan(zx2+y2))11+(zx2+y2)21x2+y2x2+y2+z2x2+y21(x2+y2+z2x2+y2)x2+y2x2+y2+z2

and

sin(θxz)sin(arctan(zx2+y2))(zx2+y2)1+(zx2+y2)2zx2+y2x2+y2x2+y2+z2x2+y2zx2+y2x2+y2+z2x2+y2zx2+y2+z2.

Given r=x2+y2+z2 with r>0 and 180θxy180, since cos(arctan(zx2+y2))=x2+y2x2+y2+z2, if θxz=arctan(zx2+y2), we have:

rsin(θxy)cos(θxz)=yrsin(θxy)cos(arctan(zx2+y2))=y(x2+y2+z2)sin(θxy)(x2+y2x2+y2+z2)=yx2+y2+z2sin(θxy)x2+y2x2+y2+z2=ysin(θxy)=yx2+y2θxy=arcsin(yx2+y2)

Moreover, since arcsin(w)=arctan(w1w2), we also have:

θxy=arcsin(yx2+y2)=arctan((yx2+y2)1(yx2+y2)2)=arctan(yx2+y2x2+y2x2+y2y2x2+y2)=arctan(yx2+y2x2+y2y2x2+y2)=arctan(yx2+y2x2x2+y2)=arctan(yx2)=arctan(yx)

Given r=x2+y2+z2 with r>0, 180θxy180, and remembering that cos(arctan(w))=11+w2 and sin(arctan(w))=w1+w2 , we have:

cos(θxy)cos(arctan(yx))11+(yx)21x2x2+y2x21(x2+y2x2)x2x2+y2xx2+y2

and

sin(θxy)sin(arctan(yx))(yx)1+(yx)2yxx2x2+y2x2yxx2+y2x2yxx2+y2xyx2+y2

Given r=x2+y2+z2 with r>0, 180θxy180, and 90θxz90, since cos(arctan(yx))=xx2+y2 and cos(arctan(zx2+y2))=x2+y2x2+y2+z2, if θxy=arctan(yx) and θxz=arctan(zx2+y2), we have:

rcos(θxy)cos(θxz)rcos(arctan(yx))cos(arctan(zx2+y2))(x2+y2+z2)(xx2+y2)(x2+y2x2+y2+z2)x2+y2+z2xx2+y2x2+y2x2+y2+z2x

So, we have rcos(θxy)cos(θxz)=x.

Obviously, since sin(arctan(yx))=yx2+y2, cos(arctan(zx2+y2))=x2+y2x2+y2+z2, and sin(arctan(zx2+y2))=zx2+y2+z2, if θxy=arctan(yx) and θxz=arctan(zx2+y2), we also have:

rsin(θxy)cos(θxz)rsin(arctan(yx))cos(arctan(zx2+y2))(x2+y2+z2)(yx2+y2)(x2+y2x2+y2+z2)x2+y2+z2yx2+y2x2+y2x2+y2+z2y

and

rsin(θxz)rsin(arctan(zx2+y2))(x2+y2+z2)(zx2+y2+z2)x2+y2+z2zx2+y2+z2z.

So, we also have rsin(θxy)cos(θxz)=y and rsin(θxz)=z such that:

(rcos(θxy)cos(θxz)rsin(θxy)cos(θxz)rsin(θxz))=(xyz)(xyz)=(xyz)

Therefore, all column vectors (x,y,z) can be recovered by applying the Givens Rotation matrices associated with the x row to the column vector (r,0,0) where r=x2+y2+z2 and r0:

 

x

y

z

x

 

3

2

y

 

 

1

z

 

 

 

 

Notice that the (r,θxy,θxz) coordinate system implied here is not the same as the traditional spherical coordinate system(ρ,θ,ϕ). In the traditional spherical coordinate system, we have:

x=ρcos(θ)sin(ϕ)y=ρsin(θ)sin(ϕ)z=ρcos(ϕ)

where ρ=x2+y2+z2, 0θ360 where θ is the angle measured from the positive x-axis (toward the positive y-axis), and 0ϕ180 where ϕ is the angle measured from the positive z-axis (toward the negative z-axis); however, what we have here is the following:

x=rcos(θxy)cos(θxz)y=rsin(θxy)cos(θxz)z=rsin(θxz)

where r=x2+y2+z2, 180θxy180 where θxy is the angle measured from the positive x-axis (toward the positive y-axis), and 90θxz90 where θxz is the angle measured from the positive x-axis (toward the positive z-axis).

Now, let’s rotate a column vector (x,y,z) back to the x-axis so that we get the column vector (r,0,0). In order to do that, let’s first take a look at each inverse of these Givens Rotation matrices using augmentation and finding the reduced row echelon forms … which as you’ll see is very similar for each matrix. Remembering that cos2(θ)+sin2(θ)=1 which implies that 1sin2(θ)=cos2(θ), we have:

(1001000cos(θyz)sin(θyz)0100sin(θyz)cos(θyz)001)(10010001sin(θyz)cos(θyz)01cos(θyz)00sin(θyz)cos(θyz)001)(10010001sin(θyz)cos(θyz)01cos(θyz)000cos(θyz)+sin2(θyz)cos(θyz)0sin(θyz)cos(θyz)1)(10010001sin(θyz)cos(θyz)01cos(θyz)000cos2(θyz)+sin2(θyz)cos(θyz)0sin(θyz)cos(θyz)1)(10010001sin(θyz)cos(θyz)01cos(θyz)0001cos(θyz)0sin(θyz)cos(θyz)1)(10010001sin(θyz)cos(θyz)01cos(θyz)00010sin(θyz)cos(θyz))(10010001001cos(θyz)sin2(θyz)cos(θyz)sin(θyz)0010sin(θyz)cos(θyz))(10010001001sin2(θyz)cos(θyz)sin(θyz)0010sin(θyz)cos(θyz))(1001000100cos2(θyz)cos(θyz)sin(θyz)0010sin(θyz)cos(θyz))(1001000100cos(θyz)sin(θyz)0010sin(θyz)cos(θyz))

(cos(θxz)0sin(θxz)100010010sin(θxz)0cos(θxz)001)(10sin(θxz)cos(θxz)1cos(θxz)00010010sin(θxz)0cos(θxz)001)(10sin(θxz)cos(θxz)1cos(θxz)0001001000cos(θxz)+sin2(θxz)cos(θxz)sin(θxz)cos(θxz)01)(10sin(θxz)cos(θxz)1cos(θxz)0001001000cos2(θxz)+sin2(θxz)cos(θxz)sin(θxz)cos(θxz)01)(10sin(θxz)cos(θxz)1cos(θxz)00010010001cos(θxz)sin(θxz)cos(θxz)01)(10sin(θxz)cos(θxz)1cos(θxz)00010010001sin(θxz)0cos(θxz))(1001cos(θxz)sin2(θxz)cos(θxz)0sin(θxz)010010001sin(θxz)0cos(θxz))(1001sin2(θxz)cos(θxz)0sin(θxz)010010001sin(θxz)0cos(θxz))(100cos2(θxz)cos(θxz)0sin(θxz)010010001sin(θxz)0cos(θxz))(100cos(θxz)0sin(θxz)010010001sin(θxz)0cos(θxz))

(cos(θxy)sin(θxy)0100sin(θxy)cos(θxy)0010001001)(1sin(θxy)cos(θxy)01cos(θxy)00sin(θxy)cos(θxy)0010001001)(1sin(θxy)cos(θxy)01cos(θxy)000cos(θxy)+sin2(θxy)cos(θxy)0sin(θxy)cos(θxy)10001001)(1sin(θxy)cos(θxy)01cos(θxy)000cos2(θxy)+sin2(θxy)cos(θxy)0sin(θxy)cos(θxy)10001001)(1sin(θxy)cos(θxy)01cos(θxy)0001cos(θxy)0sin(θxy)cos(θxy)10001001)(1sin(θxy)cos(θxy)01cos(θxy)00010sin(θxy)cos(θxy)0001001)(1001cos(θxy)sin2(θxy)cos(θxy)sin(θxy)0010sin(θxy)cos(θxy)0001001)(1001sin2(θxy)cos(θxy)sin(θxy)0010sin(θxy)cos(θxy)0001001)(100cos2(θxy)cos(θxy)sin(θxy)0010sin(θxy)cos(θxy)0001001)(100cos(θxy)sin(θxy)0010sin(θxy)cos(θxy)0001001)

Therefore, the inverse of each three-dimensional Givens Rotation matrix is simply the transpose of that matrix:

(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1=(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))T=(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))1=(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))T=(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)1=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)T=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)

and it shouldn’t be too hard to see that the inverse of each n-dimensional Givens Rotation matrix is also the transpose of that matrix … like it is for any other n-dimensional rotation matrix.

Also, if we consider rotations in the opposite direction where θ=ϕ while remembering that cos(ϕ)=cos(ϕ) and sin(ϕ)=sin(ϕ), then we have:

(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))=(1000cos(ϕyz)sin(ϕyz)0sin(ϕyz)cos(ϕyz))=(1000cos(ϕyz)sin(ϕyz)0sin(ϕyz)cos(ϕyz))(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))=(cos(ϕxz)0sin(ϕxz)010sin(ϕxz)0cos(ϕxz))=(cos(ϕxz)0sin(ϕxz)010sin(ϕxz)0cos(ϕxz))(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)=(cos(ϕxy)sin(ϕxy)0sin(ϕxy)cos(ϕxy)0001)=(cos(ϕxy)sin(ϕxy)0sin(ϕxy)cos(ϕxy)0001)

We see that each inverse amounts to just rotating in the opposite direction. In other words, since cos(θ)=cos(θ) and sin(θ)=sin(θ) implies that cos(θ)=cos(θ) and sin(θ)=sin(θ) , we have:

(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1=(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))=(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))1=(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))=(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)1=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)

Now, let’s use those inverse Givens Rotation matrices to rotate a column vector (x,y,z) in those opposite directions back to the x-axis so that we get the column vector (r,0,0).

First, we’ll start by using all the Givens Rotation matrices in our established order … and get rid of the ones that don’t matter here:

(xyz)=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1(r00)(xyz)=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2((1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1(r00))(xyz)=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(r00)

Next, remembering that the inverse of a rotation matrix is its transpose, then we have:

(xyz)=(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(r00)(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)1Inverse of 3(xyz)=(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2(r00)(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))1Inverse of 2(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)1Inverse of 3(xyz)=(r00)(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))Inverse of 2(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3(xyz)=(r00)

Keeping in mind that cos(θ)=cos(θ) and sin(θ)=sin(θ), we have:

(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))Inverse of 2(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3(xyz)=(r00)(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))Inverse of 2(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3(xyz)=(r00)(cos((θxz))0sin((θxz))010sin((θxz))0cos((θxz)))2 for θxz(cos((θxy))sin((θxy))0sin((θxy))cos((θxy))0001)3 for θxy(xyz)=(r00)

Since θ=ϕ implies θ=ϕ, we also have:

(cos((θxz))0sin((θxz))010sin((θxz))0cos((θxz)))2 for θxz(cos((θxy))sin((θxy))0sin((θxy))cos((θxy))0001)3 for θxy(xyz)=(r00)(cos(ϕxz)0sin(ϕxz)010sin(ϕxz)0cos(ϕxz))2 for ϕxz(cos(ϕxy)sin(ϕxy)0sin(ϕxy)cos(ϕxy)0001)3 for ϕxy(xyz)=(r00)

In other words, given a column vector (x,y,z), we can rotate that vector back to the x-axis by applying Givens Rotation matrices in the opposite order using the opposite angles. Instead of the following:

 

x

y

z

x

 

xy

xz

y

 

 

yz

z

 

 

 

 

 

x

y

z

x

 

3

2

y

 

 

1

z

 

 

 

 

repeated again with subscripts to keep things clear:

 

x

y

z

x

 

3forward

2forward

y

 

 

1forward

z

 

 

 

 

we now have the following:

 

x

y

z

x

 

xy

xz

y

 

 

yz

z

 

 

 

 

 

x

y

z

x

 

1backward

2backward

y

 

 

3backward

z

 

 

 

 

In terms of this new backward ordering and keeping in mind that ϕ=θ, we now have the following:

(1000cos(ϕyz)sin(ϕyz)0sin(ϕyz)cos(ϕyz))3backward for ϕyz(cos(ϕxz)0sin(ϕxz)010sin(ϕxz)0cos(ϕxz))2backward for ϕxz(cos(ϕxy)sin(ϕxy)0sin(ϕxy)cos(ϕxy)0001)1backward for ϕxy(xyz)=(r00)(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))3backward for θyz(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2backward for θxz(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)1backward for θxy(xyz)=(r00)(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))1forward for θyz(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))2forward for θxz(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)3forward for θxy(xyz)=(r00)(1000cos(θyz)sin(θyz)0sin(θyz)cos(θyz))Inverse of 1forward for θyz(cos(θxz)0sin(θxz)010sin(θxz)0cos(θxz))Inverse of 2forward for θxz(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3forward for θxy(xyz)=(r00)(cos(θxz)0sin(θxz)sin(θxz)sin(θyz)cos(θyz)cos(θxz)sin(θyz)sin(θxz)cos(θyz)sin(θyz)cos(θxz)cos(θyz))(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3forward for θxy(xyz)=(r00)(cos(θxz)0sin(θxz)sin(θxz)sin(θyz)cos(θyz)cos(θxz)sin(θyz)sin(θxz)cos(θyz)sin(θyz)cos(θxz)cos(θyz))(cos(θxy)sin(θxy)0sin(θxy)cos(θxy)0001)Inverse of 3forward for θxy(xyz)=(r00)

So, we have:

(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)cos(θxy)sin(θxz)sin(θyz)sin(θxy)cos(θyz)sin(θxy)sin(θxz)sin(θyz)+cos(θxy)cos(θyz)cos(θxz)sin(θyz)cos(θxy)sin(θxz)cos(θyz)+sin(θxy)sin(θyz)sin(θxy)sin(θxz)cos(θyz)cos(θxy)sin(θyz)cos(θxz)cos(θyz))(xyz)=(r00)

Given r=x2+y2+z2, we choose θxy=arctan(yx), θxz=arctan(zx2+y2), and θyz=0.

After applying θyz=0, we have:

(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)cos(θxy)sin(θxz)sin(θyz)sin(θxy)cos(θyz)sin(θxy)sin(θxz)sin(θyz)+cos(θxy)cos(θyz)cos(θxz)sin(θyz)cos(θxy)sin(θxz)cos(θyz)+sin(θxy)sin(θyz)sin(θxy)sin(θxz)cos(θyz)cos(θxy)sin(θyz)cos(θxz)cos(θyz))(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)cos(θxy)sin(θxz)sin(0)sin(θxy)cos(0)sin(θxy)sin(θxz)sin(0)+cos(θxy)cos(0)cos(θxz)sin(0)cos(θxy)sin(θxz)cos(0)+sin(θxy)sin(0)sin(θxy)sin(θxz)cos(0)cos(θxy)sin(0)cos(θxz)cos(0))(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)cos(θxy)sin(θxz)(0)sin(θxy)(1)sin(θxy)sin(θxz)(0)+cos(θxy)(1)cos(θxz)(0)cos(θxy)sin(θxz)(1)+sin(θxy)(0)sin(θxy)sin(θxz)(1)cos(θxy)(0)cos(θxz)(1))(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)sin(θxy)cos(θxy)0cos(θxy)sin(θxz)sin(θxy)sin(θxz)cos(θxz))

Then after applying θxy=arctan(yx) and θxz=arctan(zx2+y2), since cos(arctan(yx))=xx2+y2, sin(arctan(yx))=yx2+y2, cos(arctan(zx2+y2))=x2+y2x2+y2+z2, and sin(arctan(zx2+y2))=zx2+y2+z2, we have:

(cos(θxy)cos(θxz)sin(θxy)cos(θxz)sin(θxz)sin(θxy)cos(θxy)0cos(θxy)sin(θxz)sin(θxy)sin(θxz)cos(θxz))(cos(arctan(yx))cos(arctan(zx2+y2))sin(arctan(yx))cos(arctan(zx2+y2))sin(arctan(zx2+y2))sin(arctan(yx))cos(arctan(yx))0cos(arctan(yx))sin(arctan(zx2+y2))sin(arctan(yx))sin(arctan(zx2+y2))cos(arctan(zx2+y2)))((xx2+y2)(x2+y2x2+y2+z2)(yx2+y2)(x2+y2x2+y2+z2)(zx2+y2+z2)(yx2+y2)(xx2+y2)0(xx2+y2)(zx2+y2+z2)(yx2+y2)(zx2+y2+z2)(x2+y2x2+y2+z2))(xx2+y2+z2yx2+y2+z2zx2+y2+z2yx2+y2xx2+y20xzx2+y2x2+y2+z2yzx2+y2x2+y2+z2x2+y2x2+y2+z2)

Therefore, since r=x2+y2+z2, we have:

(xx2+y2+z2yx2+y2+z2zx2+y2+z2yx2+y2xx2+y20xzx2+y2x2+y2+z2yzx2+y2x2+y2+z2x2+y2x2+y2+z2)(xyz)=(r00)(x2x2+y2+z2+y2x2+y2+z2+z2x2+y2+z2xyx2+y2+xyx2+y2+0x2zx2+y2x2+y2+z2y2zx2+y2x2+y2+z2+(x2+y2)zx2+y2+z2)=(r00)(x2+y2+z2x2+y2+z20x2zy2z+(x2+y2)zx2+y2x2+y2+z2)=(r00)(x2+y2+z20x2zy2z+x2z+y2zx2+y2x2+y2+z2)=(r00)(x2+y2+z200)=(r00)(r00)=(r00)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.