Matrix multiplication is not communative:
A*B != B*A
Then why can matrix exponentiation be done by squaring?
I have tried searching for special cases where this rule did not apply, but from what I've understood, none of it seemed to apply specifically to powers of two equal matrices.
For example a matrix M is raised to a 12, then which of the following is true?
M4 * M8 = M12 OR M8 * M4 = M12 ?
Do we need to follow a particular order while calculating matrix exponentiation by squaring ? If yes then how is the order determined and why does it lead to the correct exponentiation. If not then why doesn't the fact that matrix multiplication is not communative does not affect it?
Can this be explained this to me in plain english? Thanks in advance.
When squaring a matrix, the "order" in which you multiply them doesn't matter since every matrix commutes with itself. Using your example of $M^{12}$, it doesn't matter if we do \begin{equation} M^{12} = M^{4}M^{8} \end{equation} or \begin{equation} M^{12} = M^8M^4 \end{equation} or any other way of grouping powers of $M$ which add up to $12$.
Edit: For cases when the exponent is greater than $2$, consider $M^4$ (higher powers will generalize this in a simple way). We can say \begin{equation} M^4 = M\cdot M \cdot M \cdot M. \end{equation} Now, matrix multiplication is associative, so we can group this in any way we want. Then we have \begin{equation} M^4 = M\cdot M \cdot M \cdot M = (M^2) \cdot (M^2) = M\cdot (M^3) = (M^3) \cdot M. \end{equation} The key here is that the associative property of matrix multiplication lets us choose any grouping of the matrices that we'd like.