# Matrix Translation Transformation Question

I've been reading a lot about computer graphics lately and because of it I'm building my own math library's for fun. I was reading about Matrix Translation and Homogeneous Coords, and was wondering if these two both translate the x factor by 3.

{ 1, 0, 0, 3 } = { 1, 0, 0, 0 }
{ 0, 1, 0, 0 } = { 0, 1, 0, 0 }
{ 0, 0, 1, 0 } = { 0, 0, 1, 0 }
{ 0, 0, 0, 1 } = { 3, 0, 0, 1 }


I guess what i'm really asking is if I wanted to preform a translation would both of these be exceptible or only the first?

• First version = directX Second version = OpenGL Commented Mar 5, 2013 at 1:08
• Untrue. Both APIs support both versions. Commented Mar 5, 2013 at 1:12

## 1 Answer

Both are valid and the difference is that your first is a column-major translation matrix whereas your second is row-major. The difference lies in the order you multiply matrices and in how you perform the final position transform. I'd encourage you to research more on the terms "column-major" and "row-major" for further info.

• Thanks, will do now that I have a word for it. Thanks again! :) Commented Mar 5, 2013 at 1:29