Add basic matrix class

Signed-off-by: Kiril Nesenko <knesenko@redhat.com>