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