Thank you. It works.
If, here, R is a 3 by 3 invertible matrix, s1 and t are 3 by 1 column vectors. I want to do the following rule replace:
AA/. {R1 -> IdentityMatrix[3]} // Flatten // Simplify
What I want to get is the following:
{R, (-IdentityMatrix[3] + R) . s1 + t}
But the following result is returned:
{{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} .
R . {{1, 0, 0}, {0, 1, 0}, {0, 0,
1}}, -{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} .
s1 + {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} . (t + R . s1)}
Is there any way to solve this problem?
Regards,
Zhao