Correctness of logical steps for create the matrix of viewing transformation In general, I understand the creation of viewing transformation matrix, but I have my doubts.

For example, let's say that a world coordinate (called $A$) has a center at $(1,1,1)$, and the view reference point (VRP) (called $B$) has a center at $(3,3,2)$.

Each vertex of the world must be "mapped" to $B$. The axes of $A$ and $B$ aren't aligned so a translation isn't enough, but there are two necessary rotations (around $x$ and $y$ of two certain angles).

I want to know if I am proceeding in a correct way. For overlapping the axes from $A$ to $B$ these are the following steps:


translate (transformation $T$) with translation parameters $(2,2,1)$, namely $(3-1,3-1,2-1)$
rotation around $x$ (transformation $R_x$)
rotation around $y$ (transformation $R_y$)


Thus, the transformation is:
$R_yR_xT$ when $T$ is the first matrix which must be applied. Thus, the transformation to "map" a point of $A$ into the the corresponding point in $B$ coordinates is the inverse namely:
$(T^{-1})(Rx^{-1})(Ry^{-1})$

My main doubt is if it's correct, for converting $A$ and $B$, to do a translation first.

In general, is this process correct?
I'm assuming you mean $A$ is object$\rightarrow$world matrix and $B$ is your camera$\rightarrow$world matrix? If that's the case, to calculate object object$\rightarrow$camera matrix you calculate:

$$C=B^{-1}*A$$

In general your math is correct, i.e. the order of matrix multiplication is reversed for the inverse calculation. It's just that normally these transformations are combined to a single 4x4 transformation matrix which does rotation, scaling and translation, and then you just work with that single matrix instead of it being decomposed to separate rotation &amp; translation matrices. Anyway, if you want to decompose the matrix multiplication, based on the above you would do:

$$A=T_A*Ry_A*Rx_A$$
$$B=T_B*Ry_B*Rx_B$$
$$C=Rx_B^{-1}*Ry_B^{-1}*T_B^{-1}*T_A*Ry_A*Rx_A$$