Define immutable Matrix2D, Matrix3D, Matrix4D, and Vector4D types.

Adds a generative test suite to verify implementation.