Hi, i hope im posting the right place, I need some help regarding matrix translations.

an example. I have an online program which performs the following:

$\displaystyle A=\left(\begin{matrix} -1 &0 &0 &1/2\\0 &-1 &0 & 1/2 \\0 &0 &1 &0\end{matrix}\right)$

$\displaystyle B=\left(\begin{matrix} 1 &0 &0 &-1/4\\0 &1 &0 & -1/4 \\0 &0 &1 &0\end{matrix}\right)$

$\displaystyle C=\left(\begin{matrix} -1 &0 &0 &1\\0 &-1 &0 & 1 \\0 &0 &1 &0\end{matrix}\right)$

Here the A matrix is the standard setting B is the transformation matix and C is the result. I understand that the transformation matrix consists of the rotational part and the 'origin shift' or translation but what i don't understand is the exact mathematical procedure to get from one to the other. According to some information i found it should just be a multiplication but i can see how this would would as you get 1/4, 3/4 values etc. I think maybe it is to do with the fact that the multiplication of matrix is direction dependent but i tried a few combinations and whilst i can get it working with some operations it doesnt work with others.

To let you know, these are atom coordinates in a molecule which are translated from one position to another. I can give more complete example listings if needed. ALSO I notice that for multiplication in some programs you add a 0 0 0 1 line to the bottom of each matric to make them (4x4).

Thanks for any help in advance!