matrix_helpers function

Create matrices from vector input