dot product in r code example Example: r dot product a = c(1,2) b = c(0,1) # Perform the dot product a%*%b