How this calculation works
The matrix exponential extends the scalar exponential through a convergent matrix-power series. It appears in solutions of constant-coefficient linear differential systems and differs from applying an exponential to every entry. This calculator scales tA to a small norm, sums a numerical Taylor kernel and repeatedly squares the result to recover exp(tA). The full matrix is returned along with the number of scaling steps and series terms.
exp(tA) = I + tA + (tA)²/2! + …; scale the matrix, evaluate the series and square back.A worked example
For A = [[0,1],[0,0]], A² is zero. The exponential series stops algebraically after I+tA, so at t = 3 the answer is [[1,3],[0,1]]. Applying exp to each entry would produce [[1,e³],[1,1]], which is entirely different and would not equal the identity at t = 0.
Good to know
Supports real square matrices up to 6×6, entries within ±1,000,000, time within ±1,000 and infinity norm of tA at most 100. Results use floating arithmetic and a Taylor-based scaling-and-squaring kernel, not SciPy’s Padé implementation. The stopping diagnostic is not a certified error bound, and strongly nonnormal matrices can magnify numerical sensitivity.
Reference: SciPy — matrix exponential and scaling-and-squaring context (opens in a new tab) ↗
The identity is the exponential at zero
Setting t = 0 removes all positive matrix powers and leaves I, regardless of the entries of A. This simple invariant is a strong check against entrywise exponentiation. A zero matrix also has exponential I for every t. For a diagonal matrix, the result is diagonal with exponentials of the diagonal entries, while off-diagonal zeros remain zero.
The default nilpotent example gives a second independent check because its higher powers vanish exactly. A planar rotation generator [[0,−1],[1,0]] yields a rotation matrix with cosine and sine entries. Those closed forms test behavior beyond diagonal matrices and connect the series calculation to linear-system evolution.
The Matrix minimal polynomial calculator discovers an exact power relation rather than evaluating this numerical infinite series.
Scaling controls the series workload
The algorithm divides tA by a power of two until its norm is small. It evaluates exp(B) with a short Taylor sum, then uses exp(2B) = exp(B)² to undo the scaling. The displayed series-term count belongs to that small matrix, not to a direct unscaled expansion. All squarings are matrix products, preserving the operator structure. Replacing each entry by its scalar exponential would violate both the series definition and the zero-time identity check.
The bounded norm gate avoids pretending this educational implementation handles every stiff or highly amplified system. Small final series terms are useful convergence evidence but do not capture every source of forward error after squaring. In particular, cancellation and nonnormality can affect accuracy. The existing integer matrix power calculator computes A raised to a specified exponent; exp(tA) instead sums infinitely many such powers under a different definition.
A few questions, answered
Is exp(A+B) always exp(A)exp(B)?
Only under additional conditions, such as A and B commuting. General matrix products do not commute, so scalar exponential identities cannot be copied indiscriminately.
Can negative time be entered?
Yes, within the stated norm and time limits. In exact arithmetic exp(−tA) is the inverse of exp(tA).