Added Matrix templates

The templates for Matrix3 and Matrix4 are somewhat similar, but not similar enough to be one file.