Deriving a vector class from the matrix class