Source: https://www.maths.usyd.edu.au/MATH2921/r/PDF/MatrixODEs.pdf