comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Meaning of outer product
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Meaning of outer product [message #31426] Sat, 13 July 2002 14:30 Go to next message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
> IDL documentation says: "Note - If A and B arguments are vectors, then C =
> MATRIX_MULTIPLY(A, B) is a matrix with C_ij = A_iB_j. Mathematically, this
> is equivalent to the outer product. . . ." But I'm having difficulty
> reconciling this with my understanding of outer product. . .
>
> c.x = a.y*b.z - a.z*b.y
> c.y = a.z*b.x - a.x*b.z
> c.z = a.x*b.y - a.y*b.x
>

That's the "cross-product" c = a x b you've written (above).
As you know, the "inner product" of two 3-element vectors is a scalar,
also known as the "dot-product"

c = a . b = a.x*b.x + a.y*b.y + a.z+b.z
The inner product is written as a row vector times a column vector.

The "outer product" of two three-element vectors is a 3x3 matrix
C =
(a.x*b.x a.x*b.y a.x*b.z)
(a.y*b.x a.y*b.y a.y*b.z)
(a.z*b.x a.z*b.y a.z*b.z) (I hope this isn't the transpose!)

it's usually written as a column vector times a row vector.

Remember that vector and matrix multiplications aren't necessarily
commutitive: a times b != b times a, necessarily.

M. Katz
Re: Meaning of outer product [message #31427 is a reply to message #31426] Sat, 13 July 2002 11:17 Go to previous messageGo to next message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Paul Sorenson wrote:
>
> Greetings,
>
> IDL documentation says: "Note - If A and B arguments are vectors, then C =
> MATRIX_MULTIPLY(A, B) is a matrix with C_ij = A_iB_j. Mathematically, this
> is equivalent to the outer product. . . ." But I'm having difficulty
> reconciling this with my understanding of outer product. . .
>
> c.x = a.y*b.z - a.z*b.y
> c.y = a.z*b.x - a.x*b.z
> c.z = a.x*b.y - a.y*b.x
>
> ... which yields a vector (c) instead of a 2D array. Can anyone shed some
> light on this?

The outer product you are referring to is also called the cross-product,
and is different from the outer product that the IDL documentation is
talking about. However, the two concepts are related. In general, the
outer product of two vectors could be written as:

OP = [[a.x*b*x, a.x*b.y, a.x*b.x],
[a.y*b*x, a.y*b.y, a.y*b.x],
[a.z*b*x, a.z*b.y, a.z*b.x]]

You can create such an outer product by matrix multiplication of column
vector by a row vector (matrix multiplication of a row vector by a
column vector gives their dot product).

While 'OP' has 9 different elements, they were calculated from only six
different original numbers. The entire information content of that array
can be summarized by forming two other matrices:

SYM = (OP + transpose(OP))/2 Symmetrized
ASYM = (OP - transpose(OP)) Anti-symmetrized

The ASYM matrix necessarily has 0 on it's diagonal elements, and the
off-diagonal elements come in pairs that are exactly equal in size, and
opposite in sign. Therefore, it can be described by exactly three
independent numbers. The cross-product is a special rearrangement of
those three numbers to create a pseudo-vector. It's a pseudo-vector
because it can be rotated the same way as a real vector, but remains
unchanged by mirror reflections. Mathematically, it's called the "dual"
of the anti-symmetrized outer product.

I'm not sure how the cross-produce ended up also being called the "outer
product", but it's probably because of this connection. For some
purposes, the three numbers in the cross-product represent all of the
useful information that's contained in the outer product.
Re: Meaning of outer product [message #31536 is a reply to message #31426] Thu, 18 July 2002 18:29 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
Thanks, James and M. Katz. Your responses really helped clear up this issue
for me. To summarize: the IDL documentation is correct in referring to C_ij
= A_iB_j as the outer product. Other resources that refer to the cross
product as the "outer product" are using the term more loosely.

James...

> OP = [[a.x*b*x, a.x*b.y, a.x*b.x],
> [a.y*b*x, a.y*b.y, a.y*b.x],
> [a.z*b*x, a.z*b.y, a.z*b.x]]

... I think you meant

OP = [[a.x*b.x, a.x*b.y, a.x*b.z],
[a.y*b.x, a.y*b.y, a.y*b.z],
[a.z*b.x, a.z*b.y, a.z*b.z]]


-Paul Sorenson

"M. Katz" <MKatz843@onebox.com> wrote in message
news:4a097d6a.0207131330.1a6c1835@posting.google.com...
>> IDL documentation says: "Note - If A and B arguments are vectors, then C
=
>> MATRIX_MULTIPLY(A, B) is a matrix with C_ij = A_iB_j. Mathematically,
this
>> is equivalent to the outer product. . . ." But I'm having difficulty
>> reconciling this with my understanding of outer product. . .
>>
>> c.x = a.y*b.z - a.z*b.y
>> c.y = a.z*b.x - a.x*b.z
>> c.z = a.x*b.y - a.y*b.x
>>
>
> That's the "cross-product" c = a x b you've written (above).
> As you know, the "inner product" of two 3-element vectors is a scalar,
> also known as the "dot-product"
>
> c = a . b = a.x*b.x + a.y*b.y + a.z+b.z
> The inner product is written as a row vector times a column vector.
>
> The "outer product" of two three-element vectors is a 3x3 matrix
> C =
> (a.x*b.x a.x*b.y a.x*b.z)
> (a.y*b.x a.y*b.y a.y*b.z)
> (a.z*b.x a.z*b.y a.z*b.z) (I hope this isn't the transpose!)
>
> it's usually written as a column vector times a row vector.
>
> Remember that vector and matrix multiplications aren't necessarily
> commutitive: a times b != b times a, necessarily.
>
> M. Katz




-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Redhat 7.2/IDL 5.5a oddity (long)
Next Topic: CALL_EXTERNAL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:03:41 PDT 2025

Total time taken to generate the page: 0.00593 seconds