So I am too embarassed to ask this on stackoverflow. For the record, I do have the R manual and it says,
^ Exponentiation, binary
X1 <- c(1,0,1,4,2)
X2 <- c(0,1,1,2,4)
X <- as.matrix(data.frame(X1=X1,X2=X2))
(Product <- (t(X)%*% X))
# [1,7;7,1] matrix
The I can find the proper inverse of Product
by doing
solve(Product)
# X1 X2
# X1 1/7 -1/48
# X2 -1/48 1/7
However, what I found was if I raise the Product
to the -1 power, I get a different answer
Product ^ (-1)
# X1 X2
# X1 1/7 1
# X2 1 1/7
The behavior when you raise a matrix to a negative number is a little odd, can someone explain what the heck is going on? What is the "binary" operation of a power?