Associative property in matrix multiplication

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Does the associative property of matrix multiplication hold when one of the matrices is a permutation matrix?



For example consider the following:



X = [ 1 2 3 ] (a 1*3 matrix)
P = [ 0 1 0;
0 0 1;
1 0 0 ] (a 3 * 3 permutation matrix)
Y = transpose([1 4 2] ) (a 3 * 1 matrix)



Here (XP)Y = 9 and X(PY) = 11...



Can I conclude that the associative property of matrix multiplication holds only when all matrices have been reduced their "static" form after row and column exchanges - which is essentially what happens when you multiply by a permutation matrix?







share|cite|improve this question


















  • 3




    Matrix multiplication is emphalways associative.
    – Igor Rivin
    Jan 4 '14 at 3:05










  • Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
    – Student_forever
    Jan 4 '14 at 3:20






  • 2




    Um, you made a miscalculation....
    – Gina
    Jan 4 '14 at 3:25










  • @IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
    – jinawee
    Mar 13 '14 at 17:40














up vote
1
down vote

favorite












Does the associative property of matrix multiplication hold when one of the matrices is a permutation matrix?



For example consider the following:



X = [ 1 2 3 ] (a 1*3 matrix)
P = [ 0 1 0;
0 0 1;
1 0 0 ] (a 3 * 3 permutation matrix)
Y = transpose([1 4 2] ) (a 3 * 1 matrix)



Here (XP)Y = 9 and X(PY) = 11...



Can I conclude that the associative property of matrix multiplication holds only when all matrices have been reduced their "static" form after row and column exchanges - which is essentially what happens when you multiply by a permutation matrix?







share|cite|improve this question


















  • 3




    Matrix multiplication is emphalways associative.
    – Igor Rivin
    Jan 4 '14 at 3:05










  • Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
    – Student_forever
    Jan 4 '14 at 3:20






  • 2




    Um, you made a miscalculation....
    – Gina
    Jan 4 '14 at 3:25










  • @IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
    – jinawee
    Mar 13 '14 at 17:40












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Does the associative property of matrix multiplication hold when one of the matrices is a permutation matrix?



For example consider the following:



X = [ 1 2 3 ] (a 1*3 matrix)
P = [ 0 1 0;
0 0 1;
1 0 0 ] (a 3 * 3 permutation matrix)
Y = transpose([1 4 2] ) (a 3 * 1 matrix)



Here (XP)Y = 9 and X(PY) = 11...



Can I conclude that the associative property of matrix multiplication holds only when all matrices have been reduced their "static" form after row and column exchanges - which is essentially what happens when you multiply by a permutation matrix?







share|cite|improve this question














Does the associative property of matrix multiplication hold when one of the matrices is a permutation matrix?



For example consider the following:



X = [ 1 2 3 ] (a 1*3 matrix)
P = [ 0 1 0;
0 0 1;
1 0 0 ] (a 3 * 3 permutation matrix)
Y = transpose([1 4 2] ) (a 3 * 1 matrix)



Here (XP)Y = 9 and X(PY) = 11...



Can I conclude that the associative property of matrix multiplication holds only when all matrices have been reduced their "static" form after row and column exchanges - which is essentially what happens when you multiply by a permutation matrix?









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 4 '14 at 3:33







user940

















asked Jan 4 '14 at 3:00









Student_forever

61




61







  • 3




    Matrix multiplication is emphalways associative.
    – Igor Rivin
    Jan 4 '14 at 3:05










  • Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
    – Student_forever
    Jan 4 '14 at 3:20






  • 2




    Um, you made a miscalculation....
    – Gina
    Jan 4 '14 at 3:25










  • @IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
    – jinawee
    Mar 13 '14 at 17:40












  • 3




    Matrix multiplication is emphalways associative.
    – Igor Rivin
    Jan 4 '14 at 3:05










  • Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
    – Student_forever
    Jan 4 '14 at 3:20






  • 2




    Um, you made a miscalculation....
    – Gina
    Jan 4 '14 at 3:25










  • @IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
    – jinawee
    Mar 13 '14 at 17:40







3




3




Matrix multiplication is emphalways associative.
– Igor Rivin
Jan 4 '14 at 3:05




Matrix multiplication is emphalways associative.
– Igor Rivin
Jan 4 '14 at 3:05












Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
– Student_forever
Jan 4 '14 at 3:20




