Coordinate/matrix multiplication












0












$begingroup$


If I multiply a 3d coordinate (padded with a 1 to make it a 4x1 matrix) with a transformation matrix, I get a 1x4 matrix which contains my new (transformed) 3d coordinate.



Knowing that matrices must be multiplied in a single "direction", ie, AxB is not the same as BxA... and that the columns of the first matrix define the rows of the resulting matrix (and the rows of the second matrix define the columns of the resulting matrix), does this mean that the multiplication must always be this way around...



[X][Y][Z][1] * [.][.][.][.] = [new X]
[.][.][.][.] [new Y]
[.][.][.][.] [new Z]
[.][.][.][.] [.]


...and therefore you ALWAYS multiply a matrix by a coordinate and not a coordinate by a matrix?



...or is it...



[.][.][.][.] * [X] *  = [new X][new Y][new Z][.]
[.][.][.][.] [Y]
[.][.][.][.] [Z]
[.][.][.][.] [1]


Thanks
I hope my babblings make sense.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$


    If I multiply a 3d coordinate (padded with a 1 to make it a 4x1 matrix) with a transformation matrix, I get a 1x4 matrix which contains my new (transformed) 3d coordinate.



    Knowing that matrices must be multiplied in a single "direction", ie, AxB is not the same as BxA... and that the columns of the first matrix define the rows of the resulting matrix (and the rows of the second matrix define the columns of the resulting matrix), does this mean that the multiplication must always be this way around...



    [X][Y][Z][1] * [.][.][.][.] = [new X]
    [.][.][.][.] [new Y]
    [.][.][.][.] [new Z]
    [.][.][.][.] [.]


    ...and therefore you ALWAYS multiply a matrix by a coordinate and not a coordinate by a matrix?



    ...or is it...



    [.][.][.][.] * [X] *  = [new X][new Y][new Z][.]
    [.][.][.][.] [Y]
    [.][.][.][.] [Z]
    [.][.][.][.] [1]


    Thanks
    I hope my babblings make sense.










    share|cite|improve this question









    $endgroup$















      0












      0








      0





      $begingroup$


      If I multiply a 3d coordinate (padded with a 1 to make it a 4x1 matrix) with a transformation matrix, I get a 1x4 matrix which contains my new (transformed) 3d coordinate.



      Knowing that matrices must be multiplied in a single "direction", ie, AxB is not the same as BxA... and that the columns of the first matrix define the rows of the resulting matrix (and the rows of the second matrix define the columns of the resulting matrix), does this mean that the multiplication must always be this way around...



      [X][Y][Z][1] * [.][.][.][.] = [new X]
      [.][.][.][.] [new Y]
      [.][.][.][.] [new Z]
      [.][.][.][.] [.]


      ...and therefore you ALWAYS multiply a matrix by a coordinate and not a coordinate by a matrix?



      ...or is it...



      [.][.][.][.] * [X] *  = [new X][new Y][new Z][.]
      [.][.][.][.] [Y]
      [.][.][.][.] [Z]
      [.][.][.][.] [1]


      Thanks
      I hope my babblings make sense.










      share|cite|improve this question









      $endgroup$




      If I multiply a 3d coordinate (padded with a 1 to make it a 4x1 matrix) with a transformation matrix, I get a 1x4 matrix which contains my new (transformed) 3d coordinate.



      Knowing that matrices must be multiplied in a single "direction", ie, AxB is not the same as BxA... and that the columns of the first matrix define the rows of the resulting matrix (and the rows of the second matrix define the columns of the resulting matrix), does this mean that the multiplication must always be this way around...



      [X][Y][Z][1] * [.][.][.][.] = [new X]
      [.][.][.][.] [new Y]
      [.][.][.][.] [new Z]
      [.][.][.][.] [.]


      ...and therefore you ALWAYS multiply a matrix by a coordinate and not a coordinate by a matrix?



      ...or is it...



      [.][.][.][.] * [X] *  = [new X][new Y][new Z][.]
      [.][.][.][.] [Y]
      [.][.][.][.] [Z]
      [.][.][.][.] [1]


      Thanks
      I hope my babblings make sense.







      matrices coordinate-systems






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 17 '14 at 16:26









      BeakieBeakie

      199411




      199411






















          2 Answers
          2






          active

          oldest

          votes


















          0












          $begingroup$

          All the linear coordinate transformations I'm familiar with look like this:



          $$
          left[begin{array}{cccc}
          a & b & c & d \
          e & f & g & h \
          i & j & k & l \
          0 & 0 & 0 & 1 \
          end{array}right]
          left[begin{array}{c}
          x \ y \ z \ 1
          end{array}right] =
          left[begin{array}{c}
          text{new } x \ text{new } y \ text{new } z \ 1
          end{array}right]
          $$



          $text{new }x = ax + by + cz + d$ and so on.






          share|cite|improve this answer











          $endgroup$





















            0












            $begingroup$

            You can't do the type of multiplication you've written.



            If $A$ is an $mtimes n$ matrix and $B$ is $ntimes p$ matrix, then $AB$ is an $mtimes p$ matrix. You can think of a row vector as a $1times n$ matrix and a column vector as an $mtimes 1$ matrix. So in your first equation above, you have a $1times 4$ matrix multiplied by an $4times 4$ matrix on the the left hand side, which would produce an $1times 4$ matrix, but on the right hand side you have a $4times 1$ matrix. Since a$1times 4$ matrix and a $4times 1$ matrix have different sizes, they cannot be equal.



            Your second equation is impossible for a similar reason.



            If you wanted to have your vector on the left, as in the first equation, the result would also have to be a $4times 1$ row vector. There is nothing wrong with doing it this way, but as NovaDenizen suggests, it is by far more conventional to use a column vectors, with the transformation matrix on the left.






            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%2f1026212%2fcoordinate-matrix-multiplication%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









              0












              $begingroup$

              All the linear coordinate transformations I'm familiar with look like this:



              $$
              left[begin{array}{cccc}
              a & b & c & d \
              e & f & g & h \
              i & j & k & l \
              0 & 0 & 0 & 1 \
              end{array}right]
              left[begin{array}{c}
              x \ y \ z \ 1
              end{array}right] =
              left[begin{array}{c}
              text{new } x \ text{new } y \ text{new } z \ 1
              end{array}right]
              $$



              $text{new }x = ax + by + cz + d$ and so on.






              share|cite|improve this answer











              $endgroup$


















                0












                $begingroup$

                All the linear coordinate transformations I'm familiar with look like this:



                $$
                left[begin{array}{cccc}
                a & b & c & d \
                e & f & g & h \
                i & j & k & l \
                0 & 0 & 0 & 1 \
                end{array}right]
                left[begin{array}{c}
                x \ y \ z \ 1
                end{array}right] =
                left[begin{array}{c}
                text{new } x \ text{new } y \ text{new } z \ 1
                end{array}right]
                $$



                $text{new }x = ax + by + cz + d$ and so on.






                share|cite|improve this answer











                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  All the linear coordinate transformations I'm familiar with look like this:



                  $$
                  left[begin{array}{cccc}
                  a & b & c & d \
                  e & f & g & h \
                  i & j & k & l \
                  0 & 0 & 0 & 1 \
                  end{array}right]
                  left[begin{array}{c}
                  x \ y \ z \ 1
                  end{array}right] =
                  left[begin{array}{c}
                  text{new } x \ text{new } y \ text{new } z \ 1
                  end{array}right]
                  $$



                  $text{new }x = ax + by + cz + d$ and so on.






                  share|cite|improve this answer











                  $endgroup$



                  All the linear coordinate transformations I'm familiar with look like this:



                  $$
                  left[begin{array}{cccc}
                  a & b & c & d \
                  e & f & g & h \
                  i & j & k & l \
                  0 & 0 & 0 & 1 \
                  end{array}right]
                  left[begin{array}{c}
                  x \ y \ z \ 1
                  end{array}right] =
                  left[begin{array}{c}
                  text{new } x \ text{new } y \ text{new } z \ 1
                  end{array}right]
                  $$



                  $text{new }x = ax + by + cz + d$ and so on.







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Nov 17 '14 at 17:18

























                  answered Nov 17 '14 at 17:13









                  NovaDenizenNovaDenizen

                  3,457718




                  3,457718























                      0












                      $begingroup$

                      You can't do the type of multiplication you've written.



                      If $A$ is an $mtimes n$ matrix and $B$ is $ntimes p$ matrix, then $AB$ is an $mtimes p$ matrix. You can think of a row vector as a $1times n$ matrix and a column vector as an $mtimes 1$ matrix. So in your first equation above, you have a $1times 4$ matrix multiplied by an $4times 4$ matrix on the the left hand side, which would produce an $1times 4$ matrix, but on the right hand side you have a $4times 1$ matrix. Since a$1times 4$ matrix and a $4times 1$ matrix have different sizes, they cannot be equal.



                      Your second equation is impossible for a similar reason.



                      If you wanted to have your vector on the left, as in the first equation, the result would also have to be a $4times 1$ row vector. There is nothing wrong with doing it this way, but as NovaDenizen suggests, it is by far more conventional to use a column vectors, with the transformation matrix on the left.






                      share|cite|improve this answer









                      $endgroup$


















                        0












                        $begingroup$

                        You can't do the type of multiplication you've written.



                        If $A$ is an $mtimes n$ matrix and $B$ is $ntimes p$ matrix, then $AB$ is an $mtimes p$ matrix. You can think of a row vector as a $1times n$ matrix and a column vector as an $mtimes 1$ matrix. So in your first equation above, you have a $1times 4$ matrix multiplied by an $4times 4$ matrix on the the left hand side, which would produce an $1times 4$ matrix, but on the right hand side you have a $4times 1$ matrix. Since a$1times 4$ matrix and a $4times 1$ matrix have different sizes, they cannot be equal.



                        Your second equation is impossible for a similar reason.



                        If you wanted to have your vector on the left, as in the first equation, the result would also have to be a $4times 1$ row vector. There is nothing wrong with doing it this way, but as NovaDenizen suggests, it is by far more conventional to use a column vectors, with the transformation matrix on the left.






                        share|cite|improve this answer









                        $endgroup$
















                          0












                          0








                          0





                          $begingroup$

                          You can't do the type of multiplication you've written.



                          If $A$ is an $mtimes n$ matrix and $B$ is $ntimes p$ matrix, then $AB$ is an $mtimes p$ matrix. You can think of a row vector as a $1times n$ matrix and a column vector as an $mtimes 1$ matrix. So in your first equation above, you have a $1times 4$ matrix multiplied by an $4times 4$ matrix on the the left hand side, which would produce an $1times 4$ matrix, but on the right hand side you have a $4times 1$ matrix. Since a$1times 4$ matrix and a $4times 1$ matrix have different sizes, they cannot be equal.



                          Your second equation is impossible for a similar reason.



                          If you wanted to have your vector on the left, as in the first equation, the result would also have to be a $4times 1$ row vector. There is nothing wrong with doing it this way, but as NovaDenizen suggests, it is by far more conventional to use a column vectors, with the transformation matrix on the left.






                          share|cite|improve this answer









                          $endgroup$



                          You can't do the type of multiplication you've written.



                          If $A$ is an $mtimes n$ matrix and $B$ is $ntimes p$ matrix, then $AB$ is an $mtimes p$ matrix. You can think of a row vector as a $1times n$ matrix and a column vector as an $mtimes 1$ matrix. So in your first equation above, you have a $1times 4$ matrix multiplied by an $4times 4$ matrix on the the left hand side, which would produce an $1times 4$ matrix, but on the right hand side you have a $4times 1$ matrix. Since a$1times 4$ matrix and a $4times 1$ matrix have different sizes, they cannot be equal.



                          Your second equation is impossible for a similar reason.



                          If you wanted to have your vector on the left, as in the first equation, the result would also have to be a $4times 1$ row vector. There is nothing wrong with doing it this way, but as NovaDenizen suggests, it is by far more conventional to use a column vectors, with the transformation matrix on the left.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Nov 17 '14 at 17:43









                          Randy ERandy E

                          763310




                          763310






























                              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%2f1026212%2fcoordinate-matrix-multiplication%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

                              Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                              ComboBox Display Member on multiple fields

                              Is it possible to collect Nectar points via Trainline?