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 & u_x & f_x & 0 \\ r_y & u_y & f_y & 0 \\ r_z & u_z & f_z & 0 \\ 0 & 0 & 0 & 1\end{bmatrix} $
$ T=\begin{bmatrix}0 & 0 & 0 & 0 \\ 0& 0& 0& 0 \\ 0& 0& 0& 0 \\ -e_x& -e_y & -e_z & 1\end{bmatrix} $
$ RT_1 = \begin{bmatrix}r_x & u_x & f_x & 0 \\ r_y & u_y & f_y & 0 \\ r_z & u_z & f_z & 0 \\ 0 & 0 & 0 & 1\end{bmatrix}\begin{bmatrix}0 & 0 & 0 & 0 \\ 0& 0& 0& 0 \\ 0& 0& 0& 0 \\ -e_x& -e_y & -e_z & 1\end{bmatrix}=\begin{bmatrix}r_x & u_x & f_x & 0 \\ r_y & u_y & f_y & 0 \\ r_z & u_z & f_z & 0 \\ -e_x& -e_y & -e_z & 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 & u_x & f_x & 0 \\ r_y & u_y & f_y & 0 \\ r_z & u_z & f_z & 0 \\ -<\vec{r}, \vec{e}>& -<\vec{u}, \vec{e}> & -<\vec{f}, \vec{e}> & 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$