Building a lookat camera matrix I was reading this article and found something that caught my attention.
They say they are using column-major for their matrices so, in the code they have under the section Look At Camera they construct the orientation and translation.

$
R=\begin{bmatrix}r_x &amp; u_x &amp; f_x &amp; 0 \\
r_y &amp; u_y &amp; f_y &amp; 0 \\
r_z &amp; u_z &amp; f_z &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 1\end{bmatrix}
$

$
T=\begin{bmatrix}0 &amp; 0 &amp; 0 &amp; 0 \\
0&amp; 0&amp; 0&amp; 0 \\
0&amp; 0&amp; 0&amp; 0 \\
-e_x&amp; -e_y &amp; -e_z &amp; 1\end{bmatrix}
$

$
RT_1 = \begin{bmatrix}r_x &amp; u_x &amp; f_x &amp; 0 \\
r_y &amp; u_y &amp; f_y &amp; 0 \\
r_z &amp; u_z &amp; f_z &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 1\end{bmatrix}\begin{bmatrix}0 &amp; 0 &amp; 0 &amp; 0 \\
0&amp; 0&amp; 0&amp; 0 \\
0&amp; 0&amp; 0&amp; 0 \\
-e_x&amp; -e_y &amp; -e_z &amp; 1\end{bmatrix}=\begin{bmatrix}r_x &amp; u_x &amp; f_x &amp; 0 \\
r_y &amp; u_y &amp; f_y &amp; 0 \\
r_z &amp; u_z &amp; f_z &amp; 0 \\
-e_x&amp; -e_y &amp; -e_z &amp; 1\end{bmatrix}
$

They say this could be optimized if instead of doing the matrix multiplication we set the last row to be the dot product between camera position and the $\vec{r}, \vec{u} $ and $\vec{f}$ vectors.

$
RT_2 = \begin{bmatrix}r_x &amp; u_x &amp; f_x &amp; 0 \\
r_y &amp; u_y &amp; f_y &amp; 0 \\
r_z &amp; u_z &amp; f_z &amp; 0 \\
-&lt;\vec{r}, \vec{e}&gt;&amp; -&lt;\vec{u}, \vec{e}&gt; &amp; -&lt;\vec{f}, \vec{e}&gt; &amp; 1\end{bmatrix}
$

How is this possible? I don't see how $RT_1 = RT_2$ could give the same matrix. What am I missing? The only way I can see this is true is inverting the order of multiplication, i.e. $TR$
Because all matrices are column-major,
the translation matrix $\mathbf{T}$ should be

$$
\mathbf{T}=\begin{bmatrix}
1 &amp; 0 &amp; 0 &amp; e_x \\
0 &amp; 1 &amp; 0 &amp; e_y \\
0 &amp; 0 &amp; 1 &amp; e_z \\
0 &amp; 0 &amp; 0 &amp; 1
\end{bmatrix}
$$

I thought you mistakenly treat the eye as a row vector just because they were written as a single line in the source code

mat4 translation = {
    vec4(   1,      0,      0,   0 ),
    vec4(   0,      1,      0,   0 ), 
    vec4(   0,      0,      1,   0 ),
    vec4(-eye.x, -eye.y, -eye.z, 1 )
};


Another issue in that article is that the variable names are misleading:
the orientation denotes $\mathbf{R}^{-1}$, and the translation denotes $\mathbf{T}^{-1}$(I think it is not a good practice even they commented on these variables).

The final view matrix is:

$$
\begin{eqnarray*}
\mathbf{M} &amp; = &amp; (\mathbf{T}\mathbf{R})^{-1}\\
&amp; = &amp; \mathbf{R}^{-1}\mathbf{T}^{-1}\\
&amp; = &amp; \mathbf{R}^{T}\mathbf{T}^{-1}\\
&amp; = &amp;
\begin{bmatrix}
r_x &amp; r_y &amp; r_z &amp; -&lt;\vec{r}, \vec{e}&gt; \\
u_x &amp; u_y &amp; u_z &amp; -&lt;\vec{u}, \vec{e}&gt; \\
f_x &amp; f_y &amp; f_z &amp; -&lt;\vec{f}, \vec{e}&gt; \\
0 &amp; 0 &amp; 0 &amp; 1
\end{bmatrix}
\end{eqnarray*}
$$

and the implementation in that article is correct.