In matrix theory, Sylvester's formula or Sylvester's matrix theorem (named after J. J. Sylvester) or Lagrange−Sylvester interpolation expresses an analytic function f(A) of a matrix A as a polynomial in A, in terms of the eigenvalues and eigenvectors of A. It states that
where the λi are the eigenvalues of A, and the matrices Ai are the corresponding Frobenius covariants of A, which are (projection) matrix Lagrange polynomials of A.
Sylvester's formula (1883) is only valid for diagonalizable matrices; an extension due to A. Buchheim (1886) covers the general case.
Sylvester's formula applies for any diagonalizable matrix A with k distinct eigenvalues, λ1, …, λk, and any function f defined on some subset of the complex numbers such that f(A) is well defined. The last condition means that every eigenvalue λi is in the domain of f, and that every eigenvalue λi with multiplicity mi > 1 is in the interior of the domain, with f being (mi — 1) times differentiable at λi.