[Math] Reordering of matrix multiplication

linear algebramatricesorthogonal matrices

I want to compute the matrix multiplication $ABA$, where $A$ and $B$ are real and orthogonal matrices. In fact, they are specifically $3\times3$ rotation matrices. However, it is much easier if I can reverse the order of $BA$ somehow, because I can then perform the multiplication much easier.

I know that matrix multiplication is not commutative, however, I am asking because both $A$ and $B$ are orthogonal matrices, and hopefully, may be there is some trick to utilize their orthogonality to reorder the product.

I tried to solve this, but got stuck here:

$$
ABA = A((BA)^{-1})^{-1}=A(A^{-1}B^{-1})^{-1}
$$

Is there a way to proceed from here?

Edit:
I also know that matrix multiplication is associative; however, I am not after associativity here. I want to multiply the $A$ matrix by $A$ (or by its inverse/transpose), then multiply the result by $B$.

Edit:
To put this into context, consider the following product of rotation matrices
$$
R_x(\theta)R_z(\pi)R_x(\theta)
$$

where, $R_x(\theta)$ is the rotation matrix about the $x$-axis by $\theta$, and $R_z(\pi)$ is the rotation matrix about the $z$-axis by $\pi$.

This product simplifies to $R_z(\pi)$. Is it possible to come to this conclusion without carrying out the matrix multiplication of the three rotation matrices? It looks that the $R_x(\theta)$ got cancelled somehow.

Best Answer

Sadly, no. As @TobyMak points out, the associativity $$ A(BA) = (AB)A $$ means you can choose to evaluate either $AB$ or $BA$ but there's no trick that will allow you to work with $A^2$.

You can probably show that with an example in which $A^2 = I$.