Apply TranslationTransform on a matrix

See my following example:

In[942]:= TMPG229me3ToITA
TMPG229me3ToITA . (TranslationTransform[{1/8,1/8,1/8}]//TransformationMatrix)

Out[942]= {{3/4, 5/8, 5/8, 0}, {5/8, 3/4, 5/8, 0}, {5/8, 5/8, 3/4, 
  0}, {0, 0, 0, 1}}

Out[943]= {{3/4, 5/8, 5/8, 1/4}, {5/8, 3/4, 5/8, 1/4}, {5/8, 5/8, 3/4,
   1/4}, {0, 0, 0, 1}}

I want to obtain the exactly same result by using TranslationTransform command directly without calling the TransformationMatrix. I tried the following methods, but all cannot achieve the desired goal:

In[946]:= TranslationTransform[{1/8,1/8,1/8,0}][TMPG229me3ToITA]
TranslationTransform[{1/8,1/8,1/8,1}][TMPG229me3ToITA]

Out[946]= {{7/8, 3/4, 3/4, 0}, {3/4, 7/8, 3/4, 0}, {3/4, 3/4, 7/8, 
  0}, {1/8, 1/8, 1/8, 1}}

Out[947]= {{7/8, 3/4, 3/4, 1}, {3/4, 7/8, 3/4, 1}, {3/4, 3/4, 7/8, 
  1}, {1/8, 1/8, 1/8, 2}}

Obviously, I did not understand the use of this command correctly, but no related clues were found in the related documentation. Any tips will be appreciated.

Regards,
Zhao

I don’t think TranslationTransform operates on matrices per se. It operates on nested lists by operating on the low-level elements of the list that have the right “structure” for the dimensions of the given translation parameter. So, in your case, it’s just being applied to each 4-element list in the bigger list.

My goal is to find a way to apply the translation transformation as an operator function on the matrix, so that the calculation process has obvious geometric meaning and can be understood intuitively.

apply the translation transformation as an operator function on the matrix

If what you mean by this is that you want to specifically use the symbol TranslationTransform, then I don’t think this is possible, at least not in any straightforward way. Maybe I’m missing something, and maybe someone with more expertise can correct me, but from what I think I understand right now, that’s just not how TranslationTransform works, and that’s by design.

I mean something similar to the following:

TranslationTransform[vec][matrix]

If TranslationTransform can not do this due to its working mechanism in design, are there other similar commands that can do this?

I don’t know. I don’t know what the “obvious geometric meaning” is.

You could make your own Operator style function:

In[1]:= transTransform = OperatorApplied[#2 . (TranslationTransform[#1] // TransformationMatrix) &, {1, 2}];

In[2]:= vec = {1/8, 1/8, 1/8};
matrix = {{3/4, 5/8, 5/8, 0}, {5/8, 3/4, 5/8, 0}, {5/8, 5/8, 3/4, 0}, {0, 0, 0, 1}};

In[4]:= transTransform[vec][matrix]
Out[4]= {{3/4, 5/8, 5/8, 1/4}, {5/8, 3/4, 5/8, 1/4}, {5/8, 5/8, 3/4, 1/4}, {0, 0, 0, 1}}

Thank you Hans,

This is perhaps the most flexible and versatile solution to such problems.