Matrix algebra class