Matrix operations exercise