Jump to content

  • Log In with Google      Sign In   
  • Create Account

Matrix Multiplication A3x3 * B3x2


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Khatharr   Crossbones+   -  Reputation: 3002

Like
0Likes
Like

Posted 10 January 2013 - 10:01 PM

My professor told me to look on YouTube, lol.

 

I understand how to do equally sized matrices and to do something like A3x3 * B3x1 but how would you do A3x3 * B3x2?

 

What I mean is:

 

For 3x3 * 3x1 you use the same (only) column in B for each row of A.

For 3x3 * 3x3 each row of A matches a column in B.

 

What would you do for 3x3 * 3x2? Use column 1 or 2 of B for the third row of A or something odd with the second row of A?

 

Thanks in advance for any response.


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Sponsor:

#2 Ravyne   GDNet+   -  Reputation: 7386

Like
1Likes
Like

Posted 10 January 2013 - 10:30 PM

The result of that operation (3x3 * 3x2) is a 3x2 matrix. The first column of the result matrix is the same as if the second column of the second matrix didn't exist, and the second column of the result matrix is as if the first column of the second matrix didn't exist, except that you place the result in the second column of the result matrix.


Edited by Ravyne, 10 January 2013 - 10:32 PM.


#3 Khatharr   Crossbones+   -  Reputation: 3002

Like
0Likes
Like

Posted 10 January 2013 - 10:56 PM

Ahhhhh, I get it. I was thinking HxW for some reason. Bleh. Linear algebra is like the brain scrambling olympics sometimes.

 

So the MxN * NxP rule means you'll always have a workable number of rows and columns. Okay.

 

Ahh, wait.

 

Okay, lemme write this out...

 

[a, b, c]   [j, k]
[d, e, f] * [l, m]
[g, h, i]   [n, o]

Okay, so that would be invalid because it's 3x3 * 2x3?

 

We did one where we multiplied a 3x3 by a 1x3(vector, though he didn't call it that). Is that just considered a different case since the vector can be used for each row?

 

 

Edit - Bzzzzzzzzzt. I got it. -.-

 

It would be

[aj+bl+cn, ak+bm+co]
[dj+el+fn, dk+em+fo]
[gj+hl+in, gk+hm+io]

Thanks, Ravyne.


Edited by Khatharr, 10 January 2013 - 11:09 PM.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#4 Ravyne   GDNet+   -  Reputation: 7386

Like
0Likes
Like

Posted 10 January 2013 - 11:44 PM

Yep, that's correct.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS