# how to multiply out "transpose"?

• Apr 24th 2010, 08:22 AM
casperyc
how to multiply out "transpose"?
Hi

I am really confused with the "transpose" related stuff.

Can anyone work me through it?

and the paritial differentiation with respect to it

===========================
why is

$(Y-X\beta)^T(Y-X\beta)=Y^TY-2\beta^TX^TY^T+\beta^TX^TX\beta$

$(Y-X\beta)^T(Y-X\beta)
=(Y^T-\beta^TX^T)(Y-X\beta)
=Y^TY-Y^TX\beta-\beta^TX^TY+\beta^TX^TX\beta$

and differentiate with respect to beta is

$=-2X^TY+X^TX\beta$
• Apr 24th 2010, 02:30 PM
dwsmith
Quote:

Originally Posted by casperyc
Hi

I am really confused with the "transpose" related stuff.

Can anyone work me through it?

and the paritial differentiation with respect to it

If we are working with matrices, how do we know beta and beta hat commute? Or are we working with vector? What is beta?

$(\hat{\beta}-\beta)(\hat{\beta}^T-\beta^T)=\hat{\beta}\hat{\beta}^T-\hat{\beta}\beta^T-\beta\hat{\beta}^T+\beta\beta^T$
• Apr 24th 2010, 03:44 PM
casperyc
Quote:

Originally Posted by dwsmith
If we are working with matrices, how do we know beta and beta hat commute? Or are we working with vector? What is beta?

$(\hat{\beta}-\beta)(\hat{\beta}^T-\beta^T)=\hat{\beta}\hat{\beta}^T-\hat{\beta}\beta^T-\beta\hat{\beta}^T+\beta\beta^T$

Hi there,

I think what you have writtern is pretty obvious going to give me my answer.

So, my actual problem is dont understand the order of the multiplication,

say $(A-B)(A^T-B^T)$

what I would do is

$(A-B)(A^T-B^T)=A A^T - AB^T - B A^T + BB^T$

which give me a different 'middle' term...

$\beta$ is just a vector

and if you could see the second pic (which is just next to it)
it confuses me more....
• Apr 24th 2010, 03:46 PM
dwsmith
Quote:

Originally Posted by casperyc
Hi there,

I think what you have writtern is pretty obvious going to give me my answer.

So, my actual problem is dont understand the order of the multiplication,

say $(A-B)(A^T-B^T)$

what I would do is

$(A-B)(A^T-B^T)=A A^T - AB^T - B A^T + BB^T$

which give me a different 'middle' term...

$\beta$ is just a vector

Your multiplication is correct. You will receive two different middle terms. If we can show the terms commute, we could combine them.
• Apr 24th 2010, 03:50 PM
dwsmith
If beta is a vector, $\beta\hat{\beta}^T$ is inner product.
• Apr 24th 2010, 03:54 PM
casperyc
Quote:

Originally Posted by dwsmith
If beta is a vector, $\beta\hat{\beta}^T$ is inner product.

Thanks.
I will think it through

Then what about the differentiation thing?
(which I have typed it out in the post)
• Apr 24th 2010, 03:57 PM
dwsmith
Are the Xs and Ys matrices?
• Apr 24th 2010, 04:02 PM
casperyc
Quote:

Originally Posted by dwsmith
Are the Xs and Ys matrices?

just suppose

$y=n \times 1$

$X=n \times p$

$\beta=p \times 1$
• Apr 24th 2010, 04:06 PM
dwsmith
Quote:

Originally Posted by dwsmith
If we are working with matrices, how do we know beta and beta hat commute? Or are we working with vector? What is beta?

$(\hat{\beta}-\beta)(\hat{\beta}^T-\beta^T)=\hat{\beta}\hat{\beta}^T-\hat{\beta}\beta^T-\beta\hat{\beta}^T+\beta\beta^T$

Since these are vectors and we are dealing with inner product, $(\hat{\beta}-\beta)(\hat{\beta}^T-\beta^T)=\hat{\beta}\hat{\beta}^T-\hat{\beta}\beta^T-\beta\hat{\beta}^T+\beta\beta^T=\hat{\beta}\hat{\b eta}^T-2\hat{\beta}\beta^T+\beta\beta^T$
• Apr 24th 2010, 04:20 PM
dwsmith
If in the second problem if beta is a scalar and X and Y are vectors, the quantity will simplify down to $Y^TY-2Y^TX\beta+X^TX\beta$