This work considered the continuous-time linear dynamical systems described by the matrix differential equations, and aimed at studying the perturbation analysis via solving perturbed linear dynamical systems. In specific, we solved Riccati differential equations and continuous-time algebraic Riccati equations with finite and infinite times respectively. Moreover, we stated some assumptions on the existence and uniqueness of the solutions of the perturbed Riccati equations. Similar techniques were applied to the discrete-time linear dynamical systems. Two numerical examples illustrated the efficiency and accuracy.