Re: Vector multiplication??
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Vector multiplication??
- From: "Paul N. Schatz" <pns at fermi.clas.virginia.edu>
- Date: Wed, 2 Dec 92 14:14:50 -0500
On Nov 29, 15:48, "Katherine (Williams) Derbyshire" wrote:
> Subject: Vector multiplication??
> I have an arbitrary vector
> A = Array[a,3] = {a[1], a[2], a[3]}
>
> The dot product of this vector with itself, is evaluated correctly by
> Mathematica:
> a[1]^2 + a[2]^2 + a[3]^2
>
> The 'ordinary' product of this vector with itself, A^2, should be
> equivalent to the dot product. It is, in fact, conventional in
> mechanical engineering to interpret A^2 as the square of the magnitude
> of A, (i. e. as a dot product). My linear algebra text doesn't offer
> any definition for this expression at all. Unfortunately, Mathematica
> (2.0 for Windows) interprets A^2 as
> {a[1]^2, a[2]^2, a[3]^2}
> which isn't the same at all.
>
> What's going on here? I know I could fix this by writing a
> transformation rule, but it would be nice if Mathematica didn't give
> wrong answers in the first place.
> --
> Katherine (Williams) Derbyshire
> kewms at kew.com
>
> Are we having fun, yet?
>
> -- End of excerpt from "Katherine (Williams) Derbyshire" <kewms at kew.com>
I would like to point out that this is NOT a wrong
answer. The product in question is called the Hadamard product.
It in fact is EXCEEDINGLY useful in many Mathematica
applications.
--
Paul N. Schatz
Chemistry Department
University of Virginia
McCormick Road
Charlottesville, VA 22901, USA
phone: 804-924-3249
email: pns at virginia.edu