You are getting confused between a 2-dimensional ARRAY (often called a matrix, and having 2 INDICES, e.g. Mij) and a 1-dimensional VECTOR (which has 1 INDEX, e.g. Vi).
When we talk about 3-d SPACE we are referring to the number of components of that vector, not indices.
A dot product is a scalar; it won't be stored in a vector.
A cross product is another 3-component vector.
Sadly, the c++ definition of "vector" doesn't correspond exactly to the mathematical one.