2
$\begingroup$

I'm using some material found on the internet for learn how to use R. One exercise is asking to return the result of a multiplication of a $15\times 3$ matrix by its transpose. Being the transpose a $3\times 15$ matrix, I would assume the result is a matrix of dimension $15\times 15$.

Am I wrong?

The code suggested on the answers return a matrix of dimension $3\times 3$. I think I found the right code but before email the professor I would like to check with you if I'm right.

Thank you in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

You are not wrong. If you work through matrix multiplication, you will see that the result always will have the same number of rows as the left factor and the same number of columns as the right factor. So if $A$ is an $m\times n$ matrix, $AA^T$ will have $m$ rows and $m$ columns, while $A^T\!A$ will have $n$ rows and $n$ columns.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .