Skip to content

Matrices: Reference Coordinate System

May 30, 2009


All object transforms have a reference coordinate system i.e. the space they exist in even if there parented to an object or not. For example if I’m driving a vehicle, I’m relative to the vehicle which in turn is relative to the earth, and in turn the sun. 

When we want to find the difference or offset of an objects transform relative to its space – be it’s parent, world or an other object we use whats called the inverse. Now this is where it gets a little tricky so ill go slow – to transform an object by another object or get it transform relative to that object we use matrix multiplication. Matrix multiplication in laymen’s terms is basically addition like 10 + 10, but most importantly is non-communicative. 

This means simply that  if one matrix is 20 and another matrix is 30, 20 + 30 will equal 50 but 30 + 20 wont. Or simply put its like subtraction. This is due to how matrices are multiplied together.

If we got back to our start matrix – [1,0,0] [0,1,0] [0,0,1] [0,0,0] we can classify each vector as a ‘row’ i.e.

[a,b,c] – row 1

[d,e,f] – row 2

[h,i, j] – row3

[k,l,m] – row 4

With perpendicular values such as a,d,h,k being ‘columns’. In our example above we have 3 columns by 4 rows or a 3×4 matrix. The crucial rule you have to keep in mind when multiplying matrices is that the initial matrix must have the same amount columns as the matrix your multiplying it against has rows. For example if our initial matrix looks like this:



Our multiplying matrix must have the same amount of rows like so,




We multiply a matrix like so: 1 x a, 2  x  b, 3  x c and so on and so forth…

When we get the relative transform of one object to another, we multiply its transform by the inverse of our target object, parent or space. Now this is a quite a bit more complex so i’ll discuss it very simply.

If we treat two matrices as single values for example 10 and 20, when we get the relative space of 10 to 20 what we do is 10 + -20. Which gives us -10; in other words we’re finding the difference we need to go our base objects transform from our target object, parent or space. Were getting the transform ‘offset’ we need to apply to our target object to get our base objects transform. This offset is always in world space – because it’s the difference thats needed.


Post a comment
  1. June 1, 2009

    Thanks for taking time to explain this in detail Charles. I have one question, the matrices that you used for finding difference are world space matrices right? I mean the values in your example, 10 and 20 are their world space values right?

    • June 1, 2009

      Hey Maulik,

      Yes there always going to be world space, but crucially how you got them could of come from a local or relative space. Say i have two values 10 and 7 – These are both in world space coordynates to start, but when i get 7 relative to 10 (-3) that -3 is in world space but found via relative space.

      Everything is in world space until it gets transform by something else, parenting is one form of this system, contraints are another.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: