The %*%
operator in R has it's purpose described in multiple places for example:
and here
https://www.tutorialspoint.com/r/r_operators.htm
Which states:
"This operator is used to multiply a matrix with its transpose."
What I do not understand is the calculation performed in order to go from one matrix to another using this operator, for example:
M = matrix(c(3,2,5,3,4,5),3, 2, TRUE)
M
# [,1] [,2]
#[1,] 3 2
#[2,] 5 3
#[3,] 4 5
t(M)
# [,1] [,2] [,3]
#[1,] 3 5 4
#[2,] 2 3 5
print ( M %*% t(M) )
# [,1] [,2] [,3]
#[1,] 13 21 22
#[2,] 21 34 35
#[3,] 22 35 41
I've stared as this, and other matrix iterations and I can't figure out how you arrive at the result by multiplication with the transpose matrix, and I can't find an explanation anywhere. Can anyone provide an explanation please or point me in the right direction? Thanks