[Math] mathematical difference between column vectors and row vectors

linear algebravector analysis

I'm writing a mathematical library; and I have an idea where I want to automatically turn column matrices and row matrices to vectors, with all of the mathematical properties of a vector.

Answer I'm looking for:

Someone with good mathematical reasoning explaining why:

column matrices, column vectors, row matrices, row vectors should not be treated as the same thing. (The library will ofcourse understand operations like [[1,2],[3,4]] * [1,2], where [1,2] is a vector)

or:

some kind of showcase or example where it is impossible for a library that can't differentiate between row vectors and column vectors to know which one of several possible answers are correct.

or:

some kind of evidence that it is in fact possible to do this.

please note: inner vector multiplication will be easily integrated by using a special function for that function rather than the * sign.

Best Answer

One "silly" example is the product of a column matrix times a row matrix. Consider: $$ \left[\begin{array}{c} 1 \\ 2 \\ 3 \end{array}\right] \left[\begin{array}{ccc} 4 & 5 & 6 \end{array}\right]$$. By the rules of matrix multiplication, we obtain the $3 \times 3$ matrix: $$ \left[\begin{array}{ccc} 4 & 5 & 6 \\ 8 & 10 & 12 \\ 12 & 15 & 18 \end{array}\right]$$ However, if I had "forgotten" than my original matrices were column and row matrices, respectively, then I might have considered them as vectors and (perhaps) computed the inner product: $$ (1, 2, 3) \cdot (4, 5, 6) = 32$$. By the way, if one works entirely in terms of matrices, and considers any vectors to be a column matrix, then the inner product can be defined by $\mathbf{v} \cdot \mathbf{w} = \mathbf{v}^T\mathbf{w}$, which is a standard practice in most linear algebra texts.

Hope this helps!

Related Question