Matrix Multiplication X'X
$begingroup$
In my econometrics textbook, the author states this result.
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
$endgroup$
add a comment |
$begingroup$
In my econometrics textbook, the author states this result.
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
$endgroup$
add a comment |
$begingroup$
In my econometrics textbook, the author states this result.
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
$endgroup$
In my econometrics textbook, the author states this result.
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
matrices
edited Dec 15 '18 at 15:15
cansomeonehelpmeout
7,0973935
7,0973935
asked Dec 15 '18 at 15:12
MaxMax
61
61
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
$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.
$endgroup$
add a comment |
$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.
$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
add a comment |
$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.
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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.
$endgroup$
add a comment |
$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.
$endgroup$
add a comment |
$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.
$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.
answered Dec 15 '18 at 15:23
Karn WatcharasupatKarn Watcharasupat
3,9742526
3,9742526
add a comment |
add a comment |
$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.
$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
add a comment |
$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.
$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
add a comment |
$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.
$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.
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
add a comment |
$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
add a comment |
$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.
$endgroup$
add a comment |
$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.
$endgroup$
add a comment |
$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.
$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.
answered Dec 16 '18 at 2:33
MaxMax
61
61
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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