Igor - in the example above, (XP)Y = 9 and X(PY) = 11.
– Student_forever
Jan 4 '14 at 3:20




2




2




Um, you made a miscalculation....
– Gina
Jan 4 '14 at 3:25




Um, you made a miscalculation....
– Gina
Jan 4 '14 at 3:25












@IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
– jinawee
Mar 13 '14 at 17:40




@IgorRivin What about ABC, where A:row matrix, B:column matrix and C:row matrix?
– jinawee
Mar 13 '14 at 17:40










3 Answers
3






active

oldest

votes

















up vote
1
down vote













$XP=[3 1 2]$ and $(XP)Y=3cdot1+1cdot4+2cdot2=11$.



Like Igor said, matrix multiplication is always associative.






share|cite|improve this answer



























    up vote
    1
    down vote













    Matrix multiplication is in fact just a composition of linear transformation. Just like function in general, composition of function is associative (intuitively, in does not even make sense to even talk about bracketing a function composition). So yes, multiplication is probably a somewhat misleading term.






    share|cite|improve this answer



























      up vote
      0
      down vote













      I was not satisfied with any explanation that I've read in Internet about associativity of the matrices product.



      Algebric proof based on matrices product calculation is cumbersome, but it works. I like to consider matrices as a linear transformation operator.



      Let's do it.



      For me it's very intuitive that the functions are associative.



      $ colorblue f(g(x)) = (fcirc g)x $



      For instance



      $ colorbluef(x) = 2x+1 quad and quad g(x) = x^2$

      $ colorbluef(2) = 5 qquad rightarrow qquad g(5) = 25$



      also

      $colorblueg(f(x)) = 4x^2 + 4x + 1 quad rightarrow quad f(g(2)) = 25$



      Notice that we make the composition, using the operands like $colorbluex$ as a placeholder in place of the actual operand (in this case, $colorblue2$)



      Imagine $colorblueF$, $colorblueX$, $colorblueM$, $colorblueT$, $colorblueC$ and $colorblueU$ as matrices.
      Consider $colorblueR(M)$ as the number of $colorblueM$ rows and $colorblueC(M)$ the number of $colorblueM$ columns.



      We prove intuitively that $colorblueT(UV) = (TU)V$



      We know that, by the algebric definition or linear transformation paradigm $colorblueC(U) = R (V)$ and $colorblueC(V) = R(U)$



      Because in a multiplication of matrices, the left matrix $colorblueF$ represents in practice $colorblueR (F)$ functions composed of $colorblueC(F)$ coefficients, which will be the parameters of a scalar product, which will result in a single number (for each function execution)



      The right-hand matrix $colorblueX$, represents a collection of $colorblueC(X)$ operands, where each has $colorblueR(X)$ values ​​for each of the $colorblueR(F)$ functions to act. So in the end we will have $colorblueR(X) * C(X)$ values



      Thus in $colorblueUV$ we produce a matrix $colorblueX$, with $colorblueR(U) * C(V)$ values, which will be the target of the functions represented by the left matrix $colorblueT$, generating final values, one for each function execution. In short, $colorblueT$ acts on the effect it has on $colorblueUV$,



      When we first make $colorblueTU$ we produce $colorblueL (T) * R (U)$ values, but, in fact, values are more than numbers, they are a functional composition that will act together on the values of $colorblueV$, making the same effect of the function composition.



      It is similar than function composition, the function composition can use placeholders in place of the actual operands in $colorblueV$. In the end, one can get the final result, replacing the placeholders for the real $colorblueV$ values.



      The only difference, as described, is that an array involves several function executions and each function has several parameters.



      Apart from this multiplicity, the associativity it is the same property that holds for functions.






      share|cite|improve this answer






















        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',
        convertImagesToLinks: true,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        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%2f626546%2fassociative-property-in-matrix-multiplication%23new-answer', 'question_page');

        );

        Post as a guest






























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        1
        down vote













        $XP=[3 1 2]$ and $(XP)Y=3cdot1+1cdot4+2cdot2=11$.



        Like Igor said, matrix multiplication is always associative.






        share|cite|improve this answer
























          up vote
          1
          down vote













          $XP=[3 1 2]$ and $(XP)Y=3cdot1+1cdot4+2cdot2=11$.



          Like Igor said, matrix multiplication is always associative.






          share|cite|improve this answer






















            up vote
            1
            down vote










            up vote
            1
            down vote









            $XP=[3 1 2]$ and $(XP)Y=3cdot1+1cdot4+2cdot2=11$.



            Like Igor said, matrix multiplication is always associative.






            share|cite|improve this answer












            $XP=[3 1 2]$ and $(XP)Y=3cdot1+1cdot4+2cdot2=11$.



            Like Igor said, matrix multiplication is always associative.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Jan 4 '14 at 3:21









            bof

            46.1k348110




            46.1k348110




















                up vote
                1
                down vote













                Matrix multiplication is in fact just a composition of linear transformation. Just like function in general, composition of function is associative (intuitively, in does not even make sense to even talk about bracketing a function composition). So yes, multiplication is probably a somewhat misleading term.






                share|cite|improve this answer
























                  up vote
                  1
                  down vote













                  Matrix multiplication is in fact just a composition of linear transformation. Just like function in general, composition of function is associative (intuitively, in does not even make sense to even talk about bracketing a function composition). So yes, multiplication is probably a somewhat misleading term.






                  share|cite|improve this answer






















                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    Matrix multiplication is in fact just a composition of linear transformation. Just like function in general, composition of function is associative (intuitively, in does not even make sense to even talk about bracketing a function composition). So yes, multiplication is probably a somewhat misleading term.






                    share|cite|improve this answer












                    Matrix multiplication is in fact just a composition of linear transformation. Just like function in general, composition of function is associative (intuitively, in does not even make sense to even talk about bracketing a function composition). So yes, multiplication is probably a somewhat misleading term.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Jan 4 '14 at 3:28









                    Gina

                    4,5871033




                    4,5871033




















                        up vote
                        0
                        down vote













                        I was not satisfied with any explanation that I've read in Internet about associativity of the matrices product.



                        Algebric proof based on matrices product calculation is cumbersome, but it works. I like to consider matrices as a linear transformation operator.



                        Let's do it.



                        For me it's very intuitive that the functions are associative.



                        $ colorblue f(g(x)) = (fcirc g)x $



                        For instance



                        $ colorbluef(x) = 2x+1 quad and quad g(x) = x^2$

                        $ colorbluef(2) = 5 qquad rightarrow qquad g(5) = 25$



                        also

                        $colorblueg(f(x)) = 4x^2 + 4x + 1 quad rightarrow quad f(g(2)) = 25$



                        Notice that we make the composition, using the operands like $colorbluex$ as a placeholder in place of the actual operand (in this case, $colorblue2$)



                        Imagine $colorblueF$, $colorblueX$, $colorblueM$, $colorblueT$, $colorblueC$ and $colorblueU$ as matrices.
                        Consider $colorblueR(M)$ as the number of $colorblueM$ rows and $colorblueC(M)$ the number of $colorblueM$ columns.



                        We prove intuitively that $colorblueT(UV) = (TU)V$



                        We know that, by the algebric definition or linear transformation paradigm $colorblueC(U) = R (V)$ and $colorblueC(V) = R(U)$



                        Because in a multiplication of matrices, the left matrix $colorblueF$ represents in practice $colorblueR (F)$ functions composed of $colorblueC(F)$ coefficients, which will be the parameters of a scalar product, which will result in a single number (for each function execution)



                        The right-hand matrix $colorblueX$, represents a collection of $colorblueC(X)$ operands, where each has $colorblueR(X)$ values ​​for each of the $colorblueR(F)$ functions to act. So in the end we will have $colorblueR(X) * C(X)$ values



                        Thus in $colorblueUV$ we produce a matrix $colorblueX$, with $colorblueR(U) * C(V)$ values, which will be the target of the functions represented by the left matrix $colorblueT$, generating final values, one for each function execution. In short, $colorblueT$ acts on the effect it has on $colorblueUV$,



                        When we first make $colorblueTU$ we produce $colorblueL (T) * R (U)$ values, but, in fact, values are more than numbers, they are a functional composition that will act together on the values of $colorblueV$, making the same effect of the function composition.



                        It is similar than function composition, the function composition can use placeholders in place of the actual operands in $colorblueV$. In the end, one can get the final result, replacing the placeholders for the real $colorblueV$ values.



                        The only difference, as described, is that an array involves several function executions and each function has several parameters.



                        Apart from this multiplicity, the associativity it is the same property that holds for functions.






                        share|cite|improve this answer


























                          up vote
                          0
                          down vote













                          I was not satisfied with any explanation that I've read in Internet about associativity of the matrices product.



                          Algebric proof based on matrices product calculation is cumbersome, but it works. I like to consider matrices as a linear transformation operator.



                          Let's do it.



                          For me it's very intuitive that the functions are associative.



                          $ colorblue f(g(x)) = (fcirc g)x $



                          For instance



                          $ colorbluef(x) = 2x+1 quad and quad g(x) = x^2$

                          $ colorbluef(2) = 5 qquad rightarrow qquad g(5) = 25$



                          also

                          $colorblueg(f(x)) = 4x^2 + 4x + 1 quad rightarrow quad f(g(2)) = 25$



                          Notice that we make the composition, using the operands like $colorbluex$ as a placeholder in place of the actual operand (in this case, $colorblue2$)



                          Imagine $colorblueF$, $colorblueX$, $colorblueM$, $colorblueT$, $colorblueC$ and $colorblueU$ as matrices.
                          Consider $colorblueR(M)$ as the number of $colorblueM$ rows and $colorblueC(M)$ the number of $colorblueM$ columns.



                          We prove intuitively that $colorblueT(UV) = (TU)V$



                          We know that, by the algebric definition or linear transformation paradigm $colorblueC(U) = R (V)$ and $colorblueC(V) = R(U)$



                          Because in a multiplication of matrices, the left matrix $colorblueF$ represents in practice $colorblueR (F)$ functions composed of $colorblueC(F)$ coefficients, which will be the parameters of a scalar product, which will result in a single number (for each function execution)



                          The right-hand matrix $colorblueX$, represents a collection of $colorblueC(X)$ operands, where each has $colorblueR(X)$ values ​​for each of the $colorblueR(F)$ functions to act. So in the end we will have $colorblueR(X) * C(X)$ values



                          Thus in $colorblueUV$ we produce a matrix $colorblueX$, with $colorblueR(U) * C(V)$ values, which will be the target of the functions represented by the left matrix $colorblueT$, generating final values, one for each function execution. In short, $colorblueT$ acts on the effect it has on $colorblueUV$,



                          When we first make $colorblueTU$ we produce $colorblueL (T) * R (U)$ values, but, in fact, values are more than numbers, they are a functional composition that will act together on the values of $colorblueV$, making the same effect of the function composition.



                          It is similar than function composition, the function composition can use placeholders in place of the actual operands in $colorblueV$. In the end, one can get the final result, replacing the placeholders for the real $colorblueV$ values.



                          The only difference, as described, is that an array involves several function executions and each function has several parameters.



                          Apart from this multiplicity, the associativity it is the same property that holds for functions.






                          share|cite|improve this answer
























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            I was not satisfied with any explanation that I've read in Internet about associativity of the matrices product.



                            Algebric proof based on matrices product calculation is cumbersome, but it works. I like to consider matrices as a linear transformation operator.



                            Let's do it.



                            For me it's very intuitive that the functions are associative.



                            $ colorblue f(g(x)) = (fcirc g)x $



                            For instance



                            $ colorbluef(x) = 2x+1 quad and quad g(x) = x^2$

                            $ colorbluef(2) = 5 qquad rightarrow qquad g(5) = 25$



                            also

                            $colorblueg(f(x)) = 4x^2 + 4x + 1 quad rightarrow quad f(g(2)) = 25$



                            Notice that we make the composition, using the operands like $colorbluex$ as a placeholder in place of the actual operand (in this case, $colorblue2$)



                            Imagine $colorblueF$, $colorblueX$, $colorblueM$, $colorblueT$, $colorblueC$ and $colorblueU$ as matrices.
                            Consider $colorblueR(M)$ as the number of $colorblueM$ rows and $colorblueC(M)$ the number of $colorblueM$ columns.



                            We prove intuitively that $colorblueT(UV) = (TU)V$



                            We know that, by the algebric definition or linear transformation paradigm $colorblueC(U) = R (V)$ and $colorblueC(V) = R(U)$



                            Because in a multiplication of matrices, the left matrix $colorblueF$ represents in practice $colorblueR (F)$ functions composed of $colorblueC(F)$ coefficients, which will be the parameters of a scalar product, which will result in a single number (for each function execution)



                            The right-hand matrix $colorblueX$, represents a collection of $colorblueC(X)$ operands, where each has $colorblueR(X)$ values ​​for each of the $colorblueR(F)$ functions to act. So in the end we will have $colorblueR(X) * C(X)$ values



                            Thus in $colorblueUV$ we produce a matrix $colorblueX$, with $colorblueR(U) * C(V)$ values, which will be the target of the functions represented by the left matrix $colorblueT$, generating final values, one for each function execution. In short, $colorblueT$ acts on the effect it has on $colorblueUV$,



                            When we first make $colorblueTU$ we produce $colorblueL (T) * R (U)$ values, but, in fact, values are more than numbers, they are a functional composition that will act together on the values of $colorblueV$, making the same effect of the function composition.



                            It is similar than function composition, the function composition can use placeholders in place of the actual operands in $colorblueV$. In the end, one can get the final result, replacing the placeholders for the real $colorblueV$ values.



                            The only difference, as described, is that an array involves several function executions and each function has several parameters.



                            Apart from this multiplicity, the associativity it is the same property that holds for functions.






                            share|cite|improve this answer














                            I was not satisfied with any explanation that I've read in Internet about associativity of the matrices product.



                            Algebric proof based on matrices product calculation is cumbersome, but it works. I like to consider matrices as a linear transformation operator.



                            Let's do it.



                            For me it's very intuitive that the functions are associative.



                            $ colorblue f(g(x)) = (fcirc g)x $



                            For instance



                            $ colorbluef(x) = 2x+1 quad and quad g(x) = x^2$

                            $ colorbluef(2) = 5 qquad rightarrow qquad g(5) = 25$



                            also

                            $colorblueg(f(x)) = 4x^2 + 4x + 1 quad rightarrow quad f(g(2)) = 25$



                            Notice that we make the composition, using the operands like $colorbluex$ as a placeholder in place of the actual operand (in this case, $colorblue2$)



                            Imagine $colorblueF$, $colorblueX$, $colorblueM$, $colorblueT$, $colorblueC$ and $colorblueU$ as matrices.
                            Consider $colorblueR(M)$ as the number of $colorblueM$ rows and $colorblueC(M)$ the number of $colorblueM$ columns.



                            We prove intuitively that $colorblueT(UV) = (TU)V$



                            We know that, by the algebric definition or linear transformation paradigm $colorblueC(U) = R (V)$ and $colorblueC(V) = R(U)$



                            Because in a multiplication of matrices, the left matrix $colorblueF$ represents in practice $colorblueR (F)$ functions composed of $colorblueC(F)$ coefficients, which will be the parameters of a scalar product, which will result in a single number (for each function execution)



                            The right-hand matrix $colorblueX$, represents a collection of $colorblueC(X)$ operands, where each has $colorblueR(X)$ values ​​for each of the $colorblueR(F)$ functions to act. So in the end we will have $colorblueR(X) * C(X)$ values



                            Thus in $colorblueUV$ we produce a matrix $colorblueX$, with $colorblueR(U) * C(V)$ values, which will be the target of the functions represented by the left matrix $colorblueT$, generating final values, one for each function execution. In short, $colorblueT$ acts on the effect it has on $colorblueUV$,



                            When we first make $colorblueTU$ we produce $colorblueL (T) * R (U)$ values, but, in fact, values are more than numbers, they are a functional composition that will act together on the values of $colorblueV$, making the same effect of the function composition.



                            It is similar than function composition, the function composition can use placeholders in place of the actual operands in $colorblueV$. In the end, one can get the final result, replacing the placeholders for the real $colorblueV$ values.



                            The only difference, as described, is that an array involves several function executions and each function has several parameters.



                            Apart from this multiplicity, the associativity it is the same property that holds for functions.







                            share|cite|improve this answer














                            share|cite|improve this answer



                            share|cite|improve this answer








                            edited Aug 14 at 2:45

























                            answered Aug 14 at 2:29









                            Paulo Buchsbaum

                            1013




                            1013






















                                 

                                draft saved


                                draft discarded


























                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f626546%2fassociative-property-in-matrix-multiplication%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                這個網誌中的熱門文章

                                tkz-euclide: tkzDrawCircle[R] not working

                                How to combine Bézier curves to a surface?

                                1st Magritte Awards