# What is the convention for column-major order matrix transformations?

According to this cheat sheet for CG, if I want to use column-major order for my matrix/vector math I have to multiply from the left applying transformations from right to left, i.e. v' = P * V * v

I built my view and projection matrices like this

Matrix44 view(right.x, right.y, right.z, -position.x,
up.x, up.y, up.z, -position.y,
-forward.x, forward.y, forward.z, -position.z,
0.0f, 0.0f, 0.0f, 1.0f)

Matrix44 projection(Sx, 0.0f, 0.0f, 0.0f,
0.0f, Sy, 0.0f, 0.0f,
0.0f, 0.0f, Sz, Pz,
0.0f, 0.0f, -1.0f, 0.0f);


However, when using them in the vertex shader

gl_Position = projection * view * vec4(position, 1.0);


I cannot see my geometry unless I swap the transformation to

gl_Position = vec4(position, 1.0) * view * projection;


which means that I am using row-major order instead of column order. So my question is if the pdf I'm following is correct in the notation for the column-major order for view and projection matrices or what am I missing?

• Can you please link to your source pdf? Your link seems to have disappeared. It should be linked like this: [some example pdf](http://www.example.com/example.pdf) – Amziraro Jun 21 '15 at 17:04
• Sorry, missed it. I updated the question. – BRabbit27 Jun 21 '15 at 17:05
• I have heard that OpenGL's matrices are always backwards. I don't know enough about this to make an answer, however. – Amziraro Jun 21 '15 at 17:10
• in general the convention is opposite in US and in EU. another factor depends on your programming language. which one is the index varying the fastest (row or column) ? – user75844 Feb 26 '16 at 17:50