What a waste of space - Modify the matrix x vector function to take three dimensional vectors.
(yeah, yeah, move this somewhere else if you think it doesn't belong here, but still my point stands )