Matrix multiplication and rotation methods for vectors