The matrix exponential is a mathematical function that generalizes the exponential function to square matrices. For a square matrix \( A \), the matrix exponential, denoted as \( e^A \), is defined by the power series expansion: \[ e^A = \sum_{n=0}^{\infty} \frac{A^n}{n!