2
$\begingroup$

My linear algebra skills are rusty. I need to write a bunch of computer code to do some matrix operations. For the most part, I've succeeded in doing things on my own, but I'm stuck with one operation.

Given an angle in radians, how could I calculate a 4x4 rotation matrix about the x, y, z axes? I need three matrices.

  • 1
    I don't understand. Do you want to rotate in $4$-dimensional space? If so, "rotation about an axis" has no meaning. If not, what do you mean by a $4\times4$ rotation matrix? Perhaps you mean a matrix for an affine transformation, which includes both rotations and translations? That can be written using a $4\times4$ matrix.2011-10-12
  • 1
    I am not sure about what I need to do yet, but I think "Perhaps you mean a matrix for an affine transformation, which includes both rotations and translations? That can be written using a 4×4 matrix." is what I need. The matrix at the end of the calculation(s) must be 4x4.2011-10-12
  • 1
    Well, it's a bit hard to help you if you don't know what it is you need to do :-). Perhaps take a look at this: http://en.wikipedia.org/wiki/Affine_transformation#Representation. Does that look useful?2011-10-12
  • 0
    I need "the rotation matrix (a 4x4 matrix) about the x,y,z axes respectively by the specified angle in radians" Does that make sense? :)2011-10-12
  • 2
    No, as I wrote, that doesn't make any sense. A rotation matrix about an axis is a $3\times3$ matrix. Even if you were dealing with $4$-dimensional space (which I suspect you aren't), it wouldn't make any sense, because in four dimensions rotations don't have an axis. Can you provide more context? The only sense I can make of it in this form is that someone presupposed the $4\times4$ matrix form for an affine transformation and called the corresponding matrix describing only a rotation a "rotation matrix". But if so, that should be clear from the context.2011-10-12

2 Answers 2