# General questions about matrix multiplications

This topic is 1384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been trying to really further my understanding of matrices both as a mathematical concept and how they relate to games. After printing out a bunch of worksheets and doing a lot of math, asking a few questions on various forums and doing some google searches to try to confirm that i've done things correctly i've made some general observations that i think are all true.

I'm interested to know if any of the observations i've made are incorrect, and if so what would be correct instead. Everything listed below assumes 4x4 square matrices, 1x4 or 4x1 vectors. Translation for row major matrices is assumed to be in the last row, translation for column major matrices is assumed to be in the last column.

• A row vector will always be pre multiplied with a matrix (not possible to post multiply)
• A column vector will always be post multiplied with a matrix (not possible to pre multiply)
• When multiplying row major matrices, the inner dimensions of the matrices must match
• When multiplying row major matrices, the outer dimensions of the matrices are the same as the dimensions of the result
• When multiplying column major matrices, the outer dimensions of the matrices must match
• When multiplying column major matrices, the inner dimensions of the matrices are the same as the dimensions of the result
• A row vector (pre) multiplied with a row major matrix yields a row vector
• A row major matrix (post) multiplied with a column vector yields a column vector
• A row vector (pre) multiplied with a column major matrix yields a column vector
• A column major matrix (post) multiplied with a column matrix yields a row vector

Assuming we have a row major matrix that represents a translation:

• Pre multiplying a row vector will result in a row vector that is the matrix translation applied to the original vector
• Post multiplying a column vector will only yield the vector translated by the matrix if the matrix is first transposed

Assuming we have a column major matrix that represents a translation:

• Post multiplying a column vector will yield a row vector that is the original column vector translated by the matrix
• Pre multiplying a row vector will only yield the same result if the matrix is first transposed. either way it will yield a column vector.

##### Share on other sites

Your first two points are correct, but the remaining ones doesn't make any sense. Row/column majorness of a matrix has nothing to do with matrix maths, what you can do with it and what the result of operations are. The majorness affects one and only one thing: how the two-dimensional grid of numbers representing the matrix is mapped to a one-dimensional linear memory storage. You have to store the matrix in some way in one-dimensional memory, and the majorness dictates where the individual matrix elements are stores in memory.

##### Share on other sites

The computer will follow your instructions.  If you don't understand the instructions yourself, you cannot give meaningful instructions to the machine.

So go learn.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013394
×