$T_1$ and $T_2$ are $3 \times 3$ homogenous transform matrices. $P_1$ is the $3 \times 1$ matrix with $x, y$ coordinates of point $P_1$.
What I am trying to do here is trying to get $x, y$ coordinate of point $P$ in coordinate system with transform $T_2$ when I know its $x, y$ in coordinate system with transform $T_1$.
Well in this relation it seems obvious that $P_2=T_2^{-1} \cdot T_1 \cdot P_1$. But this is giving wrong result in a code of mine. I am right now at my wit's end, so posted this question.
Are there any corner cases where this equation can fail? I know of one case when $\det(T_2)=0$.