Solving Second Order Differential Equations With Matrices