Matrix Multiplication X'X












1












$begingroup$


In my econometrics textbook, the author states this result.



enter image description here



He assumes only that X is an n x K matrix. He states xi is the ith column vector of matrix X. But that implies xi has dimensions n x 1, so xixi' is an n x n matrix, so a sum of n x n matrices is also an n x n matrix. But X'X has dimensions K x K.



Can someone please explain what I'm missing?










share|cite|improve this question











$endgroup$

















    1












    $begingroup$


    In my econometrics textbook, the author states this result.



    enter image description here



    He assumes only that X is an n x K matrix. He states xi is the ith column vector of matrix X. But that implies xi has dimensions n x 1, so xixi' is an n x n matrix, so a sum of n x n matrices is also an n x n matrix. But X'X has dimensions K x K.



    Can someone please explain what I'm missing?










    share|cite|improve this question











    $endgroup$















      1












      1








      1





      $begingroup$


      In my econometrics textbook, the author states this result.



      enter image description here



      He assumes only that X is an n x K matrix. He states xi is the ith column vector of matrix X. But that implies xi has dimensions n x 1, so xixi' is an n x n matrix, so a sum of n x n matrices is also an n x n matrix. But X'X has dimensions K x K.



      Can someone please explain what I'm missing?










      share|cite|improve this question











      $endgroup$




      In my econometrics textbook, the author states this result.



      enter image description here



      He assumes only that X is an n x K matrix. He states xi is the ith column vector of matrix X. But that implies xi has dimensions n x 1, so xixi' is an n x n matrix, so a sum of n x n matrices is also an n x n matrix. But X'X has dimensions K x K.



      Can someone please explain what I'm missing?







      matrices






      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 15:15









      cansomeonehelpmeout

      7,0973935




      7,0973935










      asked Dec 15 '18 at 15:12









      MaxMax

      61




      61






















          3 Answers
          3






          active

          oldest

          votes


















          1












          $begingroup$

          Everything is correct. $X'$ is a $Ktimes n$ matrix so $X'X$ is a $K times K$ matrix. The thing is that finding $X'X$ is essentially multiplying the corresponding columns of $X$ which we have $K$ of them with one another thus we have a $Ktimes K$ matrix as the product.






          share|cite|improve this answer









          $endgroup$





















            0












            $begingroup$

            Since $mathbf x_i$ is a column vector of $mathbf X$, we should have
            $$mathbf{X'X}=[mathbf x_1, cdots,mathbf x_n]'[mathbf x_1, cdots,mathbf x_n]=begin{bmatrix}mathbf x_1'\ vdots \ mathbf x_n'end{bmatrix}[mathbf x_1, cdots,mathbf x_n]=(mathbf x_i'mathbf x_j)_{ntimes n}$$
            which is not the sum of $mathbf x_imathbf x_i'$ which should be $mathbf Xmathbf X'$ instead.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
              $endgroup$
              – Max
              Dec 15 '18 at 15:36



















            0












            $begingroup$

            I found the answer in a footnote in a different chapter of the textbook: xj is a column vector corresponding to the jth column of X, but xi is a column vector that is the transpose of the ith row vector of X. So, xi' is actually the ith row vector of X. Not sure why this is the case, but hope that clarifies it for anyone else reading this.






            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%2f3041589%2fmatrix-multiplication-xx%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1












              $begingroup$

              Everything is correct. $X'$ is a $Ktimes n$ matrix so $X'X$ is a $K times K$ matrix. The thing is that finding $X'X$ is essentially multiplying the corresponding columns of $X$ which we have $K$ of them with one another thus we have a $Ktimes K$ matrix as the product.






              share|cite|improve this answer









              $endgroup$


















                1












                $begingroup$

                Everything is correct. $X'$ is a $Ktimes n$ matrix so $X'X$ is a $K times K$ matrix. The thing is that finding $X'X$ is essentially multiplying the corresponding columns of $X$ which we have $K$ of them with one another thus we have a $Ktimes K$ matrix as the product.






                share|cite|improve this answer









                $endgroup$
















                  1












                  1








                  1





                  $begingroup$

                  Everything is correct. $X'$ is a $Ktimes n$ matrix so $X'X$ is a $K times K$ matrix. The thing is that finding $X'X$ is essentially multiplying the corresponding columns of $X$ which we have $K$ of them with one another thus we have a $Ktimes K$ matrix as the product.






                  share|cite|improve this answer









                  $endgroup$



                  Everything is correct. $X'$ is a $Ktimes n$ matrix so $X'X$ is a $K times K$ matrix. The thing is that finding $X'X$ is essentially multiplying the corresponding columns of $X$ which we have $K$ of them with one another thus we have a $Ktimes K$ matrix as the product.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 15 '18 at 15:23









                  Karn WatcharasupatKarn Watcharasupat

                  3,9742526




                  3,9742526























                      0












                      $begingroup$

                      Since $mathbf x_i$ is a column vector of $mathbf X$, we should have
                      $$mathbf{X'X}=[mathbf x_1, cdots,mathbf x_n]'[mathbf x_1, cdots,mathbf x_n]=begin{bmatrix}mathbf x_1'\ vdots \ mathbf x_n'end{bmatrix}[mathbf x_1, cdots,mathbf x_n]=(mathbf x_i'mathbf x_j)_{ntimes n}$$
                      which is not the sum of $mathbf x_imathbf x_i'$ which should be $mathbf Xmathbf X'$ instead.






                      share|cite|improve this answer









                      $endgroup$













                      • $begingroup$
                        That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                        $endgroup$
                        – Max
                        Dec 15 '18 at 15:36
















                      0












                      $begingroup$

                      Since $mathbf x_i$ is a column vector of $mathbf X$, we should have
                      $$mathbf{X'X}=[mathbf x_1, cdots,mathbf x_n]'[mathbf x_1, cdots,mathbf x_n]=begin{bmatrix}mathbf x_1'\ vdots \ mathbf x_n'end{bmatrix}[mathbf x_1, cdots,mathbf x_n]=(mathbf x_i'mathbf x_j)_{ntimes n}$$
                      which is not the sum of $mathbf x_imathbf x_i'$ which should be $mathbf Xmathbf X'$ instead.






                      share|cite|improve this answer









                      $endgroup$













                      • $begingroup$
                        That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                        $endgroup$
                        – Max
                        Dec 15 '18 at 15:36














                      0












                      0








                      0





                      $begingroup$

                      Since $mathbf x_i$ is a column vector of $mathbf X$, we should have
                      $$mathbf{X'X}=[mathbf x_1, cdots,mathbf x_n]'[mathbf x_1, cdots,mathbf x_n]=begin{bmatrix}mathbf x_1'\ vdots \ mathbf x_n'end{bmatrix}[mathbf x_1, cdots,mathbf x_n]=(mathbf x_i'mathbf x_j)_{ntimes n}$$
                      which is not the sum of $mathbf x_imathbf x_i'$ which should be $mathbf Xmathbf X'$ instead.






                      share|cite|improve this answer









                      $endgroup$



                      Since $mathbf x_i$ is a column vector of $mathbf X$, we should have
                      $$mathbf{X'X}=[mathbf x_1, cdots,mathbf x_n]'[mathbf x_1, cdots,mathbf x_n]=begin{bmatrix}mathbf x_1'\ vdots \ mathbf x_n'end{bmatrix}[mathbf x_1, cdots,mathbf x_n]=(mathbf x_i'mathbf x_j)_{ntimes n}$$
                      which is not the sum of $mathbf x_imathbf x_i'$ which should be $mathbf Xmathbf X'$ instead.







                      share|cite|improve this answer












                      share|cite|improve this answer



                      share|cite|improve this answer










                      answered Dec 15 '18 at 15:24









                      VimVim

                      8,11631348




                      8,11631348












                      • $begingroup$
                        That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                        $endgroup$
                        – Max
                        Dec 15 '18 at 15:36


















                      • $begingroup$
                        That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                        $endgroup$
                        – Max
                        Dec 15 '18 at 15:36
















                      $begingroup$
                      That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                      $endgroup$
                      – Max
                      Dec 15 '18 at 15:36




                      $begingroup$
                      That's exactly what I thought! But he applies this identity over and over throughout the textbook, so I'm sure I must be wrong somewhere, I just don't know where...
                      $endgroup$
                      – Max
                      Dec 15 '18 at 15:36











                      0












                      $begingroup$

                      I found the answer in a footnote in a different chapter of the textbook: xj is a column vector corresponding to the jth column of X, but xi is a column vector that is the transpose of the ith row vector of X. So, xi' is actually the ith row vector of X. Not sure why this is the case, but hope that clarifies it for anyone else reading this.






                      share|cite|improve this answer









                      $endgroup$


















                        0












                        $begingroup$

                        I found the answer in a footnote in a different chapter of the textbook: xj is a column vector corresponding to the jth column of X, but xi is a column vector that is the transpose of the ith row vector of X. So, xi' is actually the ith row vector of X. Not sure why this is the case, but hope that clarifies it for anyone else reading this.






                        share|cite|improve this answer









                        $endgroup$
















                          0












                          0








                          0





                          $begingroup$

                          I found the answer in a footnote in a different chapter of the textbook: xj is a column vector corresponding to the jth column of X, but xi is a column vector that is the transpose of the ith row vector of X. So, xi' is actually the ith row vector of X. Not sure why this is the case, but hope that clarifies it for anyone else reading this.






                          share|cite|improve this answer









                          $endgroup$



                          I found the answer in a footnote in a different chapter of the textbook: xj is a column vector corresponding to the jth column of X, but xi is a column vector that is the transpose of the ith row vector of X. So, xi' is actually the ith row vector of X. Not sure why this is the case, but hope that clarifies it for anyone else reading this.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Dec 16 '18 at 2:33









                          MaxMax

                          61




                          61






























                              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%2f3041589%2fmatrix-multiplication-xx%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

                              Bundesstraße 106

                              Verónica Boquete

                              Ida-Boy-Ed-Garten