The Matrix Cube Theorem