# Homework Help: Rotation Matrix

1. Sep 9, 2009

### Frillth

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

I need to find a 3x3 rotation matrix that takes a point in regular cartesian space and gives its coordinates in a rotate xyz space. The +z axis runs along the vector [1,1,-1], and the +x axis should be in the xz plane with positive x component.

2. Relevant equations

The rotation matrix can be found by taking the unit basis vectors of x'y'z' space and putting them side by side to form a 3x3 matrix.

3. The attempt at a solution

First, I found the unit basis vector of z', which is [1/sqrt(3), 1/sqrt(3), -1/sqrt(3)]. Now I know that since x' has a basis vector in the xz plane, it has y component 0. setting x (dot) z = 0 gives that x must have unit basis vector [1/sqrt(2), 0, 1/sqrt(2)]. Now I can find y' by doing z (cross) x, which gives the unit basis vector for y` to be: [1/sqrt(6), -2/sqrt(6), -1/sqrt(6)].

Now when I put these into matrix form, I get:

[{1/Sqrt[2], 1/Sqrt[6], 1/Sqrt[3]}, {0, -2/Sqrt[6],
1/Sqrt[3]}, {1/Sqrt[2], -1/Sqrt[6], -1/Sqrt[3]}]

However, if I take this times a vector such as [1, 1, -1] (which should come out to [0, 0, sqrt(3)] in the primed axes), I don't get the correct answer. What am I doing wrong?

Edit: Ugh, sorry. I figured it out. These completely obvious things sometimes slip past me when I'm really tired.

Last edited: Sep 9, 2009