Meaning of 'non conformable' in R

565 Views Asked by At

I have recently started using R and have come across matrices. I have a question to work out x %*% y but I get a error non conformable. I'm not sure what that means i have researched but have not come any closer. If I swap x and y to y %*% x then i get a answer. In general I am confused as to what the modulus is in the context of R. Any ideas? Many thanks.

x<-matrix(c(3,-1,2,1),nrow=2,byrow =T)
x
y<-matrix(c(1,0,4,1,0,-1),nrow=2,byrow = T)
y
x%*%y
Error in x %*% y : non-conformable arguments
0

There are 0 best solutions below