by John on (#3AG8V)
Here’s a fact that has been rediscovered many times in many different contexts: The way you parenthesize matrix products can greatly change the time it takes to compute the product. This is important, for example, for the back propagation algorithm in deep learning. Let A, B, and C be matrices that are compatible for multiplication. Then (AB)C = A(BC). […]