Standard matrix of a rotation on a vector in $mathbb{R}^3$?












2












$begingroup$


$begin{pmatrix}cos alpha & -sin alpha \ sin alpha & cos alphaend{pmatrix}$ defines a rotation of any angle on a vector in $mathbb{R}^2$, but how does it work in $mathbb{R}^3$ ? (I'd imagine this idea isn't very useful in dimensions other than 2 and 3)










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
    $endgroup$
    – greelious
    Dec 15 '18 at 2:45












  • $begingroup$
    Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
    $endgroup$
    – apnorton
    Dec 15 '18 at 2:59










  • $begingroup$
    Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
    $endgroup$
    – amd
    Dec 15 '18 at 5:03
















2












$begingroup$


$begin{pmatrix}cos alpha & -sin alpha \ sin alpha & cos alphaend{pmatrix}$ defines a rotation of any angle on a vector in $mathbb{R}^2$, but how does it work in $mathbb{R}^3$ ? (I'd imagine this idea isn't very useful in dimensions other than 2 and 3)










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
    $endgroup$
    – greelious
    Dec 15 '18 at 2:45












  • $begingroup$
    Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
    $endgroup$
    – apnorton
    Dec 15 '18 at 2:59










  • $begingroup$
    Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
    $endgroup$
    – amd
    Dec 15 '18 at 5:03














2












2








2





$begingroup$


$begin{pmatrix}cos alpha & -sin alpha \ sin alpha & cos alphaend{pmatrix}$ defines a rotation of any angle on a vector in $mathbb{R}^2$, but how does it work in $mathbb{R}^3$ ? (I'd imagine this idea isn't very useful in dimensions other than 2 and 3)










share|cite|improve this question











$endgroup$




$begin{pmatrix}cos alpha & -sin alpha \ sin alpha & cos alphaend{pmatrix}$ defines a rotation of any angle on a vector in $mathbb{R}^2$, but how does it work in $mathbb{R}^3$ ? (I'd imagine this idea isn't very useful in dimensions other than 2 and 3)







linear-algebra matrices rotations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 15 '18 at 12:06









amWhy

1




1










asked Dec 15 '18 at 2:43









James RonaldJames Ronald

1257




1257








  • 1




    $begingroup$
    There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
    $endgroup$
    – greelious
    Dec 15 '18 at 2:45












  • $begingroup$
    Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
    $endgroup$
    – apnorton
    Dec 15 '18 at 2:59










  • $begingroup$
    Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
    $endgroup$
    – amd
    Dec 15 '18 at 5:03














  • 1




    $begingroup$
    There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
    $endgroup$
    – greelious
    Dec 15 '18 at 2:45












  • $begingroup$
    Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
    $endgroup$
    – apnorton
    Dec 15 '18 at 2:59










  • $begingroup$
    Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
    $endgroup$
    – amd
    Dec 15 '18 at 5:03








1




1




$begingroup$
There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
$endgroup$
– greelious
Dec 15 '18 at 2:45






$begingroup$
There are three matrices; one for rotations about each axis: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
$endgroup$
– greelious
Dec 15 '18 at 2:45














$begingroup$
Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
$endgroup$
– apnorton
Dec 15 '18 at 2:59




$begingroup$
Welcome to Math.SE! Please include some further context for this question, such as your attempt, specific thoughts about the prompt, and/or where you got stuck. Otherwise, the question will likely be closed as off-topic. Thanks!
$endgroup$
– apnorton
Dec 15 '18 at 2:59












$begingroup$
Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
$endgroup$
– amd
Dec 15 '18 at 5:03




$begingroup$
Besides an angle, you also need to pick an axis for the rotation. In higher dimensions, there might not be a unique rotation axis, but a simple rotation like this does take place in an identifiable plane.
$endgroup$
– amd
Dec 15 '18 at 5:03










2 Answers
2






active

oldest

votes


















2












$begingroup$

There is another very efficient answer : by using matrix exponentials.



This is best understood by analogy with the fact that, identifying $mathbb{R}^2$ with $mathbb{C}$, your transformation :



$$begin{pmatrix}x'\y'end{pmatrix}=begin{pmatrix}cos theta & -sin theta \ sin theta & cos thetaend{pmatrix}begin{pmatrix}x\yend{pmatrix}$$



becomes, with complex notations :



$$x'+iy'=cos(theta)x-sin(theta)y + i(sin(theta)x+cos(theta)y)$$



which can be simplified into



