Abstraction for vectors and matrices

Add code to convert from one matrix size to another
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>