OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Vector calculation diregards order of vectors. {A*B} = {B*A}

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
mbrouillet
General User
General User


Joined: 06 May 2010
Posts: 13

PostPosted: Tue Apr 19, 2011 1:11 am    Post subject: Vector calculation diregards order of vectors. {A*B} = {B*A} Reply with quote

I can't believe this. I make two vectors, one line and one column, and when I multiply the two I get the same result independently of the order. This is just completely wrong.

.......................C1=3
.......................C2=4
A3=1 B3=2 ..... ?


In C3 I enter the following : "=C1:C2*A3:B3" and I end it with CTRL+SHIFT+ENTER. This fills me the area C3:D4 with correct data (3 ; 6 ; 4 ; 8 ).

But if I put the following in C3 : "=A3:B3*C1:C2" and end it with CTRL+SHIFT+ENTER, I get the same result ! It should not. I should only have a 1x1 result in C3, with value 11 (3*1+4*2).

With vectors, A*B is not equal to B*A. If A is of size m*n and B of size o*p, then A*B is of size n*o while B*A is of size p*m.

This is just terrible ! Am I the only one suffering from this bug ? Am I just doing something wrong ? It seems quite incredible. OpenOffice 3.2.1 OOO320m18 (Build:9502).
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Tue Apr 19, 2011 5:13 am    Post subject: Reply with quote

To do matrix multiplication with spreadsheet arrays you need to use the MMULT function, which must be entered as an array function.
=MMULT(A3:B3;C1:C2)=11
=MMULT(C1:C2;A3:B3)={3;4|6;8}

Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group