# [Numpy-discussion] matrix default to column vector?

Charles R Harris charlesr.harris@gmail....
Sat Jun 6 16:17:11 CDT 2009

```On Sat, Jun 6, 2009 at 3:00 PM, Alan G Isaac <aisaac@american.edu> wrote:

> On 6/6/2009 4:30 PM Robert Kern apparently wrote:
> > The old idea of introducing RowVector and ColumnVector would help
> > here. If x were a ColumnVector and A a Matrix, then you can introduce
> > the following rules:
> >
> > x.T is a RowVector
> > RowVector * ColumnVector is a scalar
> > RowVector * Matrix is a RowVector
> > Matrix * ColumnVector is a ColumnVector
>
>
> To me, a "row vector" is just a matrix with a single row,
> and a "column vector" is just a matrix with a single column.
> Calling them "vectors" is rather redundant, since matrices
> are also vectors (i.e., belong to a vector space).
>

Well, yes, linear mappings between vector spaces are also vector spaces, but
it is useful to make the distinction. Likewise, L(x,L(y,z)) is multilinear
map that factors through the tensor product of x,y,z. So on and so forth. At
some point all these constructions are useful. But I think it is pernicious
for a first course in matrix algebra to not distinguish between matrices and
vectors. The abstraction to general linear spaces can come later.

>
> I think the core of the row-vector/column-vector proposal
> is really the idea that we could have 1d objects that
> also have an "orientation" for the purposes of certain
> operations. But then why not just use matrices, which
> automatically provide that "orientation"?
>

Because at some point you want scalars. In matrix algebra matrices are
generally considered maps between vector spaces. Covariance matrices don't
fit that paradigm, but that is skimmed over. It's kind of a mess, actually.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090606/45545a85/attachment-0001.html
```