Understanding vectors and matrices