$$x'+iy'=(cos(theta)+isin(theta))(x+iy)$$



Said otherwise : $$z'=e^{itheta}z. tag{1}$$



It happens that expression (1) has a nice generalization in $mathbb{R^3}$ under an analogous form $X'=exp(...)X$ as follows:




The matrix of the 3D rotation with angle $theta$ around (any) unit vector $N=[a,b,c]$ is given by :




$$exp(theta [N]_{times}),tag{2}$$



with the skew-symmetric matrix :



$$ [N]_{times} := begin{pmatrix}0&-c&b\c&0&-a\-b&a&0end{pmatrix} tag{3}.$$



Most languages have a built-in implementation of the exponential of a matrix. Let us take an example with Matlab : rotation with angle $2pi/3$ around the axis defined by the nonunitary vector $U=(1,1,1)$ is obtained in this way :



U=[1,1,1];
U=U/norm(U);
a=U(1);b=U(2);c=U(3);
V=[0,-c,b;
c,0,-a;
-b,a,0];
R=expm((2*pi/3)*V); % (expm for exp-matricial)
% giving the result :
% 0 0 1
% 1 0 0
% 0 1 0


as can be awaited (canonical axes $e_1 to e_2 to e_3 (to e_1)$).



Let us give some precision about :




  • The exponential of a matrix $M$, which is defined by the same series expansion as the ordinary exponential :


$$exp(M)=I+M+frac12M^2+cdots+frac{1}{n!}M^n+cdots tag{4}$$




  • The matrix $[N]_{times}$ defined in (3) which will no longer look mysterious when it is associated with the cross product under the following form :


$$Z=[N]_{times}Y = N times Y$$



as can be verified with the following explicit computation :
$$begin{pmatrix}u\v\wend{pmatrix}=begin{pmatrix} 0&-c& b\ c&0&-a\-b& a&0end{pmatrix}begin{pmatrix}x\y\zend{pmatrix}=begin{pmatrix}bz-cy\cx-az\ay-bxend{pmatrix}$$



