View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# 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.

3 replies to this topic

### #1Khatharr  Members

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.

### #2Ravyne  Members

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.

throw table_exception("(ノ ゜Д゜)ノ ︵ ┻━┻");

### #3Khatharr  Members

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.

### #4Ravyne  Members

Posted 10 January 2013 - 11:44 PM

Yep, that's correct.

throw table_exception("(ノ ゜Д゜)ノ ︵ ┻━┻");

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.