Given two matrices $X$ and $Y$, with $Y$ invertible. Suppose that
In what order should I do the corresponding matrix multiplications to compute $Z$ ?
Matrix multiplication is associative, that is given matrices $A,B$ and $C$,
So the order in which you carry out the multiplication does not matter, you will get the same result.