Some more matrix mathematics for the R binding.