Advanced maths

Matrix exponential Frechet derivative calculator in a direction

Evaluate the first-order change in a matrix exponential caused by a specified matrix perturbation.

Your numbers

Finite real values; comma-separated columns and separate lines for matrix rows.
Finite real values; comma-separated columns and separate lines for matrix rows.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Evaluate the first-order change in a matrix exponential caused by a specified matrix perturbation. The Fréchet derivative keeps matrix multiplication order intact, which is essential when the original matrix and perturbation do not commute. The result includes exp(A), the directional derivative and a centered finite-difference check. It measures sensitivity of the exponential rather than differentiating each matrix entry independently.

THE FORMULAL_exp(A,E)=∫₀¹ exp((1−s)A) E exp(sA) ds; exp([[A,E],[0,A]])=[[exp(A),L_exp(A,E)],[0,exp(A)]]. exp(A+hE)=exp(A)+hL_exp(A,E)+O(h²).

A worked example

For A=[[0,1],[0,0]] and E=[[0,0],[1,0]], exp(A)=[[1,1],[0,1]] and the derivative is [[1/2,1/6],[1,1/2]]. The nonzero upper-right derivative entry1/6 arises from an AEA contribution; replacing the derivative by exp(A)E would miss it.

Good to know

Real finite A and E of matching square order1–3. Scaling-and-squaring Taylor exponential on the doubled block matrix; its infinity norm must not exceed80. Centered check uses h=10⁻⁵. Floating numerical derivative and residual, no certified error bound, arbitrary symbolic matrix, condition-number optimization or derivative of an eigendecomposition.

A matrix perturbation has a direction

The input E specifies how every matrix entry changes per unit of a scalar perturbation h. A zero in E holds that entry fixed, while positive and negative entries describe a coordinated change in the others.

The derivative is linear in E at fixed A, but generally nonlinear in A. It returns an entire matrix describing the leading response of exp(A+hE), rather than a single derivative associated with one selected input entry.

Matrix exponential Frechet derivative calculator in a direction worked exampleSensitivity comes from the upper-right blockBlock inputExponential outputAE0Aexp(A)L(A,E)0exp(A)Default L = [[1/2, 1/6], [1, 1/2]]exp(A + hE) ≈ exp(A) + hL(A,E); A and E do not commute
Scroll across to see the full diagram.
For A=[[0,1],[0,0]] and E=[[0,0],[1,0]], exp(A)=[[1,1],[0,1]] and the derivative is [[1/2,1/6],[1,1/2]]. The nonzero upper-right derivative entry1/6 arises from an AEA contribution; replacing the derivative by exp(A)E would miss it.

Compare this with the Matrix exponential calculator e^(At). Computing exp(A) alone does not give its sensitivity to a perturbation E.

Multiplication order is the central issue

For real numbers, the derivative of exp(a+h e) is exp(a)e. Matrices do not generally commute, so inserting E on only one side of exp(A) loses information about how the perturbation interacts with A throughout the exponential series.

The integral exp((1−s)A)E exp(sA) averages those ordered interactions. If AE=EA, the two exponential factors can be combined and the scalar-looking expression exp(A)E becomes valid. Commutation must be established rather than assumed.

Reading the doubled block exponential

The block matrix contains A twice on its diagonal and E in the upper-right block. Its exponential preserves an upper-triangular block structure, with the desired derivative occupying the upper-right output block.

This construction computes the derivative without forming a large Jacobian over all entries of A. It is particularly direct for a single direction, while the doubled dimension and block norm explain the small-matrix scope of this page.

An exact noncommuting worked example

The default A is nilpotent with A²=0. The integral factors therefore reduce to I+(1−s)A and I+sA. Expanding them around E produces E, AE, EA and AEA terms with explicitly integrable scalar coefficients.

The coefficients are1,1/2,1/2 and1/6 respectively, giving [[.5,1/6],[1,.5]]. This example checks multiplication order and the mixed term, rather than merely verifying a diagonal case in which the derivative simplifies automatically.

What the finite-difference check measures

The diagnostic compares the block derivative with [exp(A+hE)−exp(A−hE)]/(2h). Agreement checks two numerical constructions of the same first-order response, using the fixed step h=10⁻⁵.

A smaller step is not always better: subtraction can lose significant digits when the two exponentials are close. A larger step introduces truncation error. The diagnostic is a consistency check, not a rigorous bound on the exact derivative error.

Sensitivity and nonnormal matrices

A matrix can have modest eigenvalues while its exponential responds strongly to certain perturbations. Eigenvalues alone do not summarize directional sensitivity, particularly when eigenvectors are poorly conditioned or the matrix is nonnormal.

The returned derivative lets you inspect a specific physically meaningful perturbation. It does not maximize sensitivity over every possible E, so its norm is not automatically the full exponential condition number.

Using the first-order approximation

Choose a small scalar h and compare exp(A)+hL with a separately computed exp(A+hE). The approximation should improve as h shrinks until floating-point effects dominate. This directly tests whether the linear sensitivity is useful at the perturbation size of interest.

For a finite change, higher-order terms can be important even when the derivative is accurately computed. The page does not replace recomputation at the perturbed matrix or provide a guaranteed perturbation radius.

A few questions, answered

Is this an elementwise exponential derivative?

No. It differentiates the matrix exponential, including matrix multiplication interactions.

When is exp(A)E correct?

When A and E commute. Otherwise use the full Fréchet derivative.

Does the check certify the error?

No. It is a numerical finite-difference consistency diagnostic with a fixed step.

Can I scale the perturbation?

Yes. At fixed A the derivative is linear in E; finite perturbations still have higher-order terms.

Find your calculator

Start typing to explore the library.