A connection with Rodrigues formula (given by @Artic tern) is straightforward by decomposing even and odd terms in (3), then taking into account the fact that $([N]_{times})^3=-[N]_{times}$: see for example : https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation . See also an answer of mine :{https://math.stackexchange.com/q/1917093}.



Final remark : this expression of a 3D rotation is made for computers, of course. But nowadays very few people compute 3D rotations by hand...






share|cite|improve this answer











$endgroup$





















    0












    $begingroup$

    Let ${mathbf{u},mathbf{v},mathbf{w}}$ be an oriented orthonormal basis and let $R$ be the rotation around $mathbf{w}$ by $theta$.



    Since the cross product $mathbf{w}timesmathbf{x}$ has the effect of projecting $mathbf{x}$ onto the $mathbf{uv}$-plane and rotating by a right angle, the combination $(costheta)mathbf{x}+(sintheta)mathbf{w}timesmathbf{x}$ is almost $R(mathbf{x})$, but with the $mathbf{w}$-component of $mathbf{x}$ scaled by $costheta$; to compensate, add in $mathbf{w}$ scaled by $(1-costheta)$ times the $mathbf{w}$-component of $mathbf{x}$.



    This yields the Rodrigues' rotation formula



    $$ R(mathbf{x})=(costheta)mathbf{x}+(sintheta)(mathbf{w}timesmathbf{x})+(1-costheta)(mathbf{w}cdotmathbf{x})mathbf{w}. $$



    Feel free to write out an explicit formula from this.



    Because the $2$-sphere $S^2$ parametrizes the possible "axes" $mathbf{w}$ and $theta$ fills in the rest of the rotation $R$, the group of all $3times3$ rotation matrices is $(2+1)=3$-dimensional.





    An orthogonal matrix is one which satisfies any of the following:





    • $|Amathbf{x}|=|mathbf{x}|$ for all vectors $mathbf{x}$ (i.e. preserves lengths)


    • $(Amathbf{x})cdot(Amathbf{y})=mathbf{x}cdotmathbf{y}$ for all vectors $mathbf{x},mathbf{y}$ (preserves lengths and angles)


    • $A^TA$ is the identity matrix $I$

    • The columns of $A$ are orthonormal vectors

    • The rows of $A$ are orthonormal vectors


    The orthogonal matrices with determinant $-1$ reverse the orientation of space, such as reflections or the inversion-about-the-origin matrix $-I$. The orthogonal matrices with determinant $+1$ preserve the orientation of space and are called special orthogonal - these are precisely the $3times 3$ rotation matrices.



    So to form any rotation matrix $R$, you can pick the first column vector to be any unit vector $mathbf{u}$ (essentially a choice of where you want $R$ to send $mathbf{e}_1$), in the second column you can pick any unit vector $mathbf{v}$ orthogonal to the first vector $mathbf{v}$ (a choice of where $R$ sends $mathbf{e}_2$), and finally $mathbf{w}=mathbf{u}timesmathbf{v}$ is the unique unit vector which makes ${mathbf{u},mathbf{v},mathbf{w}}$ a correctly-oriented orthonormal basis (and $mathbf{w}$ is a choice of where to send $mathbf{e}_3$).



    Since $mathbf{u}$ is chosen from $S^2$ and $mathbf{v}$ is chosen from the circle's worth of perpendicular unit vectors, the $3times 3$ rotation group we can again conclude is $(2+1)=3$-dimensional.



    (Note the vectors $mathbf{u},mathbf{v},mathbf{w}$ represent different things in these two descriptions.)






    share|cite|improve this answer









    $endgroup$













      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "69"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3040112%2fstandard-matrix-of-a-rotation-on-a-vector-in-mathbbr3%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$

      There is another very efficient answer : by using matrix exponentials.



      This is best understood by analogy with the fact that, identifying $mathbb{R}^2$ with $mathbb{C}$, your transformation :



      $$begin{pmatrix}x'\y'end{pmatrix}=begin{pmatrix}cos theta & -sin theta \ sin theta & cos thetaend{pmatrix}begin{pmatrix}x\yend{pmatrix}$$



      becomes, with complex notations :



      $$x'+iy'=cos(theta)x-sin(theta)y + i(sin(theta)x+cos(theta)y)$$



      which can be simplified into



      $$x'+iy'=(cos(theta)+isin(theta))(x+iy)$$



      Said otherwise : $$z'=e^{itheta}z. tag{1}$$



      It happens that expression (1) has a nice generalization in $mathbb{R^3}$ under an analogous form $X'=exp(...)X$ as follows:




      The matrix of the 3D rotation with angle $theta$ around (any) unit vector $N=[a,b,c]$ is given by :




      $$exp(theta [N]_{times}),tag{2}$$



      with the skew-symmetric matrix :



      $$ [N]_{times} := begin{pmatrix}0&-c&b\c&0&-a\-b&a&0end{pmatrix} tag{3}.$$



      Most languages have a built-in implementation of the exponential of a matrix. Let us take an example with Matlab : rotation with angle $2pi/3$ around the axis defined by the nonunitary vector $U=(1,1,1)$ is obtained in this way :



      U=[1,1,1];
      U=U/norm(U);
      a=U(1);b=U(2);c=U(3);
      V=[0,-c,b;
      c,0,-a;
      -b,a,0];
      R=expm((2*pi/3)*V); % (expm for exp-matricial)
      % giving the result :
      % 0 0 1
      % 1 0 0
      % 0 1 0


      as can be awaited (canonical axes $e_1 to e_2 to e_3 (to e_1)$).



      Let us give some precision about :




      • The exponential of a matrix $M$, which is defined by the same series expansion as the ordinary exponential :


      $$exp(M)=I+M+frac12M^2+cdots+frac{1}{n!}M^n+cdots tag{4}$$




      • The matrix $[N]_{times}$ defined in (3) which will no longer look mysterious when it is associated with the cross product under the following form :


      $$Z=[N]_{times}Y = N times Y$$



      as can be verified with the following explicit computation :
      $$begin{pmatrix}u\v\wend{pmatrix}=begin{pmatrix} 0&-c& b\ c&0&-a\-b& a&0end{pmatrix}begin{pmatrix}x\y\zend{pmatrix}=begin{pmatrix}bz-cy\cx-az\ay-bxend{pmatrix}$$



      A connection with Rodrigues formula (given by @Artic tern) is straightforward by decomposing even and odd terms in (3), then taking into account the fact that $([N]_{times})^3=-[N]_{times}$: see for example : https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation . See also an answer of mine :{https://math.stackexchange.com/q/1917093}.



      Final remark : this expression of a 3D rotation is made for computers, of course. But nowadays very few people compute 3D rotations by hand...






      share|cite|improve this answer











      $endgroup$


















        2












        $begingroup$

        There is another very efficient answer : by using matrix exponentials.



        This is best understood by analogy with the fact that, identifying $mathbb{R}^2$ with $mathbb{C}$, your transformation :



        $$begin{pmatrix}x'\y'end{pmatrix}=begin{pmatrix}cos theta & -sin theta \ sin theta & cos thetaend{pmatrix}begin{pmatrix}x\yend{pmatrix}$$



        becomes, with complex notations :



        $$x'+iy'=cos(theta)x-sin(theta)y + i(sin(theta)x+cos(theta)y)$$



        which can be simplified into



        $$x'+iy'=(cos(theta)+isin(theta))(x+iy)$$



        Said otherwise : $$z'=e^{itheta}z. tag{1}$$



        It happens that expression (1) has a nice generalization in $mathbb{R^3}$ under an analogous form $X'=exp(...)X$ as follows:




        The matrix of the 3D rotation with angle $theta$ around (any) unit vector $N=[a,b,c]$ is given by :




        $$exp(theta [N]_{times}),tag{2}$$



        with the skew-symmetric matrix :



        $$ [N]_{times} := begin{pmatrix}0&-c&b\c&0&-a\-b&a&0end{pmatrix} tag{3}.$$



        Most languages have a built-in implementation of the exponential of a matrix. Let us take an example with Matlab : rotation with angle $2pi/3$ around the axis defined by the nonunitary vector $U=(1,1,1)$ is obtained in this way :



        U=[1,1,1];
        U=U/norm(U);
        a=U(1);b=U(2);c=U(3);
        V=[0,-c,b;
        c,0,-a;
        -b,a,0];
        R=expm((2*pi/3)*V); % (expm for exp-matricial)
        % giving the result :
        % 0 0 1
        % 1 0 0
        % 0 1 0


        as can be awaited (canonical axes $e_1 to e_2 to e_3 (to e_1)$).



        Let us give some precision about :




        • The exponential of a matrix $M$, which is defined by the same series expansion as the ordinary exponential :


        $$exp(M)=I+M+frac12M^2+cdots+frac{1}{n!}M^n+cdots tag{4}$$




        • The matrix $[N]_{times}$ defined in (3) which will no longer look mysterious when it is associated with the cross product under the following form :


        $$Z=[N]_{times}Y = N times Y$$



        as can be verified with the following explicit computation :
        $$begin{pmatrix}u\v\wend{pmatrix}=begin{pmatrix} 0&-c& b\ c&0&-a\-b& a&0end{pmatrix}begin{pmatrix}x\y\zend{pmatrix}=begin{pmatrix}bz-cy\cx-az\ay-bxend{pmatrix}$$



        A connection with Rodrigues formula (given by @Artic tern) is straightforward by decomposing even and odd terms in (3), then taking into account the fact that $([N]_{times})^3=-[N]_{times}$: see for example : https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation . See also an answer of mine :{https://math.stackexchange.com/q/1917093}.



        Final remark : this expression of a 3D rotation is made for computers, of course. But nowadays very few people compute 3D rotations by hand...






        share|cite|improve this answer











        $endgroup$
















          2












          2








          2





          $begingroup$

          There is another very efficient answer : by using matrix exponentials.



          This is best understood by analogy with the fact that, identifying $mathbb{R}^2$ with $mathbb{C}$, your transformation :



          $$begin{pmatrix}x'\y'end{pmatrix}=begin{pmatrix}cos theta & -sin theta \ sin theta & cos thetaend{pmatrix}begin{pmatrix}x\yend{pmatrix}$$



          becomes, with complex notations :



          $$x'+iy'=cos(theta)x-sin(theta)y + i(sin(theta)x+cos(theta)y)$$



          which can be simplified into



          $$x'+iy'=(cos(theta)+isin(theta))(x+iy)$$



          Said otherwise : $$z'=e^{itheta}z. tag{1}$$



          It happens that expression (1) has a nice generalization in $mathbb{R^3}$ under an analogous form $X'=exp(...)X$ as follows:




          The matrix of the 3D rotation with angle $theta$ around (any) unit vector $N=[a,b,c]$ is given by :




          $$exp(theta [N]_{times}),tag{2}$$



          with the skew-symmetric matrix :



          $$ [N]_{times} := begin{pmatrix}0&-c&b\c&0&-a\-b&a&0end{pmatrix} tag{3}.$$



          Most languages have a built-in implementation of the exponential of a matrix. Let us take an example with Matlab : rotation with angle $2pi/3$ around the axis defined by the nonunitary vector $U=(1,1,1)$ is obtained in this way :



          U=[1,1,1];
          U=U/norm(U);
          a=U(1);b=U(2);c=U(3);
          V=[0,-c,b;
          c,0,-a;
          -b,a,0];
          R=expm((2*pi/3)*V); % (expm for exp-matricial)
          % giving the result :
          % 0 0 1
          % 1 0 0
          % 0 1 0


          as can be awaited (canonical axes $e_1 to e_2 to e_3 (to e_1)$).



          Let us give some precision about :




          • The exponential of a matrix $M$, which is defined by the same series expansion as the ordinary exponential :


          $$exp(M)=I+M+frac12M^2+cdots+frac{1}{n!}M^n+cdots tag{4}$$




          • The matrix $[N]_{times}$ defined in (3) which will no longer look mysterious when it is associated with the cross product under the following form :


          $$Z=[N]_{times}Y = N times Y$$



          as can be verified with the following explicit computation :
          $$begin{pmatrix}u\v\wend{pmatrix}=begin{pmatrix} 0&-c& b\ c&0&-a\-b& a&0end{pmatrix}begin{pmatrix}x\y\zend{pmatrix}=begin{pmatrix}bz-cy\cx-az\ay-bxend{pmatrix}$$



          A connection with Rodrigues formula (given by @Artic tern) is straightforward by decomposing even and odd terms in (3), then taking into account the fact that $([N]_{times})^3=-[N]_{times}$: see for example : https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation . See also an answer of mine :{https://math.stackexchange.com/q/1917093}.



          Final remark : this expression of a 3D rotation is made for computers, of course. But nowadays very few people compute 3D rotations by hand...






          share|cite|improve this answer











          $endgroup$



          There is another very efficient answer : by using matrix exponentials.



          This is best understood by analogy with the fact that, identifying $mathbb{R}^2$ with $mathbb{C}$, your transformation :



          $$begin{pmatrix}x'\y'end{pmatrix}=begin{pmatrix}cos theta & -sin theta \ sin theta & cos thetaend{pmatrix}begin{pmatrix}x\yend{pmatrix}$$



          becomes, with complex notations :



          $$x'+iy'=cos(theta)x-sin(theta)y + i(sin(theta)x+cos(theta)y)$$



          which can be simplified into



          $$x'+iy'=(cos(theta)+isin(theta))(x+iy)$$



          Said otherwise : $$z'=e^{itheta}z. tag{1}$$



          It happens that expression (1) has a nice generalization in $mathbb{R^3}$ under an analogous form $X'=exp(...)X$ as follows:




          The matrix of the 3D rotation with angle $theta$ around (any) unit vector $N=[a,b,c]$ is given by :




          $$exp(theta [N]_{times}),tag{2}$$



          with the skew-symmetric matrix :



          $$ [N]_{times} := begin{pmatrix}0&-c&b\c&0&-a\-b&a&0end{pmatrix} tag{3}.$$



          Most languages have a built-in implementation of the exponential of a matrix. Let us take an example with Matlab : rotation with angle $2pi/3$ around the axis defined by the nonunitary vector $U=(1,1,1)$ is obtained in this way :



          U=[1,1,1];
          U=U/norm(U);
          a=U(1);b=U(2);c=U(3);
          V=[0,-c,b;
          c,0,-a;
          -b,a,0];
          R=expm((2*pi/3)*V); % (expm for exp-matricial)
          % giving the result :
          % 0 0 1
          % 1 0 0
          % 0 1 0


          as can be awaited (canonical axes $e_1 to e_2 to e_3 (to e_1)$).



          Let us give some precision about :




          • The exponential of a matrix $M$, which is defined by the same series expansion as the ordinary exponential :


          $$exp(M)=I+M+frac12M^2+cdots+frac{1}{n!}M^n+cdots tag{4}$$




          • The matrix $[N]_{times}$ defined in (3) which will no longer look mysterious when it is associated with the cross product under the following form :


          $$Z=[N]_{times}Y = N times Y$$



          as can be verified with the following explicit computation :
          $$begin{pmatrix}u\v\wend{pmatrix}=begin{pmatrix} 0&-c& b\ c&0&-a\-b& a&0end{pmatrix}begin{pmatrix}x\y\zend{pmatrix}=begin{pmatrix}bz-cy\cx-az\ay-bxend{pmatrix}$$



          A connection with Rodrigues formula (given by @Artic tern) is straightforward by decomposing even and odd terms in (3), then taking into account the fact that $([N]_{times})^3=-[N]_{times}$: see for example : https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation . See also an answer of mine :{https://math.stackexchange.com/q/1917093}.



          Final remark : this expression of a 3D rotation is made for computers, of course. But nowadays very few people compute 3D rotations by hand...







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Dec 15 '18 at 14:37

























          answered Dec 15 '18 at 5:12









          Jean MarieJean Marie

          29.9k42051




          29.9k42051























              0












              $begingroup$

              Let ${mathbf{u},mathbf{v},mathbf{w}}$ be an oriented orthonormal basis and let $R$ be the rotation around $mathbf{w}$ by $theta$.



              Since the cross product $mathbf{w}timesmathbf{x}$ has the effect of projecting $mathbf{x}$ onto the $mathbf{uv}$-plane and rotating by a right angle, the combination $(costheta)mathbf{x}+(sintheta)mathbf{w}timesmathbf{x}$ is almost $R(mathbf{x})$, but with the $mathbf{w}$-component of $mathbf{x}$ scaled by $costheta$; to compensate, add in $mathbf{w}$ scaled by $(1-costheta)$ times the $mathbf{w}$-component of $mathbf{x}$.



              This yields the Rodrigues' rotation formula



              $$ R(mathbf{x})=(costheta)mathbf{x}+(sintheta)(mathbf{w}timesmathbf{x})+(1-costheta)(mathbf{w}cdotmathbf{x})mathbf{w}. $$



              Feel free to write out an explicit formula from this.



              Because the $2$-sphere $S^2$ parametrizes the possible "axes" $mathbf{w}$ and $theta$ fills in the rest of the rotation $R$, the group of all $3times3$ rotation matrices is $(2+1)=3$-dimensional.





              An orthogonal matrix is one which satisfies any of the following:





              • $|Amathbf{x}|=|mathbf{x}|$ for all vectors $mathbf{x}$ (i.e. preserves lengths)


              • $(Amathbf{x})cdot(Amathbf{y})=mathbf{x}cdotmathbf{y}$ for all vectors $mathbf{x},mathbf{y}$ (preserves lengths and angles)


              • $A^TA$ is the identity matrix $I$

              • The columns of $A$ are orthonormal vectors

              • The rows of $A$ are orthonormal vectors


              The orthogonal matrices with determinant $-1$ reverse the orientation of space, such as reflections or the inversion-about-the-origin matrix $-I$. The orthogonal matrices with determinant $+1$ preserve the orientation of space and are called special orthogonal - these are precisely the $3times 3$ rotation matrices.



              So to form any rotation matrix $R$, you can pick the first column vector to be any unit vector $mathbf{u}$ (essentially a choice of where you want $R$ to send $mathbf{e}_1$), in the second column you can pick any unit vector $mathbf{v}$ orthogonal to the first vector $mathbf{v}$ (a choice of where $R$ sends $mathbf{e}_2$), and finally $mathbf{w}=mathbf{u}timesmathbf{v}$ is the unique unit vector which makes ${mathbf{u},mathbf{v},mathbf{w}}$ a correctly-oriented orthonormal basis (and $mathbf{w}$ is a choice of where to send $mathbf{e}_3$).



              Since $mathbf{u}$ is chosen from $S^2$ and $mathbf{v}$ is chosen from the circle's worth of perpendicular unit vectors, the $3times 3$ rotation group we can again conclude is $(2+1)=3$-dimensional.



              (Note the vectors $mathbf{u},mathbf{v},mathbf{w}$ represent different things in these two descriptions.)






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                Let ${mathbf{u},mathbf{v},mathbf{w}}$ be an oriented orthonormal basis and let $R$ be the rotation around $mathbf{w}$ by $theta$.



                Since the cross product $mathbf{w}timesmathbf{x}$ has the effect of projecting $mathbf{x}$ onto the $mathbf{uv}$-plane and rotating by a right angle, the combination $(costheta)mathbf{x}+(sintheta)mathbf{w}timesmathbf{x}$ is almost $R(mathbf{x})$, but with the $mathbf{w}$-component of $mathbf{x}$ scaled by $costheta$; to compensate, add in $mathbf{w}$ scaled by $(1-costheta)$ times the $mathbf{w}$-component of $mathbf{x}$.



                This yields the Rodrigues' rotation formula



                $$ R(mathbf{x})=(costheta)mathbf{x}+(sintheta)(mathbf{w}timesmathbf{x})+(1-costheta)(mathbf{w}cdotmathbf{x})mathbf{w}. $$



                Feel free to write out an explicit formula from this.



                Because the $2$-sphere $S^2$ parametrizes the possible "axes" $mathbf{w}$ and $theta$ fills in the rest of the rotation $R$, the group of all $3times3$ rotation matrices is $(2+1)=3$-dimensional.





                An orthogonal matrix is one which satisfies any of the following:





                • $|Amathbf{x}|=|mathbf{x}|$ for all vectors $mathbf{x}$ (i.e. preserves lengths)


                • $(Amathbf{x})cdot(Amathbf{y})=mathbf{x}cdotmathbf{y}$ for all vectors $mathbf{x},mathbf{y}$ (preserves lengths and angles)


                • $A^TA$ is the identity matrix $I$

                • The columns of $A$ are orthonormal vectors

                • The rows of $A$ are orthonormal vectors


                The orthogonal matrices with determinant $-1$ reverse the orientation of space, such as reflections or the inversion-about-the-origin matrix $-I$. The orthogonal matrices with determinant $+1$ preserve the orientation of space and are called special orthogonal - these are precisely the $3times 3$ rotation matrices.



                So to form any rotation matrix $R$, you can pick the first column vector to be any unit vector $mathbf{u}$ (essentially a choice of where you want $R$ to send $mathbf{e}_1$), in the second column you can pick any unit vector $mathbf{v}$ orthogonal to the first vector $mathbf{v}$ (a choice of where $R$ sends $mathbf{e}_2$), and finally $mathbf{w}=mathbf{u}timesmathbf{v}$ is the unique unit vector which makes ${mathbf{u},mathbf{v},mathbf{w}}$ a correctly-oriented orthonormal basis (and $mathbf{w}$ is a choice of where to send $mathbf{e}_3$).



                Since $mathbf{u}$ is chosen from $S^2$ and $mathbf{v}$ is chosen from the circle's worth of perpendicular unit vectors, the $3times 3$ rotation group we can again conclude is $(2+1)=3$-dimensional.



                (Note the vectors $mathbf{u},mathbf{v},mathbf{w}$ represent different things in these two descriptions.)






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  Let ${mathbf{u},mathbf{v},mathbf{w}}$ be an oriented orthonormal basis and let $R$ be the rotation around $mathbf{w}$ by $theta$.



                  Since the cross product $mathbf{w}timesmathbf{x}$ has the effect of projecting $mathbf{x}$ onto the $mathbf{uv}$-plane and rotating by a right angle, the combination $(costheta)mathbf{x}+(sintheta)mathbf{w}timesmathbf{x}$ is almost $R(mathbf{x})$, but with the $mathbf{w}$-component of $mathbf{x}$ scaled by $costheta$; to compensate, add in $mathbf{w}$ scaled by $(1-costheta)$ times the $mathbf{w}$-component of $mathbf{x}$.



                  This yields the Rodrigues' rotation formula



                  $$ R(mathbf{x})=(costheta)mathbf{x}+(sintheta)(mathbf{w}timesmathbf{x})+(1-costheta)(mathbf{w}cdotmathbf{x})mathbf{w}. $$



                  Feel free to write out an explicit formula from this.



                  Because the $2$-sphere $S^2$ parametrizes the possible "axes" $mathbf{w}$ and $theta$ fills in the rest of the rotation $R$, the group of all $3times3$ rotation matrices is $(2+1)=3$-dimensional.





                  An orthogonal matrix is one which satisfies any of the following:





                  • $|Amathbf{x}|=|mathbf{x}|$ for all vectors $mathbf{x}$ (i.e. preserves lengths)


                  • $(Amathbf{x})cdot(Amathbf{y})=mathbf{x}cdotmathbf{y}$ for all vectors $mathbf{x},mathbf{y}$ (preserves lengths and angles)


                  • $A^TA$ is the identity matrix $I$

                  • The columns of $A$ are orthonormal vectors

                  • The rows of $A$ are orthonormal vectors


                  The orthogonal matrices with determinant $-1$ reverse the orientation of space, such as reflections or the inversion-about-the-origin matrix $-I$. The orthogonal matrices with determinant $+1$ preserve the orientation of space and are called special orthogonal - these are precisely the $3times 3$ rotation matrices.



                  So to form any rotation matrix $R$, you can pick the first column vector to be any unit vector $mathbf{u}$ (essentially a choice of where you want $R$ to send $mathbf{e}_1$), in the second column you can pick any unit vector $mathbf{v}$ orthogonal to the first vector $mathbf{v}$ (a choice of where $R$ sends $mathbf{e}_2$), and finally $mathbf{w}=mathbf{u}timesmathbf{v}$ is the unique unit vector which makes ${mathbf{u},mathbf{v},mathbf{w}}$ a correctly-oriented orthonormal basis (and $mathbf{w}$ is a choice of where to send $mathbf{e}_3$).



                  Since $mathbf{u}$ is chosen from $S^2$ and $mathbf{v}$ is chosen from the circle's worth of perpendicular unit vectors, the $3times 3$ rotation group we can again conclude is $(2+1)=3$-dimensional.



                  (Note the vectors $mathbf{u},mathbf{v},mathbf{w}$ represent different things in these two descriptions.)






                  share|cite|improve this answer









                  $endgroup$



                  Let ${mathbf{u},mathbf{v},mathbf{w}}$ be an oriented orthonormal basis and let $R$ be the rotation around $mathbf{w}$ by $theta$.



                  Since the cross product $mathbf{w}timesmathbf{x}$ has the effect of projecting $mathbf{x}$ onto the $mathbf{uv}$-plane and rotating by a right angle, the combination $(costheta)mathbf{x}+(sintheta)mathbf{w}timesmathbf{x}$ is almost $R(mathbf{x})$, but with the $mathbf{w}$-component of $mathbf{x}$ scaled by $costheta$; to compensate, add in $mathbf{w}$ scaled by $(1-costheta)$ times the $mathbf{w}$-component of $mathbf{x}$.



                  This yields the Rodrigues' rotation formula



                  $$ R(mathbf{x})=(costheta)mathbf{x}+(sintheta)(mathbf{w}timesmathbf{x})+(1-costheta)(mathbf{w}cdotmathbf{x})mathbf{w}. $$



                  Feel free to write out an explicit formula from this.



                  Because the $2$-sphere $S^2$ parametrizes the possible "axes" $mathbf{w}$ and $theta$ fills in the rest of the rotation $R$, the group of all $3times3$ rotation matrices is $(2+1)=3$-dimensional.





                  An orthogonal matrix is one which satisfies any of the following:





                  • $|Amathbf{x}|=|mathbf{x}|$ for all vectors $mathbf{x}$ (i.e. preserves lengths)


                  • $(Amathbf{x})cdot(Amathbf{y})=mathbf{x}cdotmathbf{y}$ for all vectors $mathbf{x},mathbf{y}$ (preserves lengths and angles)


                  • $A^TA$ is the identity matrix $I$

                  • The columns of $A$ are orthonormal vectors

                  • The rows of $A$ are orthonormal vectors


                  The orthogonal matrices with determinant $-1$ reverse the orientation of space, such as reflections or the inversion-about-the-origin matrix $-I$. The orthogonal matrices with determinant $+1$ preserve the orientation of space and are called special orthogonal - these are precisely the $3times 3$ rotation matrices.



                  So to form any rotation matrix $R$, you can pick the first column vector to be any unit vector $mathbf{u}$ (essentially a choice of where you want $R$ to send $mathbf{e}_1$), in the second column you can pick any unit vector $mathbf{v}$ orthogonal to the first vector $mathbf{v}$ (a choice of where $R$ sends $mathbf{e}_2$), and finally $mathbf{w}=mathbf{u}timesmathbf{v}$ is the unique unit vector which makes ${mathbf{u},mathbf{v},mathbf{w}}$ a correctly-oriented orthonormal basis (and $mathbf{w}$ is a choice of where to send $mathbf{e}_3$).



                  Since $mathbf{u}$ is chosen from $S^2$ and $mathbf{v}$ is chosen from the circle's worth of perpendicular unit vectors, the $3times 3$ rotation group we can again conclude is $(2+1)=3$-dimensional.



                  (Note the vectors $mathbf{u},mathbf{v},mathbf{w}$ represent different things in these two descriptions.)







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 15 '18 at 3:49









                  arctic ternarctic tern

                  11.9k31535




                  11.9k31535






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Mathematics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3040112%2fstandard-matrix-of-a-rotation-on-a-vector-in-mathbbr3%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Index of /

                      Tribalistas

                      Várzea Paulista