Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-07-06 10:24:49

"David Abrahams" <dave_at_[hidden]> wrote in message
> Walter Landry <wlandry_at_[hidden]> writes:
> > David Abrahams <dave_at_[hidden]> wrote:
> >> * prod should be named operator*; this is a linear algebra library
> >> after all.
> >
> > Actually, operator* can be thought of as either an inner product or
> > an outer product. I'm not familiar with the innards of uBLAS, but
> > that is a problem common to most linear algebra libraries.
> IIUC in the domain of linear algebra when mathemeticians write
> AB
> for 2D matrices A and B, they mean ordinary matrix multiplication (I
> think inner product) yielding another 2D matrix, and that's what
> operator* should mean in a linear algebra library. If you want an
> outer product yielding a 4D matrix I think you're basically outside
> the domain of linear algebra.

Actually, taking a look at and a few other
sites, I have reached the tentative conclusion that outer products
can only be formed over vectors, not matrices. Matrix multiplication
is well-defined and unambiguous, whereas vector multiplication
comes in at least four varieties: dot product, cross product (also
called the "outer product"), perpendicular dot product, and vector
direct product.

Hence, it would make sense that operator*(matrix, matrix) would
mean "matrix multiplication". However, operator*(vector, vector)
is the problem child. Using the most literal symbolism, it seems
that it should mean "dot product". It is unfortunate that there is no
operatorX in C++, and that such user-defined operators cannot
be created. In this case, I don't see a problem with Mr. Virgilio's
suggestion to use operator^ for cross product, except possibly
precedence rules and/or the fact that there is such a thing as a
"wedge product" which uses roughly the same symbol. However,
it is not specific to linear algebra, so it shouldn't be a significant


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.710 / Virus Database: 466 - Release Date: 6/23/2004

Boost list run by bdawes at, gregod at, cpdaniel at, john at