Add matrix operation code template. All methods are static.