# Thread: What is what in a 4*4 matrix

1. ## What is what in a 4*4 matrix

I am kinda new to this so please bare(sp) with me
When I describe the orientation of something I am supposed to use a 4*4 array aka matrix..right? But what does each field represent in that matrix? This is kinda where I am now. Each row represent a vector and the lenght of that vector is always 1. But what does the last row represent. Links are highly appriciated. Is the first row always representing the "models" X values second row Y etc...?

Code:
```dXX dYX dZX  Rotation aroundX (A)?
dXY dYY dZY  Rotation aroundY (B)?
dXZ dYZ dZZ  Rotation aroundZ (C)?
?   ?   ?    ?```

~Barjor

2. In short the 4x4 matrix is used to combine transformation and translation matrices together. Otherwise you would have screwed up equations trying to combine transformations (such as a rotation or scale) with a translation.

the first 3x3 portion is the transformation matrix
the fourth column is the three dimensional translation (displacement vector) matrix. The fourth row is comprised of zeros except for the last element of the matrix which is 1 when dealing with a point and 0 when dealing with a vector

assume x = transformation matrix
t = translation matrix
[x x x t]
[x x x t]
[x x x t]
[0 0 0 w]
w = 1 if operating on a point
w = 0 if operating on a vector

EDIT: this is pretty complex stuff just so you know. If you are just starting out I kinda doubt you're really going to need to know 100% of what I just told you. I haven't even delved into this extensively on my own, I just know what I'm talking about in 'vague' terms, I haven't actually used this into any programs.

3. Thanks Silvercord. Your explenation was just what I needed to get the "ahaaaaa" experience. That fourth row always been confusing me. I am working with a 3D cad system so sooner then later I will have to get my hands dirty with this stuff.

4. I suppose you are right. Wow Cad 3d system? That sounds pretty cool. You should share it with us when you feel like releasing it.

Popular pages Recent additions